]> git.sesse.net Git - nms/blobdiff - config/make-port-config.pl
Add logging to mbd.
[nms] / config / make-port-config.pl
old mode 100644 (file)
new mode 100755 (executable)
index 769c580..ee75cab
@@ -12,17 +12,17 @@ while (<PATCHLIST>) {
 
        my $ip;
        if ($switch == 1) {
-               $ip = "87.76." . ($row - 1) . "1";
+               $ip = "87.76." . ($row) . ".1";
        } elsif ($switch == 2) {
-               $ip = "87.76." . ($row - 1) . "65";
+               $ip = "87.76." . ($row) . ".65";
        } elsif ($switch == 3) {
-               $ip = "87.76." . ($row - 1) . "129";
+               $ip = "87.76." . ($row) . ".129";
        } elsif ($switch == 4) {
-               $ip = "87.76." . $row . "1";
+               $ip = "87.76." . ($row + 1) . ".1";
        } elsif ($switch == 5) {
-               $ip = "87.76." . $row . "65";
+               $ip = "87.76." . ($row + 1) . ".65";
        } elsif ($switch == 6) {
-               $ip = "87.76." . $row . "129";
+               $ip = "87.76." . ($row + 1) . ".129";
        }
 
        my $vlan = "$row$switch";
@@ -32,12 +32,14 @@ vlan $vlan
   name $name
 !
 default interface vlan $vlan
-interface $vlan
+interface vlan $vlan
   description $name
   ip address $ip 255.255.255.192
   ip directed-broadcast 10
   ip helper-address 87.76.254.2
   no ip proxy-arp
+  ip access-group great-wall-of-tg in
+  ipv6 address 2001:16D8:FFFF:$vlan::1/64
   no shutdown
 !
  
@@ -53,7 +55,7 @@ interface $port
  ip igmp snooping
  storm-control broadcast level 2
  no shutdown
-
+!
 EOF
 }
 
@@ -61,5 +63,6 @@ for my $distro (keys %distros) {
        open DISTRO, ">$distro-config"
                or die "$distro-config: $!";
        print DISTRO $distros{$distro};
+       print DISTRO "end\n";
        close DISTRO;
 }