diff --git a/bgp-intro/lxc/fixnetwork.sh b/bgp-intro/lxc/fixnetwork.sh index 96d02bb..6e95859 100755 --- a/bgp-intro/lxc/fixnetwork.sh +++ b/bgp-intro/lxc/fixnetwork.sh @@ -1,161 +1,161 @@ #!/bin/sh -sed -i '/lxc.network/d' R*/config H*/config +sed -i '/lxc.net/d' R*/config H*/config cat <> H6/config -lxc.network.type = veth -lxc.network.flags = up -lxc.network.name = vlan2 -lxc.network.veth.pair = h6.2 -lxc.network.script.up = /etc/lxc/lxc-openvswitch -lxc.network.script.down = /etc/lxc/lxc-openvswitch -lxc.network.hwaddr = 02:00:0a:28:02:06 +lxc.net.0.type = veth +lxc.net.0.flags = up +lxc.net.0.name = vlan2 +lxc.net.0.veth.pair = h6.2 +lxc.net.0.script.up = /etc/lxc/lxc-openvswitch +lxc.net.0.script.down = /etc/lxc/lxc-openvswitch +lxc.net.0.hwaddr = 02:00:0a:28:02:06 EOF cat <> R0/config -lxc.network.type = veth -lxc.network.flags = up -lxc.network.name = vlan216 -lxc.network.veth.pair = r0.216 -lxc.network.script.up = /etc/lxc/lxc-openvswitch -lxc.network.script.down = /etc/lxc/lxc-openvswitch -lxc.network.hwaddr = 02:00:0a:28:d8:02 +lxc.net.0.type = veth +lxc.net.0.flags = up +lxc.net.0.name = vlan216 +lxc.net.0.veth.pair = r0.216 +lxc.net.0.script.up = /etc/lxc/lxc-openvswitch +lxc.net.0.script.down = /etc/lxc/lxc-openvswitch +lxc.net.0.hwaddr = 02:00:0a:28:d8:02 -lxc.network.type = veth -lxc.network.flags = up -lxc.network.name = vlan2 -lxc.network.veth.pair = r0.2 -lxc.network.script.up = /etc/lxc/lxc-openvswitch -lxc.network.script.down = /etc/lxc/lxc-openvswitch -lxc.network.hwaddr = 02:00:0a:28:02:01 +lxc.net.1.type = veth +lxc.net.1.flags = up +lxc.net.1.name = vlan2 +lxc.net.1.veth.pair = r0.2 +lxc.net.1.script.up = /etc/lxc/lxc-openvswitch +lxc.net.1.script.down = /etc/lxc/lxc-openvswitch +lxc.net.1.hwaddr = 02:00:0a:28:02:01 EOF cat <> H7/config -lxc.network.type = veth -lxc.network.flags = up -lxc.network.name = vlan3 -lxc.network.veth.pair = h7.3 -lxc.network.script.up = /etc/lxc/lxc-openvswitch -lxc.network.script.down = /etc/lxc/lxc-openvswitch -lxc.network.hwaddr = 02:00:0a:28:03:07 +lxc.net.0.type = veth +lxc.net.0.flags = up +lxc.net.0.name = vlan3 +lxc.net.0.veth.pair = h7.3 +lxc.net.0.script.up = /etc/lxc/lxc-openvswitch +lxc.net.0.script.down = /etc/lxc/lxc-openvswitch +lxc.net.0.hwaddr = 02:00:0a:28:03:07 EOF cat <> R1/config -lxc.network.type = veth -lxc.network.flags = up -lxc.network.name = vlan216 -lxc.network.veth.pair = r1.216 -lxc.network.script.up = /etc/lxc/lxc-openvswitch -lxc.network.script.down = /etc/lxc/lxc-openvswitch -lxc.network.hwaddr = 02:00:0a:28:d8:03 +lxc.net.0.type = veth +lxc.net.0.flags = up +lxc.net.0.name = vlan216 +lxc.net.0.veth.pair = r1.216 +lxc.net.0.script.up = /etc/lxc/lxc-openvswitch +lxc.net.0.script.down = /etc/lxc/lxc-openvswitch +lxc.net.0.hwaddr = 02:00:0a:28:d8:03 -lxc.network.type = veth -lxc.network.flags = up -lxc.network.name = vlan3 -lxc.network.veth.pair = r1.3 -lxc.network.script.up = /etc/lxc/lxc-openvswitch -lxc.network.script.down = /etc/lxc/lxc-openvswitch -lxc.network.hwaddr = 02:00:0a:28:03:01 +lxc.net.1.type = veth +lxc.net.1.flags = up +lxc.net.1.name = vlan3 +lxc.net.1.veth.pair = r1.3 +lxc.net.1.script.up = /etc/lxc/lxc-openvswitch +lxc.net.1.script.down = /etc/lxc/lxc-openvswitch +lxc.net.1.hwaddr = 02:00:0a:28:03:01 EOF cat <> R3/config -lxc.network.type = veth -lxc.network.flags = up -lxc.network.name = vlan216 -lxc.network.veth.pair = r3.216 -lxc.network.script.up = /etc/lxc/lxc-openvswitch -lxc.network.script.down = /etc/lxc/lxc-openvswitch -lxc.network.hwaddr = 02:00:0a:28:d8:01 +lxc.net.0.type = veth +lxc.net.0.flags = up +lxc.net.0.name = vlan216 +lxc.net.0.veth.pair = r3.216 +lxc.net.0.script.up = /etc/lxc/lxc-openvswitch +lxc.net.0.script.down = /etc/lxc/lxc-openvswitch +lxc.net.0.hwaddr = 02:00:0a:28:d8:01 -lxc.network.type = veth -lxc.network.flags = up -lxc.network.name = vlan217 -lxc.network.veth.pair = r3.217 -lxc.network.script.up = /etc/lxc/lxc-openvswitch -lxc.network.script.down = /etc/lxc/lxc-openvswitch -lxc.network.hwaddr = 02:00:0a:28:d9:10 +lxc.net.1.type = veth +lxc.net.1.flags = up +lxc.net.1.name = vlan217 +lxc.net.1.veth.pair = r3.217 +lxc.net.1.script.up = /etc/lxc/lxc-openvswitch +lxc.net.1.script.down = /etc/lxc/lxc-openvswitch +lxc.net.1.hwaddr = 02:00:0a:28:d9:10 EOF cat <> R10/config -lxc.network.type = veth -lxc.network.flags = up -lxc.network.name = vlan33 -lxc.network.veth.pair = r10.33 -lxc.network.script.up = /etc/lxc/lxc-openvswitch -lxc.network.script.down = /etc/lxc/lxc-openvswitch -lxc.network.hwaddr = 02:00:0a:28:21:01 +lxc.net.0.type = veth +lxc.net.0.flags = up +lxc.net.0.name = vlan33 +lxc.net.0.veth.pair = r10.33 +lxc.net.0.script.up = /etc/lxc/lxc-openvswitch +lxc.net.0.script.down = /etc/lxc/lxc-openvswitch +lxc.net.0.hwaddr = 02:00:0a:28:21:01 -lxc.network.type = veth -lxc.network.flags = up -lxc.network.name = vlan217 -lxc.network.veth.pair = r10.217 -lxc.network.script.up = /etc/lxc/lxc-openvswitch -lxc.network.script.down = /etc/lxc/lxc-openvswitch -lxc.network.hwaddr = 02:00:0a:28:d9:11 +lxc.net.1.type = veth +lxc.net.1.flags = up +lxc.net.1.name = vlan217 +lxc.net.1.veth.pair = r10.217 +lxc.net.1.script.up = /etc/lxc/lxc-openvswitch +lxc.net.1.script.down = /etc/lxc/lxc-openvswitch +lxc.net.1.hwaddr = 02:00:0a:28:d9:11 EOF cat <> R11/config -lxc.network.type = veth -lxc.network.flags = up -lxc.network.name = vlan33 -lxc.network.veth.pair = r11.33 -lxc.network.script.up = /etc/lxc/lxc-openvswitch -lxc.network.script.down = /etc/lxc/lxc-openvswitch -lxc.network.hwaddr = 02:00:0a:28:21:02 +lxc.net.0.type = veth +lxc.net.0.flags = up +lxc.net.0.name = vlan33 +lxc.net.0.veth.pair = r11.33 +lxc.net.0.script.up = /etc/lxc/lxc-openvswitch +lxc.net.0.script.down = /etc/lxc/lxc-openvswitch +lxc.net.0.hwaddr = 02:00:0a:28:21:02 -lxc.network.type = veth -lxc.network.flags = up -lxc.network.name = vlan48 -lxc.network.veth.pair = r11.48 -lxc.network.script.up = /etc/lxc/lxc-openvswitch -lxc.network.script.down = /etc/lxc/lxc-openvswitch -lxc.network.hwaddr = 02:00:0a:28:30:01 +lxc.net.1.type = veth +lxc.net.1.flags = up +lxc.net.1.name = vlan48 +lxc.net.1.veth.pair = r11.48 +lxc.net.1.script.up = /etc/lxc/lxc-openvswitch +lxc.net.1.script.down = /etc/lxc/lxc-openvswitch +lxc.net.1.hwaddr = 02:00:0a:28:30:01 EOF cat <> H19/config -lxc.network.type = veth -lxc.network.flags = up -lxc.network.name = vlan48 -lxc.network.veth.pair = h19.48 -lxc.network.script.up = /etc/lxc/lxc-openvswitch -lxc.network.script.down = /etc/lxc/lxc-openvswitch -lxc.network.hwaddr = 02:00:0a:28:34:13 +lxc.net.0.type = veth +lxc.net.0.flags = up +lxc.net.0.name = vlan48 +lxc.net.0.veth.pair = h19.48 +lxc.net.0.script.up = /etc/lxc/lxc-openvswitch +lxc.net.0.script.down = /etc/lxc/lxc-openvswitch +lxc.net.0.hwaddr = 02:00:0a:28:34:13 EOF cat <> R12/config -lxc.network.type = veth -lxc.network.flags = up -lxc.network.name = vlan33 -lxc.network.veth.pair = r12.33 -lxc.network.script.up = /etc/lxc/lxc-openvswitch -lxc.network.script.down = /etc/lxc/lxc-openvswitch -lxc.network.hwaddr = 02:00:0a:28:21:03 +lxc.net.0.type = veth +lxc.net.0.flags = up +lxc.net.0.name = vlan33 +lxc.net.0.veth.pair = r12.33 +lxc.net.0.script.up = /etc/lxc/lxc-openvswitch +lxc.net.0.script.down = /etc/lxc/lxc-openvswitch +lxc.net.0.hwaddr = 02:00:0a:28:21:03 -lxc.network.type = veth -lxc.network.flags = up -lxc.network.name = vlan36 -lxc.network.veth.pair = r12.36 -lxc.network.script.up = /etc/lxc/lxc-openvswitch -lxc.network.script.down = /etc/lxc/lxc-openvswitch -lxc.network.hwaddr = 02:00:0a:28:24:01 +lxc.net.1.type = veth +lxc.net.1.flags = up +lxc.net.1.name = vlan36 +lxc.net.1.veth.pair = r12.36 +lxc.net.1.script.up = /etc/lxc/lxc-openvswitch +lxc.net.1.script.down = /etc/lxc/lxc-openvswitch +lxc.net.1.hwaddr = 02:00:0a:28:24:01 EOF cat <> H34/config -lxc.network.type = veth -lxc.network.flags = up -lxc.network.name = vlan36 -lxc.network.veth.pair = h34.36 -lxc.network.script.up = /etc/lxc/lxc-openvswitch -lxc.network.script.down = /etc/lxc/lxc-openvswitch -lxc.network.hwaddr = 02:00:0a:28:24:22 +lxc.net.0.type = veth +lxc.net.0.flags = up +lxc.net.0.name = vlan36 +lxc.net.0.veth.pair = h34.36 +lxc.net.0.script.up = /etc/lxc/lxc-openvswitch +lxc.net.0.script.down = /etc/lxc/lxc-openvswitch +lxc.net.0.hwaddr = 02:00:0a:28:24:22 EOF