X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=config%2Fmake-port-config.pl;h=4da29638765a3dbfe7ed85a6ffdb1e0f69cb1d21;hb=6f01d8d8981b4a668709516f75a482588a66c4ba;hp=769c580118a9e28c5ca43fb23e852939faf96a5f;hpb=07d92d8b9eeb73d1813e67a66b2bcb467a559407;p=nms diff --git a/config/make-port-config.pl b/config/make-port-config.pl old mode 100644 new mode 100755 index 769c580..4da2963 --- a/config/make-port-config.pl +++ b/config/make-port-config.pl @@ -12,17 +12,17 @@ while () { 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"; @@ -38,6 +38,7 @@ interface $vlan ip directed-broadcast 10 ip helper-address 87.76.254.2 no ip proxy-arp + ip access-group great-wall-of-tg in no shutdown ! @@ -53,7 +54,7 @@ interface $port ip igmp snooping storm-control broadcast level 2 no shutdown - +! EOF } @@ -61,5 +62,6 @@ for my $distro (keys %distros) { open DISTRO, ">$distro-config" or die "$distro-config: $!"; print DISTRO $distros{$distro}; + print DISTRO "end\n"; close DISTRO; }