From 62f11b9ae2767b77c4bb2010bfd6cdc35287e698 Mon Sep 17 00:00:00 2001 From: Hans van Kranenburg Date: Tue, 11 Aug 2015 15:04:05 +0200 Subject: [PATCH] bgp-contd: lxc files --- bgp-contd/lxc/R0/rootfs/etc/bird/bird6.conf | 88 +++++++++++++ .../lxc/R0/rootfs/etc/network/interfaces | 18 +++ bgp-contd/lxc/R1/rootfs/etc/bird/bird6.conf | 118 +++++++++++++++++ .../lxc/R1/rootfs/etc/network/interfaces | 25 ++++ bgp-contd/lxc/R10/rootfs/etc/bird/bird6.conf | 118 +++++++++++++++++ .../lxc/R10/rootfs/etc/network/interfaces | 25 ++++ bgp-contd/lxc/R11/rootfs/etc/bird/bird6.conf | 88 +++++++++++++ .../lxc/R11/rootfs/etc/network/interfaces | 18 +++ bgp-contd/lxc/R12/rootfs/etc/bird/bird6.conf | 45 +++++++ .../lxc/R12/rootfs/etc/network/interfaces | 11 ++ bgp-contd/lxc/R2/rootfs/etc/bird/bird6.conf | 45 +++++++ .../lxc/R2/rootfs/etc/network/interfaces | 11 ++ bgp-contd/lxc/R20/rootfs/etc/bird/bird6.conf | 103 +++++++++++++++ .../lxc/R20/rootfs/etc/network/interfaces | 18 +++ bgp-contd/lxc/fixnetwork.sh | 123 ++++++++++++++++++ 15 files changed, 854 insertions(+) create mode 100644 bgp-contd/lxc/R0/rootfs/etc/bird/bird6.conf create mode 100644 bgp-contd/lxc/R0/rootfs/etc/network/interfaces create mode 100644 bgp-contd/lxc/R1/rootfs/etc/bird/bird6.conf create mode 100644 bgp-contd/lxc/R1/rootfs/etc/network/interfaces create mode 100644 bgp-contd/lxc/R10/rootfs/etc/bird/bird6.conf create mode 100644 bgp-contd/lxc/R10/rootfs/etc/network/interfaces create mode 100644 bgp-contd/lxc/R11/rootfs/etc/bird/bird6.conf create mode 100644 bgp-contd/lxc/R11/rootfs/etc/network/interfaces create mode 100644 bgp-contd/lxc/R12/rootfs/etc/bird/bird6.conf create mode 100644 bgp-contd/lxc/R12/rootfs/etc/network/interfaces create mode 100644 bgp-contd/lxc/R2/rootfs/etc/bird/bird6.conf create mode 100644 bgp-contd/lxc/R2/rootfs/etc/network/interfaces create mode 100644 bgp-contd/lxc/R20/rootfs/etc/bird/bird6.conf create mode 100644 bgp-contd/lxc/R20/rootfs/etc/network/interfaces create mode 100644 bgp-contd/lxc/fixnetwork.sh diff --git a/bgp-contd/lxc/R0/rootfs/etc/bird/bird6.conf b/bgp-contd/lxc/R0/rootfs/etc/bird/bird6.conf new file mode 100644 index 0000000..32864ac --- /dev/null +++ b/bgp-contd/lxc/R0/rootfs/etc/bird/bird6.conf @@ -0,0 +1,88 @@ +router id 10.0.0.0; + +log "/var/log/bird/bird6.log" all; +debug protocols { states, routes, filters, interfaces } + +protocol kernel { + import none; + export all; +} + +protocol device { + # defaults... +} + +protocol ospf { + area 0 { + # BIRD ignores the IPv6 lo because it has no link local address + stubnet 2001:db8::ff/128; + interface "ibgp" { + }; + interface "ebgp_r10" { + stub; + }; + }; +} + +protocol static { + import all; + route 2001:db8::/48 blackhole; +} + +############################################################################## +# BGP table +# + +# Use this routing table to gather external routes received via BGP which we +# want push to the kernel via our master table and to other routers in our AS +# via iBGP or even to other routers outside our AS again (transit), which can +# be connected here or to a router elsewhere on the border of our AS. + +table t_bgp; + +protocol pipe p_master_to_bgp { + table master; + peer table t_bgp; + import all; # default + export none; # default +} + +############################################################################## +# eBGP R10 +# + +table t_r10; + +protocol static originate_to_r10 { + table t_r10; + import all; # originate here + route 2001:db8::/48 blackhole; +} + +protocol bgp ebgp_r10 { + table t_r10; + local 2001:db8:0:3::ff as 65000; + neighbor 2001:db8:0:3::10 as 65010; + import all; + export all; +} + +protocol pipe p_bgp_to_r10 { + table t_bgp; + peer table t_r10; + import where proto = "ebgp_r10"; + export none; +} + +############################################################################## +# iBGP +# + +protocol bgp ibgp_r2 { + table t_bgp; + igp table master; + import none; + export all; + local 2001:db8::ff as 65000; + neighbor 2001:db8::2 as 65000; +} diff --git a/bgp-contd/lxc/R0/rootfs/etc/network/interfaces b/bgp-contd/lxc/R0/rootfs/etc/network/interfaces new file mode 100644 index 0000000..d1183c3 --- /dev/null +++ b/bgp-contd/lxc/R0/rootfs/etc/network/interfaces @@ -0,0 +1,18 @@ +auto lo +iface lo inet loopback + up ip addr add 2001:db8::ff/128 dev lo + down ip addr del 2001:db8::ff/128 dev lo + +auto ibgp +iface ibgp inet manual + up ip link set up dev ibgp + up ip addr add 2001:db8:0:1::ff/120 dev ibgp + down ip addr del 2001:db8:0:1::ff/120 dev ibgp + down ip link set down dev ibgp + +auto ebgp_r10 +iface ebgp_r10 inet manual + up ip link set up dev ebgp_r10 + up ip addr add 2001:db8:0:3::ff/120 dev ebgp_r10 + down ip addr del 2001:db8:0:3::ff/120 dev ebgp_r10 + down ip link set down dev ebgp_r10 diff --git a/bgp-contd/lxc/R1/rootfs/etc/bird/bird6.conf b/bgp-contd/lxc/R1/rootfs/etc/bird/bird6.conf new file mode 100644 index 0000000..4652e3f --- /dev/null +++ b/bgp-contd/lxc/R1/rootfs/etc/bird/bird6.conf @@ -0,0 +1,118 @@ +router id 10.0.0.1; + +log "/var/log/bird/bird6.log" all; +debug protocols { states, routes, filters, interfaces } + +protocol kernel { + import none; + export all; +} + +protocol device { + # defaults... +} + +protocol ospf { + area 0 { + # BIRD ignores the IPv6 lo because it has no link local address + stubnet 2001:db8::1/128; + interface "ibgp" { + }; + interface "ebgp_r11" { + stub; + }; + interface "ebgp_r20" { + stub; + }; + }; +} + +protocol static { + import all; + route 2001:db8::/48 blackhole; +} + +############################################################################## +# BGP table +# + +# Use this routing table to gather external routes received via BGP which we +# want push to the kernel via our master table and to other routers in our AS +# via iBGP or even to other routers outside our AS again (transit), which can +# be connected here or to a router elsewhere on the border of our AS. + +table t_bgp; + +protocol pipe p_master_to_bgp { + table master; + peer table t_bgp; + import all; # default + export none; # default +} + +############################################################################## +# eBGP R11 +# + +table t_r11; + +protocol static originate_to_r11 { + table t_r11; + import all; # originate here + route 2001:db8::/48 blackhole; +} + +protocol bgp ebgp_r11 { + table t_r11; + local 2001:db8:10:4::1 as 65000; + neighbor 2001:db8:10:4::11 as 65010; + import all; + export all; +} + +protocol pipe p_bgp_to_r11 { + table t_bgp; + peer table t_r11; + import where proto = "ebgp_r11"; + export none; +} + +############################################################################## +# eBGP R20 +# + +table t_r20; + +protocol static originate_to_r20 { + table t_r20; + import all; # originate here + route 2001:db8::/48 blackhole; +} + +protocol bgp ebgp_r20 { + table t_r20; + local 2001:db8:0:5::1 as 65000; + neighbor 2001:db8:0:5::20 as 65020; + import all; + export all; +} + +protocol pipe p_bgp_to_r20 { + table t_bgp; + peer table t_r20; + import where proto = "ebgp_r20"; + export none; +} + +############################################################################## +# iBGP +# + +protocol bgp ibgp_r2 { + table t_bgp; + igp table master; + import none; + export all; + local 2001:db8::1 as 65000; + neighbor 2001:db8::2 as 65000; +} diff --git a/bgp-contd/lxc/R1/rootfs/etc/network/interfaces b/bgp-contd/lxc/R1/rootfs/etc/network/interfaces new file mode 100644 index 0000000..23bcae9 --- /dev/null +++ b/bgp-contd/lxc/R1/rootfs/etc/network/interfaces @@ -0,0 +1,25 @@ +auto lo +iface lo inet loopback + up ip addr add 2001:db8::1/128 dev lo + down ip addr del 2001:db8::1/128 dev lo + +auto ibgp +iface ibgp inet manual + up ip link set up dev ibgp + up ip addr add 2001:db8:0:1::1/120 dev ibgp + down ip addr del 2001:db8:0:1::1/120 dev ibgp + down ip link set down dev ibgp + +auto ebgp_r11 +iface ebgp_r11 inet manual + up ip link set up dev ebgp_r11 + up ip addr add 2001:db8:10:4::1/120 dev ebgp_r11 + down ip addr del 2001:db8:10:4::1/120 dev ebgp_r11 + down ip link set down dev ebgp_r11 + +auto ebgp_r20 +iface ebgp_r20 inet manual + up ip link set up dev ebgp_r20 + up ip addr add 2001:db8:0:5::1/120 dev ebgp_r20 + down ip addr del 2001:db8:0:5::1/120 dev ebgp_r20 + down ip link set down dev ebgp_r20 diff --git a/bgp-contd/lxc/R10/rootfs/etc/bird/bird6.conf b/bgp-contd/lxc/R10/rootfs/etc/bird/bird6.conf new file mode 100644 index 0000000..abda240 --- /dev/null +++ b/bgp-contd/lxc/R10/rootfs/etc/bird/bird6.conf @@ -0,0 +1,118 @@ +router id 10.0.0.10; + +log "/var/log/bird/bird6.log" all; +debug protocols { states, routes, filters, interfaces } + +protocol kernel { + import none; + export all; +} + +protocol device { + # defaults... +} + +protocol ospf { + area 0 { + # BIRD ignores the IPv6 lo because it has no link local address + stubnet 2001:db8:10::10/128; + interface "ibgp" { + }; + interface "ebgp_r0" { + stub; + }; + interface "ebgp_r20" { + stub; + }; + }; +} + +protocol static { + import all; + route 2001:db8:10::/48 blackhole; +} + +############################################################################## +# BGP table +# + +# Use this routing table to gather external routes received via BGP which we +# want push to the kernel via our master table and to other routers in our AS +# via iBGP or even to other routers outside our AS again (transit), which can +# be connected here or to a router elsewhere on the border of our AS. + +table t_bgp; + +protocol pipe p_master_to_bgp { + table master; + peer table t_bgp; + import all; # default + export none; # default +} + +############################################################################## +# eBGP R0 +# + +table t_r0; + +protocol static originate_to_r0 { + table t_r0; + import all; # originate here + route 2001:db8:10::/48 blackhole; +} + +protocol bgp ebgp_r0 { + table t_r0; + local 2001:db8:0:3::10 as 65010; + neighbor 2001:db8:0:3::ff as 65000; + import all; + export all; +} + +protocol pipe p_bgp_to_r0 { + table t_bgp; + peer table t_r0; + import where proto = "ebgp_r0"; + export none; +} + +############################################################################## +# eBGP R20 +# + +table t_r20; + +protocol static originate_to_r20 { + table t_r20; + import all; # originate here + route 2001:db8:10::/48 blackhole; +} + +protocol bgp ebgp_r20 { + table t_r20; + local 2001:db8:10:6::10 as 65010; + neighbor 2001:db8:10:6::20 as 65020; + import all; + export all; +} + +protocol pipe p_bgp_to_r20 { + table t_bgp; + peer table t_r20; + import where proto = "ebgp_r20"; + export none; +} + +############################################################################## +# iBGP +# + +protocol bgp ibgp_r12 { + table t_bgp; + igp table master; + import none; + export all; + local 2001:db8:10::10 as 65010; + neighbor 2001:db8:10::12 as 65010; +} diff --git a/bgp-contd/lxc/R10/rootfs/etc/network/interfaces b/bgp-contd/lxc/R10/rootfs/etc/network/interfaces new file mode 100644 index 0000000..fd6fe77 --- /dev/null +++ b/bgp-contd/lxc/R10/rootfs/etc/network/interfaces @@ -0,0 +1,25 @@ +auto lo +iface lo inet loopback + up ip addr add 2001:db8:10::10/128 dev lo + down ip addr del 2001:db8:10::10/128 dev lo + +auto ibgp +iface ibgp inet manual + up ip link set up dev ibgp + up ip addr add 2001:db8:10:2::10/120 dev ibgp + down ip addr del 2001:db8:10:2::10/120 dev ibgp + down ip link set down dev ibgp + +auto ebgp_r0 +iface ebgp_r0 inet manual + up ip link set up dev ebgp_r0 + up ip addr add 2001:db8:0:3::10/120 dev ebgp_r0 + down ip addr del 2001:db8:0:3::10/120 dev ebgp_r0 + down ip link set down dev ebgp_r0 + +auto ebgp_r20 +iface ebgp_r20 inet manual + up ip link set up dev ebgp_r20 + up ip addr add 2001:db8:10:6::10/120 dev ebgp_r20 + down ip addr del 2001:db8:10:6::10/120 dev ebgp_r20 + down ip link set down dev ebgp_r20 diff --git a/bgp-contd/lxc/R11/rootfs/etc/bird/bird6.conf b/bgp-contd/lxc/R11/rootfs/etc/bird/bird6.conf new file mode 100644 index 0000000..076ff3a --- /dev/null +++ b/bgp-contd/lxc/R11/rootfs/etc/bird/bird6.conf @@ -0,0 +1,88 @@ +router id 10.0.0.11; + +log "/var/log/bird/bird6.log" all; +debug protocols { states, routes, filters, interfaces } + +protocol kernel { + import none; + export all; +} + +protocol device { + # defaults... +} + +protocol ospf { + area 0 { + # BIRD ignores the IPv6 lo because it has no link local address + stubnet 2001:db8:10::11/128; + interface "ibgp" { + }; + interface "ebgp_r1" { + stub; + }; + }; +} + +protocol static { + import all; + route 2001:db8:10::/48 blackhole; +} + +############################################################################## +# BGP table +# + +# Use this routing table to gather external routes received via BGP which we +# want push to the kernel via our master table and to other routers in our AS +# via iBGP or even to other routers outside our AS again (transit), which can +# be connected here or to a router elsewhere on the border of our AS. + +table t_bgp; + +protocol pipe p_master_to_bgp { + table master; + peer table t_bgp; + import all; # default + export none; # default +} + +############################################################################## +# eBGP R1 +# + +table t_r1; + +protocol static originate_to_r1 { + table t_r1; + import all; # originate here + route 2001:db8:10::/48 blackhole; +} + +protocol bgp ebgp_r1 { + table t_r1; + local 2001:db8:10:4::11 as 65010; + neighbor 2001:db8:10:4::1 as 65000; + import all; + export all; +} + +protocol pipe p_bgp_to_r1 { + table t_bgp; + peer table t_r1; + import where proto = "ebgp_r1"; + export none; +} + +############################################################################## +# iBGP +# + +protocol bgp ibgp_r12 { + table t_bgp; + igp table master; + import none; + export all; + local 2001:db8:10::11 as 65010; + neighbor 2001:db8:10::12 as 65010; +} diff --git a/bgp-contd/lxc/R11/rootfs/etc/network/interfaces b/bgp-contd/lxc/R11/rootfs/etc/network/interfaces new file mode 100644 index 0000000..fb1f234 --- /dev/null +++ b/bgp-contd/lxc/R11/rootfs/etc/network/interfaces @@ -0,0 +1,18 @@ +auto lo +iface lo inet loopback + up ip addr add 2001:db8:10::11/128 dev lo + down ip addr del 2001:db8:10::11/128 dev lo + +auto ibgp +iface ibgp inet manual + up ip link set up dev ibgp + up ip addr add 2001:db8:10:2::11/120 dev ibgp + down ip addr del 2001:db8:10:2::11/120 dev ibgp + down ip link set down dev ibgp + +auto ebgp_r1 +iface ebgp_r1 inet manual + up ip link set up dev ebgp_r1 + up ip addr add 2001:db8:10:4::11/120 dev ebgp_r1 + down ip addr del 2001:db8:10:4::11/120 dev ebgp_r1 + down ip link set down dev ebgp_r1 diff --git a/bgp-contd/lxc/R12/rootfs/etc/bird/bird6.conf b/bgp-contd/lxc/R12/rootfs/etc/bird/bird6.conf new file mode 100644 index 0000000..b151027 --- /dev/null +++ b/bgp-contd/lxc/R12/rootfs/etc/bird/bird6.conf @@ -0,0 +1,45 @@ +router id 10.0.0.12; + +log "/var/log/bird/bird6.log" all; +debug protocols { states, routes, filters, interfaces } + +protocol kernel { + import none; + export all; +} + +protocol device { + # defaults... +} + +protocol ospf { + area 0 { + # BIRD ignores the IPv6 lo because it has no link local address + stubnet 2001:db8:10::12/128; + interface "ibgp" { + }; + }; +} + +protocol static { + import all; + route 2001:db8:10::/48 blackhole; +} + +############################################################################## +# iBGP +# + +protocol bgp ibgp_r10 { + import all; + export none; + local 2001:db8:10::12 as 65010; + neighbor 2001:db8:10::10 as 65010; +} + +protocol bgp ibgp_r11 { + import all; + export none; + local 2001:db8:10::12 as 65010; + neighbor 2001:db8:10::11 as 65010; +} diff --git a/bgp-contd/lxc/R12/rootfs/etc/network/interfaces b/bgp-contd/lxc/R12/rootfs/etc/network/interfaces new file mode 100644 index 0000000..4f2b4c2 --- /dev/null +++ b/bgp-contd/lxc/R12/rootfs/etc/network/interfaces @@ -0,0 +1,11 @@ +auto lo +iface lo inet loopback + up ip addr add 2001:db8:10::12/128 dev lo + down ip addr del 2001:db8:10::12/128 dev lo + +auto ibgp +iface ibgp inet manual + up ip link set up dev ibgp + up ip addr add 2001:db8:10:2::12/120 dev ibgp + down ip addr del 2001:db8:10:2::12/120 dev ibgp + down ip link set down dev ibgp diff --git a/bgp-contd/lxc/R2/rootfs/etc/bird/bird6.conf b/bgp-contd/lxc/R2/rootfs/etc/bird/bird6.conf new file mode 100644 index 0000000..65b66e9 --- /dev/null +++ b/bgp-contd/lxc/R2/rootfs/etc/bird/bird6.conf @@ -0,0 +1,45 @@ +router id 10.0.0.2; + +log "/var/log/bird/bird6.log" all; +debug protocols { states, routes, filters, interfaces } + +protocol kernel { + import none; + export all; +} + +protocol device { + # defaults... +} + +protocol ospf { + area 0 { + # BIRD ignores the IPv6 lo because it has no link local address + stubnet 2001:db8::2/128; + interface "ibgp" { + }; + }; +} + +protocol static { + import all; + route 2001:db8::/48 blackhole; +} + +############################################################################## +# iBGP +# + +protocol bgp ibgp_r0 { + import all; + export none; + local 2001:db8::2 as 65000; + neighbor 2001:db8::ff as 65000; +} + +protocol bgp ibgp_r1 { + import all; + export none; + local 2001:db8::2 as 65000; + neighbor 2001:db8::1 as 65000; +} diff --git a/bgp-contd/lxc/R2/rootfs/etc/network/interfaces b/bgp-contd/lxc/R2/rootfs/etc/network/interfaces new file mode 100644 index 0000000..1a75462 --- /dev/null +++ b/bgp-contd/lxc/R2/rootfs/etc/network/interfaces @@ -0,0 +1,11 @@ +auto lo +iface lo inet loopback + up ip addr add 2001:db8::2/128 dev lo + down ip addr del 2001:db8::2/128 dev lo + +auto ibgp +iface ibgp inet manual + up ip link set up dev ibgp + up ip addr add 2001:db8:0:1::2/120 dev ibgp + down ip addr del 2001:db8:0:1::2/120 dev ibgp + down ip link set down dev ibgp diff --git a/bgp-contd/lxc/R20/rootfs/etc/bird/bird6.conf b/bgp-contd/lxc/R20/rootfs/etc/bird/bird6.conf new file mode 100644 index 0000000..03341e7 --- /dev/null +++ b/bgp-contd/lxc/R20/rootfs/etc/bird/bird6.conf @@ -0,0 +1,103 @@ +router id 10.0.0.20; + +log "/var/log/bird/bird6.log" all; +debug protocols { states, routes, filters, interfaces } + +protocol kernel { + import none; + export all; +} + +protocol device { + # defaults... +} + +protocol ospf { + area 0 { + # BIRD ignores the IPv6 lo because it has no link local address + stubnet 2001:db8:20::20/128; + interface "ebgp_r1" { + stub; + }; + interface "ebgp_r10" { + stub; + }; + }; +} + +protocol static { + import all; + route 2001:db8:20::/48 blackhole; +} + +############################################################################## +# BGP table +# + +# Use this routing table to gather external routes received via BGP which we +# want push to the kernel via our master table and to other routers in our AS +# via iBGP or even to other routers outside our AS again (transit), which can +# be connected here or to a router elsewhere on the border of our AS. + +table t_bgp; + +protocol pipe p_master_to_bgp { + table master; + peer table t_bgp; + import all; # default + export none; # default +} + +############################################################################## +# eBGP R1 +# + +table t_r1; + +protocol static originate_to_r1 { + table t_r1; + import all; # originate here + route 2001:db8:20::/48 blackhole; +} + +protocol bgp ebgp_r1 { + table t_r1; + local 2001:db8:0:5::20 as 65020; + neighbor 2001:db8:0:5::1 as 65000; + import all; + export all; +} + +protocol pipe p_bgp_to_r1 { + table t_bgp; + peer table t_r1; + import where proto = "ebgp_r1"; + export none; +} + +############################################################################## +# eBGP R10 +# + +table t_r10; + +protocol static originate_to_r10 { + table t_r10; + import all; # originate here + route 2001:db8:20::/48 blackhole; +} + +protocol bgp ebgp_r10 { + table t_r10; + local 2001:db8:10:6::20 as 65020; + neighbor 2001:db8:10:6::10 as 65010; + import all; + export all; +} + +protocol pipe p_bgp_to_r10 { + table t_bgp; + peer table t_r10; + import where proto = "ebgp_r10"; + export none; +} diff --git a/bgp-contd/lxc/R20/rootfs/etc/network/interfaces b/bgp-contd/lxc/R20/rootfs/etc/network/interfaces new file mode 100644 index 0000000..c97b429 --- /dev/null +++ b/bgp-contd/lxc/R20/rootfs/etc/network/interfaces @@ -0,0 +1,18 @@ +auto lo +iface lo inet loopback + up ip addr add 2001:db8:20::20/128 dev lo + down ip addr del 2001:db8:20::20/128 dev lo + +auto ebgp_r1 +iface ebgp_r1 inet manual + up ip link set up dev ebgp_r1 + up ip addr add 2001:db8:0:5::20/120 dev ebgp_r1 + down ip addr del 2001:db8:0:5::20/120 dev ebgp_r1 + down ip link set down dev ebgp_r1 + +auto ebgp_r10 +iface ebgp_r10 inet manual + up ip link set up dev ebgp_r10 + up ip addr add 2001:db8:10:6::20/120 dev ebgp_r10 + down ip addr del 2001:db8:10:6::20/120 dev ebgp_r10 + down ip link set down dev ebgp_r10 diff --git a/bgp-contd/lxc/fixnetwork.sh b/bgp-contd/lxc/fixnetwork.sh new file mode 100644 index 0000000..e4fe365 --- /dev/null +++ b/bgp-contd/lxc/fixnetwork.sh @@ -0,0 +1,123 @@ +#!/bin/sh + +sed -i '/lxc.network/d' R*/config + +cat <> R0/config + +lxc.network.type = veth +lxc.network.flags = up +lxc.network.name = ibgp +lxc.network.veth.pair = r0.1 +lxc.network.script.up = /etc/lxc/lxc-openvswitch +lxc.network.script.down = /etc/lxc/lxc-openvswitch + +lxc.network.type = veth +lxc.network.flags = up +lxc.network.name = ebgp_r10 +lxc.network.veth.pair = r0.3 +lxc.network.script.up = /etc/lxc/lxc-openvswitch +lxc.network.script.down = /etc/lxc/lxc-openvswitch +EOF + +cat <> R1/config + +lxc.network.type = veth +lxc.network.flags = up +lxc.network.name = ibgp +lxc.network.veth.pair = r1.1 +lxc.network.script.up = /etc/lxc/lxc-openvswitch +lxc.network.script.down = /etc/lxc/lxc-openvswitch + +lxc.network.type = veth +lxc.network.flags = up +lxc.network.name = ebgp_r11 +lxc.network.veth.pair = r1.4 +lxc.network.script.up = /etc/lxc/lxc-openvswitch +lxc.network.script.down = /etc/lxc/lxc-openvswitch + +lxc.network.type = veth +lxc.network.flags = up +lxc.network.name = ebgp_r20 +lxc.network.veth.pair = r1.5 +lxc.network.script.up = /etc/lxc/lxc-openvswitch +lxc.network.script.down = /etc/lxc/lxc-openvswitch +EOF + +cat <> R2/config + +lxc.network.type = veth +lxc.network.flags = up +lxc.network.name = ibgp +lxc.network.veth.pair = r2.1 +lxc.network.script.up = /etc/lxc/lxc-openvswitch +lxc.network.script.down = /etc/lxc/lxc-openvswitch +EOF + +cat <> R10/config + +lxc.network.type = veth +lxc.network.flags = up +lxc.network.name = ibgp +lxc.network.veth.pair = r10.2 +lxc.network.script.up = /etc/lxc/lxc-openvswitch +lxc.network.script.down = /etc/lxc/lxc-openvswitch + +lxc.network.type = veth +lxc.network.flags = up +lxc.network.name = ebgp_r0 +lxc.network.veth.pair = r10.3 +lxc.network.script.up = /etc/lxc/lxc-openvswitch +lxc.network.script.down = /etc/lxc/lxc-openvswitch + +lxc.network.type = veth +lxc.network.flags = up +lxc.network.name = ebgp_r20 +lxc.network.veth.pair = r10.6 +lxc.network.script.up = /etc/lxc/lxc-openvswitch +lxc.network.script.down = /etc/lxc/lxc-openvswitch +EOF + +cat <> R11/config + +lxc.network.type = veth +lxc.network.flags = up +lxc.network.name = ibgp +lxc.network.veth.pair = r11.2 +lxc.network.script.up = /etc/lxc/lxc-openvswitch +lxc.network.script.down = /etc/lxc/lxc-openvswitch + +lxc.network.type = veth +lxc.network.flags = up +lxc.network.name = ebgp_r1 +lxc.network.veth.pair = r11.4 +lxc.network.script.up = /etc/lxc/lxc-openvswitch +lxc.network.script.down = /etc/lxc/lxc-openvswitch +EOF + +cat <> R12/config + +lxc.network.type = veth +lxc.network.flags = up +lxc.network.name = ibgp +lxc.network.veth.pair = r12.2 +lxc.network.script.up = /etc/lxc/lxc-openvswitch +lxc.network.script.down = /etc/lxc/lxc-openvswitch +EOF + +cat <> R20/config + +lxc.network.type = veth +lxc.network.flags = up +lxc.network.name = ebgp_r1 +lxc.network.veth.pair = r20.5 +lxc.network.script.up = /etc/lxc/lxc-openvswitch +lxc.network.script.down = /etc/lxc/lxc-openvswitch + +lxc.network.type = veth +lxc.network.flags = up +lxc.network.name = ebgp_r10 +lxc.network.veth.pair = r20.6 +lxc.network.script.up = /etc/lxc/lxc-openvswitch +lxc.network.script.down = /etc/lxc/lxc-openvswitch +EOF +