ios_config "mls mpls tunnel-recir" proc trafficMultiplierA { hops } { ios_config "ip vrf big1" "rd 11:1999" ios_config "router ospf 1999 vrf big1" "netw 10.0.0.0 0.255.255.255 ar 0" "capa vrf" for {set a 1} {$a <= $hops} {incr a} { set b [expr $a+1000] set c [expr (($a+2)/2)+1000] ios_config "ip vrf v$c" "rd 11:$c" ios_config "interface loo$b" "no logg ev li" "ip vrf for big1" "ip addr 10.11.99.$a 255.255.255.255" ios_config "interface tun$b" "no logg ev li" "tun vrf big1" "tun sou loo$b" "tun dest 10.22.99.$a" ios_config "interface tun$b" "ip vrf for v$c" "ip addr 10.33.$a.1 255.255.255.252" ios_config "router ospf $c vrf v$c" "router-id 10.33.$a.1" "netw 10.0.0.0 0.255.255.255 ar 0" "capa vrf" } } proc trafficMultiplierB { hops } { ios_config "ip vrf big2" "rd 22:2999" ios_config "router ospf 2999 vrf big2" "netw 10.0.0.0 0.255.255.255 ar 0" "capa vrf" for {set a 1} {$a <= $hops} {incr a} { set b [expr $a+2000] set c [expr (($a+1)/2)+2000] ios_config "ip vrf v$c" "rd 22:$c" ios_config "interface loo$b" "no logg ev li" "ip vrf for big2" "ip addr 10.22.99.$a 255.255.255.255" ios_config "interface tun$b" "no logg ev li" "tun vrf big2" "tun sou loo$b" "tun dest 10.11.99.$a" ios_config "interface tun$b" "ip vrf for v$c" "ip addr 10.33.$a.2 255.255.255.252" ios_config "router ospf $c vrf v$c" "router-id 10.33.$a.2" "netw 10.0.0.0 0.255.255.255 ar 0" "capa vrf" } } proc trafficMultiplierAB { hops } { trafficMultiplierA $hops trafficMultiplierB $hops } trafficMultiplierAB 200