X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=config%2Fmake-port-config.pl;h=72416a0ae0340c1b84ad746ae878cb7c571bd0f9;hb=ea6dfbe82f8c2be844a374b0f237dce4f1737562;hp=4ab50026d6651151ce76e2d52a94b06f8c2d6aa7;hpb=0788e993b8e60fae619cec3b3b6206ef764d2c66;p=nms diff --git a/config/make-port-config.pl b/config/make-port-config.pl index 4ab5002..72416a0 100755 --- a/config/make-port-config.pl +++ b/config/make-port-config.pl @@ -1,7 +1,8 @@ #! /usr/bin/perl open PATCHLIST, ") { chomp; @@ -28,10 +29,13 @@ while () { my $vlan = "$row$switch"; my $ipv6 = sprintf "F%02u%u", $row, $switch; - $distros{$distro} .= <<"EOF"; + $vlans{$distro} .= <<"EOF"; vlan $vlan name $name ! +EOF + + $ports{$distro} .= <<"EOF"; default interface vlan $vlan interface vlan $vlan description $name @@ -41,10 +45,11 @@ interface vlan $vlan no ip proxy-arp ip access-group great-wall-of-tg in ipv6 address 2001:16D8:FFFF:${ipv6}::1/64 - ip igmp version 3 + ip igmp version 2 + ip pim sparse-mode no shutdown + exit ! - default interface $port interface $port description $name @@ -56,14 +61,16 @@ interface $port storm-control broadcast level 2 no shutdown + exit ! EOF } -for my $distro (keys %distros) { +for my $distro (keys %vlans) { open DISTRO, ">$distro-config" or die "$distro-config: $!"; - print DISTRO $distros{$distro}; + print DISTRO $vlans{$distro}; + print DISTRO $ports{$distro}; print DISTRO "end\n"; close DISTRO; }