eBGP sorted and iBGP mostly done for PWNETS

This commit is contained in:
root 2020-09-05 23:51:41 +10:00
parent 32d0faadfe
commit 1ccb20421d
36 changed files with 959 additions and 24 deletions

View File

@ -15,3 +15,12 @@ lxc.arch = amd64
lxc.pty.max = 1024
lxc.rootfs.path = btrfs:/var/lib/lxc/PWHAE/rootfs
lxc.uts.name = PWHAE
lxc.net.0.type = veth
lxc.net.0.flags = up
lxc.net.0.name = vlan2215
lxc.net.0.veth.pair = pwhae.2215
lxc.net.0.script.up = /etc/lxc/lxc-openvswitch
lxc.net.0.script.down = /etc/lxc/lxc-openvswitch

View File

@ -0,0 +1,7 @@
auto lo
iface lo inet loopback
auto vlan2215
#iface vlan2215 inet dhcp
iface vlan2215 inet6 auto

View File

@ -15,3 +15,10 @@ lxc.arch = amd64
lxc.pty.max = 1024
lxc.rootfs.path = btrfs:/var/lib/lxc/PWHAF/rootfs
lxc.uts.name = PWHAF
lxc.net.0.type = veth
lxc.net.0.flags = up
lxc.net.0.name = vlan2217
lxc.net.0.veth.pair = pwhaf.2217
lxc.net.0.script.up = /etc/lxc/lxc-openvswitch
lxc.net.0.script.down = /etc/lxc/lxc-openvswitch

View File

@ -0,0 +1,7 @@
auto lo
iface lo inet loopback
up ip addr add 2001:db8:2b::40 dev lo
auto vlan2217
iface vlan2217 inet dhcp
iface vlan2217 inet6 auto

View File

@ -2,7 +2,6 @@ auto lo
iface lo inet loopback
auto vlan2015
iface vlan2001 inet dhcp
iface vlan2015 inet dhcp
iface vlan2015 inet6 auto

View File

@ -15,3 +15,26 @@ lxc.arch = amd64
lxc.pty.max = 1024
lxc.rootfs.path = btrfs:/var/lib/lxc/PWR10/rootfs
lxc.uts.name = PWR10
lxc.net.0.type = veth
lxc.net.0.flags = up
lxc.net.0.name = vlan2220
lxc.net.0.veth.pair = pwr10.2220
lxc.net.0.script.up = /etc/lxc/lxc-openvswitch
lxc.net.0.script.down = /etc/lxc/lxc-openvswitch
lxc.net.1.type = veth
lxc.net.1.flags = up
lxc.net.1.name = vlan2212
lxc.net.1.veth.pair = pwr10.2212
lxc.net.1.script.up = /etc/lxc/lxc-openvswitch
lxc.net.1.script.down = /etc/lxc/lxc-openvswitch
lxc.net.2.type = veth
lxc.net.2.flags = up
lxc.net.2.name = vlan2213
lxc.net.2.veth.pair = pwr10.2213
lxc.net.2.script.up = /etc/lxc/lxc-openvswitch
lxc.net.2.script.down = /etc/lxc/lxc-openvswitch

View File

@ -0,0 +1,30 @@
router id 172.16.16.10;
log "/var/log/bird/bird.log" all;
debug protocols { states, routes, filters, interfaces }
protocol kernel {
import none;
export all;
}
protocol device {
# defaults...
}
protocol ospf {
area 0 {
interface "lo" {
stub;
};
interface "vlan2212" {
stub;
};
interface "vlan2213" {
stub;
};
interface "vlan2220" {
};
};
};

View File

@ -0,0 +1,37 @@
router id 172.16.16.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 {
interface "lo" {
stub;
};
interface "vlan2212" {
stub;
};
interface "vlan2213" {
stub;
};
interface "vlan2220" {
};
};
};
protocol bgp ibgp_r60 {
neighbor 2400:5000:6148:2af0::60 as 65044;
local 2400:5000:6148:2af0::10 as 65044;
}

View File

@ -0,0 +1,29 @@
auto lo
iface lo inet loopback
up ip addr add 2001:db8:2b::10 dev lo
auto vlan2220
iface vlan2220 inet manual
up ip link set up dev vlan2220
up ip addr add 172.16.220.10/24 brd + dev vlan2220
up ip addr add 2400:5000:6148:2af0::10/64 dev vlan2220
down ip addr del 2400:5000:6148:2af0::10/64 dev vlan2220
down ip addr del 172.16.220.10/24 dev vlan2220
down ip link set down dev vlan2220
iface vlan2212 inet manual
up ip link set up dev vlan2212
up ip addr add 172.16.212.1/24 brd + dev vlan2212
up ip addr add 2400:5000:6148:2aaa::1/64 dev vlan2212
down ip addr del 2400:5000:6148:2aaa::1/64 dev vlan2212
down ip addr del 172.16.212.1/24 dev vlan2212
down ip link set down dev vlan2212
iface vlan2213 inet manual
up ip link set up dev vlan2213
up ip addr add 172.16.213.1/24 brd + dev vlan2213
up ip addr add 2400:5000:6148:2aab::1/64 dev vlan2213
down ip addr del 2400:5000:6148:2aab::1/64 dev vlan2213
down ip addr del 172.16.213.1/24 dev vlan2213
down ip link set down dev vlan2213

View File

@ -30,4 +30,8 @@ protocol ospf {
};
};
protocol bgp ibgp_r5 {
local 2400:5000:6148:2ab1::15 as 64090;
neighbor 2400:5000:6148:2ab1::5 as 64090;
}

View File

@ -15,3 +15,24 @@ lxc.arch = amd64
lxc.pty.max = 1024
lxc.rootfs.path = btrfs:/var/lib/lxc/PWR20/rootfs
lxc.uts.name = PWR20
lxc.net.0.type = veth
lxc.net.0.flags = up
lxc.net.0.name = vlan2220
lxc.net.0.veth.pair = pwr20.2220
lxc.net.0.script.up = /etc/lxc/lxc-openvswitch
lxc.net.0.script.down = /etc/lxc/lxc-openvswitch
lxc.net.1.type = veth
lxc.net.1.flags = up
lxc.net.1.name = vlan2223
lxc.net.1.veth.pair = pwr20.2223
lxc.net.1.script.up = /etc/lxc/lxc-openvswitch
lxc.net.1.script.down = /etc/lxc/lxc-openvswitch
lxc.net.2.type = veth
lxc.net.2.flags = up
lxc.net.2.name = vlan2222
lxc.net.2.veth.pair = pwr20.2222
lxc.net.2.script.up = /etc/lxc/lxc-openvswitch
lxc.net.2.script.down = /etc/lxc/lxc-openvswitch

View File

@ -0,0 +1,28 @@
router id 172.16.16.20;
log "/var/log/bird/bird.log" all;
debug protocols { states, routes, filters, interfaces }
protocol kernel {
import none;
export all;
}
protocol device {
# defaults...
}
protocol ospf {
area 0 {
interface "lo" {
stub;
};
interface "vlan2220" {
};
interface "vlan2223" {
};
interface "vlan2222" {
};
};
};

View File

@ -0,0 +1,36 @@
router id 172.16.16.20;
log "/var/log/bird/bird.log" all;
debug protocols { states, routes, filters, interfaces }
protocol kernel {
import none;
export all;
}
protocol device {
# defaults...
}
protocol ospf {
area 0 {
interface "lo" {
stub;
};
interface "vlan2220" {
};
interface "vlan2223" {
};
interface "vlan2222" {
};
};
};
protocol bgp ibgp_r60 {
local 2400:5000:6148:2af0::20 as 65044;
neighbor 2400:5000:6148:2af0::60 as 65044;
}

View File

@ -0,0 +1,29 @@
auto lo
iface lo inet loopback
up ip addr add 2001:db8:2b::10 dev lo
auto vlan2220
iface vlan2220 inet manual
up ip link set up dev vlan2220
up ip addr add 172.16.220.20/24 brd + dev vlan2220
up ip addr add 2400:5000:6148:2af0::20/64 dev vlan2220
down ip addr del 2400:5000:6148:2af0::20/64 dev vlan2220
down ip addr del 172.16.220.20/24 dev vlan2220
down ip link set down dev vlan2220
iface vlan2222 inet manual
up ip link set up dev vlan2222
up ip addr add 172.16.222.20/24 brd + dev vlan2222
up ip addr add 2400:5000:6148:2af1::20/64 dev vlan2222
down ip addr del 2400:5000:6148:2af1::20/64 dev vlan2222
down ip addr del 172.16.222.20/24 dev vlan2222
down ip link set down dev vlan2222
iface vlan2223 inet manual
up ip link set up dev vlan2223
up ip addr add 172.16.223.20/24 brd + dev vlan2223
up ip addr add 2400:5000:6148:2af2::20/64 dev vlan2223
down ip addr del 2400:5000:6148:2af2::20/64 dev vlan2223
down ip addr del 172.16.223.20/24 dev vlan2223
down ip link set down dev vlan2223

View File

@ -28,4 +28,7 @@ protocol ospf {
};
};
protocol bgp ibgp_r5 {
local 2400:5000:6148:2ab2::20 as 64090;
neighbor 2400:5000:6148:2ab1::5 as 64090;
}

View File

@ -15,3 +15,24 @@ lxc.arch = amd64
lxc.pty.max = 1024
lxc.rootfs.path = btrfs:/var/lib/lxc/PWR30/rootfs
lxc.uts.name = PWR30
lxc.net.0.type = veth
lxc.net.0.flags = up
lxc.net.0.name = vlan2223
lxc.net.0.veth.pair = pwr30.2223
lxc.net.0.script.up = /etc/lxc/lxc-openvswitch
lxc.net.0.script.down = /etc/lxc/lxc-openvswitch
lxc.net.1.type = veth
lxc.net.1.flags = up
lxc.net.1.name = vlan2222
lxc.net.1.veth.pair = pwr30.2222
lxc.net.1.script.up = /etc/lxc/lxc-openvswitch
lxc.net.1.script.down = /etc/lxc/lxc-openvswitch
lxc.net.2.type = veth
lxc.net.2.flags = up
lxc.net.2.name = vlan2216
lxc.net.2.veth.pair = pwr30.2216
lxc.net.2.script.up = /etc/lxc/lxc-openvswitch
lxc.net.2.script.down = /etc/lxc/lxc-openvswitch

View File

@ -0,0 +1,29 @@
router id 172.16.16.30;
log "/var/log/bird/bird.log" all;
debug protocols { states, routes, filters, interfaces }
protocol kernel {
import none;
export all;
}
protocol device {
# defaults...
}
protocol ospf {
area 0 {
interface "lo" {
stub;
};
interface "vlan2223" {
};
interface "vlan2222" {
};
interface "vlan2216" {
stub;
};
};
};

View File

@ -0,0 +1,29 @@
router id 172.16.16.30;
log "/var/log/bird/bird.log" all;
debug protocols { states, routes, filters, interfaces }
protocol kernel {
import none;
export all;
}
protocol device {
# defaults...
}
protocol ospf {
area 0 {
interface "lo" {
stub;
};
interface "vlan2223" {
};
interface "vlan2222" {
};
interface "vlan2216" {
stub;
};
};
};

View File

@ -0,0 +1,27 @@
auto lo
iface lo inet loopback
up ip addr add 2001:db8:2b::10 dev lo
iface vlan2223 inet manual
up ip link set up dev vlan2223
up ip addr add 172.16.223.30/24 brd + dev vlan2223
up ip addr add 2400:5000:6148:2af2::30/64 dev vlan2223
down ip addr del 2400:5000:6148:2af2::30/64 dev vlan2223
down ip addr del 172.16.223.30/24 dev vlan2223
down ip link set down dev vlan2223
iface vlan2222 inet manual
up ip link set up dev vlan2222
up ip addr add 172.16.222.30/24 brd + dev vlan2222
up ip addr add 2400:5000:6148:2af1::30/64 dev vlan2222
down ip addr del 2400:5000:6148:2af1::30/64 dev vlan2222
down ip addr del 172.16.222.30/24 dev vlan2222
down ip link set down dev vlan2222
iface vlan2216 inet manual
up ip link set up dev vlan2216
up ip addr add 172.16.216.1/24 brd + dev vlan2216
up ip addr add 2400:5000:6148:2aac::1/64 dev vlan2216
down ip addr del 2400:5000:6148:2aac::1/64 dev vlan2216
down ip addr del 172.16.216.1/24 dev vlan2216
down ip link set down dev vlan2216

View File

@ -30,4 +30,8 @@ protocol ospf {
};
};
protocol bgp ibgp_r5 {
local 2400:5000:6148:2ab3::35 as 64090;
neighbor 2400:5000:6148:2ab3::5 as 64090;
}

View File

@ -15,3 +15,24 @@ lxc.arch = amd64
lxc.pty.max = 1024
lxc.rootfs.path = btrfs:/var/lib/lxc/PWR40/rootfs
lxc.uts.name = PWR40
lxc.net.0.type = veth
lxc.net.0.flags = up
lxc.net.0.name = vlan2221
lxc.net.0.veth.pair = pwr40.2221
lxc.net.0.script.up = /etc/lxc/lxc-openvswitch
lxc.net.0.script.down = /etc/lxc/lxc-openvswitch
lxc.net.1.type = veth
lxc.net.1.flags = up
lxc.net.1.name = vlan2222
lxc.net.1.veth.pair = pwr40.2222
lxc.net.1.script.up = /etc/lxc/lxc-openvswitch
lxc.net.1.script.down = /etc/lxc/lxc-openvswitch
lxc.net.2.type = veth
lxc.net.2.flags = up
lxc.net.2.name = vlan2217
lxc.net.2.veth.pair = pwr40.2217
lxc.net.2.script.up = /etc/lxc/lxc-openvswitch
lxc.net.2.script.down = /etc/lxc/lxc-openvswitch

View File

@ -0,0 +1,29 @@
router id 172.16.16.40;
log "/var/log/bird/bird.log" all;
debug protocols { states, routes, filters, interfaces }
protocol kernel {
import none;
export all;
}
protocol device {
# defaults...
}
protocol ospf {
area 0 {
interface "lo" {
stub;
};
interface "vlan2221" {
};
interface "vlan2222" {
};
interface "vlan2217" {
stub;
};
};
};

View File

@ -0,0 +1,35 @@
router id 172.16.16.40;
log "/var/log/bird/bird.log" all;
debug protocols { states, routes, filters, interfaces }
protocol kernel {
import none;
export all;
}
protocol device {
# defaults...
}
protocol ospf {
area 0 {
interface "lo" {
stub;
};
interface "vlan2221" {
};
interface "vlan2222" {
};
interface "vlan2217" {
stub;
};
};
};
protocol bgp ibgp_r60 {
neighbor 2400:5000:6148:2af3::60 as 65044;
local 2400:5000:6148:2af3::40 as 65044;
}

View File

@ -0,0 +1,27 @@
auto lo
iface lo inet loopback
up ip addr add 2001:db8:2b::40 dev lo
iface vlan2221 inet manual
up ip link set up dev vlan2221
up ip addr add 172.16.221.40/24 brd + dev vlan2221
up ip addr add 2400:5000:6148:2af3::40/64 dev vlan2221
down ip addr del 2400:5000:6148:2af3::40/64 dev vlan2221
down ip addr del 172.16.221.40/24 dev vlan2221
down ip link set down dev vlan2221
iface vlan2222 inet manual
up ip link set up dev vlan2222
up ip addr add 172.16.222.40/24 brd + dev vlan2222
up ip addr add 2400:5000:6148:2af1::40/64 dev vlan2222
down ip addr del 2400:5000:6148:2af1::40/64 dev vlan2222
down ip addr del 172.16.222.40/24 dev vlan2222
down ip link set down dev vlan2222
iface vlan2217 inet manual
up ip link set up dev vlan2217
up ip addr add 172.16.217.1/24 brd + dev vlan2217
up ip addr add 2400:5000:6148:2aaf::1/64 dev vlan2217
down ip addr del 2400:5000:6148:2aaf::1/64 dev vlan2217
down ip addr del 172.16.217.1/24 dev vlan2217
down ip link set down dev vlan2217

View File

@ -30,4 +30,9 @@ protocol ospf {
};
};
protocol bgp ibgp_r5 {
local 2400:5000:6148:2ab1::45 as 64090;
neighbor 2400:5000:6148:2ab1::5 as 64090;
}

View File

@ -17,16 +17,10 @@ lxc.rootfs.path = btrfs:/var/lib/lxc/PWR5/rootfs
lxc.uts.name = PWR5
lxc.net.0.type = veth
lxc.net.0.flags = up
lxc.net.0.name = vlan10
lxc.net.0.veth.pair = r5.10
lxc.net.0.name = vlan2100
lxc.net.0.veth.pair = r5.2100
lxc.net.0.script.up = /etc/lxc/lxc-openvswitch
lxc.net.0.script.down = /etc/lxc/lxc-openvswitch

View File

@ -4,26 +4,105 @@ log "/var/log/bird/bird6.log" all;
debug protocols { states, routes, filters, interfaces }
protocol kernel {
import none;
#import none;
export all;
learn;
preference 254;
}
protocol device {
# defaults...
scan time 10;
}
protocol direct {
interface "vlan2100";
};
filter ospfexport {
if (source = RTS_DEVICE) || (net = 0.0.0.0/0)
then accept;
else reject;
};
protocol ospf {
export filter ospfexport;
import all;
area 0 {
interface "lo" {
stub;
};
interface "vlan2004" {
};
interface "vlan2007" {
};
interface "vlan2008" {
};
interface "vlan2004" { };
interface "vlan2007" { };
interface "vlan2008" { stub; };
#interface "vlan2100" { type broadcast; };
};
};
###
# eBGP to R60
table t_originate;
protocol static originate {
table t_originate;
import all;
# Access subnets
route 2400:5000:6148:2ae0::/60 blackhole;
# Router subnets
route 2400:5000:6148:2ab0::/60 blackhole;
}
protocol bgp ebgp_r60 {
table t_originate;
local 2400:5000:6148:2acc::5 as 64090;
neighbor 2400:5000:6148:2acc::60 as 65044;
import all;
import keep filtered on;
export where source = RTS_STATIC;
}
protocol pipe p_master_to_r60 {
table master;
peer table t_originate;
import where source = RTS_BGP;
export none;
}
####
# iBGP
## R15
protocol bgp ibgp_r15 {
import none;
export where source = RTS_BGP;
local 2400:5000:6148:2ab1::5 as 64090;
neighbor 2400:5000:6148:2ab1::15 as 64090;
}
## R35
protocol bgp ibgp_r35 {
import none;
export where source = RTS_BGP;
local 2400:5000:6148:2ab3::5 as 64090;
neighbor 2400:5000:6148:2ab3::35 as 64090;
}
## R45
protocol bgp ibgp_r45 {
import none;
export where source = RTS_BGP;
local 2400:5000:6148:2ab1::5 as 64090;
neighbor 2400:5000:6148:2ab1::45 as 64090;
}
## R25
protocol bgp ibgp_r25 {
import none;
export where source = RTS_BGP;
local 2400:5000:6148:2ab1::5 as 64090;
neighbor 2400:5000:6148:2ab2::25 as 64090;
}

View File

@ -4,12 +4,13 @@ iface lo inet loopback
# Internet interface, TBA
#auto vlan10
#iface vlan10 inet manual
# up ip link set up dev vlan10
# up ip addr add 2400:5000:6148:1eaa::25/64 dev vlan10
# down ip addr del 2400:5000:6148:2ab2::25/64 dev vlan10
# down ip link set down dev vlan10
auto vlan2100
iface vlan2100 inet manual
up ip link set up dev vlan2100
up ip addr add 2400:5000:6148:2a00::1144/120 dev vlan2100
up ip -6 route add default via 2400:5000:6148:2a00::1133 dev vlan2100
down ip addr del 2400:5000:6148:2a00::1133/120 dev vlan2100
down ip link set down dev vlan2100
auto vlan2004
iface vlan2004 inet manual

View File

@ -15,3 +15,24 @@ lxc.arch = amd64
lxc.pty.max = 1024
lxc.rootfs.path = btrfs:/var/lib/lxc/PWR50/rootfs
lxc.uts.name = PWR50
lxc.net.0.type = veth
lxc.net.0.flags = up
lxc.net.0.name = vlan2223
lxc.net.0.veth.pair = pwr50.2223
lxc.net.0.script.up = /etc/lxc/lxc-openvswitch
lxc.net.0.script.down = /etc/lxc/lxc-openvswitch
lxc.net.1.type = veth
lxc.net.1.flags = up
lxc.net.1.name = vlan2214
lxc.net.1.veth.pair = pwr50.2214
lxc.net.1.script.up = /etc/lxc/lxc-openvswitch
lxc.net.1.script.down = /etc/lxc/lxc-openvswitch
lxc.net.2.type = veth
lxc.net.2.flags = up
lxc.net.2.name = vlan2215
lxc.net.2.veth.pair = pwr50.2215
lxc.net.2.script.up = /etc/lxc/lxc-openvswitch
lxc.net.2.script.down = /etc/lxc/lxc-openvswitch

View File

@ -0,0 +1,30 @@
router id 172.16.16.50;
log "/var/log/bird/bird.log" all;
debug protocols { states, routes, filters, interfaces }
protocol kernel {
import none;
export all;
}
protocol device {
# defaults...
}
protocol ospf {
area 0 {
interface "lo" {
stub;
};
interface "vlan2223" {
};
interface "vlan2214" {
stub;
};
interface "vlan2215" {
stub;
};
};
};

View File

@ -0,0 +1,36 @@
router id 172.16.16.50;
log "/var/log/bird/bird.log" all;
debug protocols { states, routes, filters, interfaces }
protocol kernel {
import none;
export all;
}
protocol device {
# defaults...
}
protocol ospf {
area 0 {
interface "lo" {
stub;
};
interface "vlan2223" {
};
interface "vlan2214" {
stub;
};
interface "vlan2215" {
stub;
};
};
};
protocol bgp ibgp_r60 {
local 2400:5000:6148:2af2::50 as 65044;
neighbor 2400:5000:6148:2af0::60 as 65044;
}

View File

@ -0,0 +1,27 @@
auto lo
iface lo inet loopback
up ip addr add 2001:db8:2b::10 dev lo
iface vlan2223 inet manual
up ip link set up dev vlan2223
up ip addr add 172.16.223.50/24 brd + dev vlan2223
up ip addr add 2400:5000:6148:2af2::50/64 dev vlan2223
down ip addr del 2400:5000:6148:2af2::50/64 dev vlan2223
down ip addr del 172.16.223.50/24 dev vlan2223
down ip link set down dev vlan2223
iface vlan2214 inet manual
up ip link set up dev vlan2214
up ip addr add 172.16.214.50/24 brd + dev vlan2214
up ip addr add 2400:5000:6148:2aad::50/64 dev vlan2214
down ip addr del 2400:5000:6148:2aad::50/64 dev vlan2214
down ip addr del 172.16.214.50/24 dev vlan2214
down ip link set down dev vlan2214
iface vlan2215 inet manual
up ip link set up dev vlan2215
up ip addr add 172.16.223.50/24 brd + dev vlan2215
up ip addr add 2400:5000:6148:2aae::50/64 dev vlan2215
down ip addr del 2400:5000:6148:2aae::50/64 dev vlan2215
down ip addr del 172.16.223.50/24 dev vlan2215
down ip link set down dev vlan2215

View File

@ -15,3 +15,45 @@ lxc.arch = amd64
lxc.pty.max = 1024
lxc.rootfs.path = btrfs:/var/lib/lxc/PWR60/rootfs
lxc.uts.name = PWR60
lxc.net.0.type = veth
lxc.net.0.flags = up
lxc.net.0.name = vlan2008
lxc.net.0.veth.pair = pwr60.2008
lxc.net.0.script.up = /etc/lxc/lxc-openvswitch
lxc.net.0.script.down = /etc/lxc/lxc-openvswitch
lxc.net.1.type = veth
lxc.net.1.flags = up
lxc.net.1.name = vlan2200
lxc.net.1.veth.pair = pwr60.2200
lxc.net.1.script.up = /etc/lxc/lxc-openvswitch
lxc.net.1.script.down = /etc/lxc/lxc-openvswitch
lxc.net.2.type = veth
lxc.net.2.flags = up
lxc.net.2.name = vlan2210
lxc.net.2.veth.pair = pwr60.2210
lxc.net.2.script.up = /etc/lxc/lxc-openvswitch
lxc.net.2.script.down = /etc/lxc/lxc-openvswitch
lxc.net.3.type = veth
lxc.net.3.flags = up
lxc.net.3.name = vlan2211
lxc.net.3.veth.pair = pwr60.2211
lxc.net.3.script.up = /etc/lxc/lxc-openvswitch
lxc.net.3.script.down = /etc/lxc/lxc-openvswitch
lxc.net.4.type = veth
lxc.net.4.flags = up
lxc.net.4.name = vlan2220
lxc.net.4.veth.pair = pwr60.2220
lxc.net.4.script.up = /etc/lxc/lxc-openvswitch
lxc.net.4.script.down = /etc/lxc/lxc-openvswitch
lxc.net.5.type = veth
lxc.net.5.flags = up
lxc.net.5.name = vlan2221
lxc.net.5.veth.pair = pwr60.2221
lxc.net.5.script.up = /etc/lxc/lxc-openvswitch
lxc.net.5.script.down = /etc/lxc/lxc-openvswitch

View File

@ -0,0 +1,32 @@
router id 172.16.16.60;
log "/var/log/bird/bird.log" all;
debug protocols { states, routes, filters, interfaces }
protocol kernel {
import none;
export all;
}
protocol device {
# defaults...
}
protocol ospf {
area 0 {
interface "lo" {
stub;
};
interface "vlan2210" {
stub;
};
interface "vlan2211" {
stub;
};
interface "vlan2220" {
};
interface "vlan2221" {
};
};
};

View File

@ -0,0 +1,119 @@
router id 172.16.16.60;
log "/var/log/bird/bird6.log" all;
debug protocols { states, routes, filters, interfaces }
protocol kernel {
#import none;
export all;
learn;
preference 254;
}
protocol device {
# defaults...
scan time 10;
}
protocol direct {
interface "vlan2200";
};
filter ospfexport {
if (source = RTS_DEVICE) || (net = 0.0.0.0/0)
then accept;
else reject;
};
protocol ospf {
export filter ospfexport;
import all;
area 0 {
interface "lo" {
stub;
};
# BGP vlan
interface "vlan2008" {
stub;
};
interface "vlan2210" {
stub;
};
interface "vlan2211" {
stub;
};
# moved to BGP
#interface "vlan2200" {
# type broadcast;
#};
interface "vlan2220" { };
interface "vlan2221" { };
};
};
###
# eBGP to R5
table originate_table;
protocol static originate {
table originate_table;
import all;
# Access subnets
route 2400:5000:6148:2aa0::/60 blackhole;
# Router subnets
route 2400:5000:6148:2af0::/60 blackhole;
}
protocol bgp ebgp_r5 {
table originate_table;
neighbor 2400:5000:6148:2acc::5 as 64090;
local 2400:5000:6148:2acc::60 as 65044;
import all;
import keep filtered on;
export where source = RTS_STATIC ;
}
protocol pipe p_mater_to_r5 {
table master;
peer table originate_table;
import where source = RTS_BGP;
export none;
}
####
# iBGP
## R10
protocol bgp ibgp_r10 {
import none;
export where source = RTS_BGP;
local 2400:5000:6148:2af0::60 as 65044;
neighbor 2400:5000:6148:2af0::10 as 65044;
}
protocol bgp ibgp_r20 {
import none;
export where source = RTS_BGP;
local 2400:5000:6148:2af0::60 as 65044;
neighbor 2400:5000:6148:2af0::20 as 65044;
}
protocol bgp ibgp_r40 {
import none;
export where source = RTS_BGP;
local 2400:5000:6148:2af3::60 as 65044;
neighbor 2400:5000:6148:2af3::40 as 65044;
}
protocol bgp ibgp_r50 {
import none;
export where source = RTS_BGP;
local 2400:5000:6148:2af0::60 as 65044;
neighbor 2400:5000:6148:2af2::50 as 65044;
}

View File

@ -0,0 +1,58 @@
auto lo
iface lo inet loopback
up ip addr add 2001:db8:2b::60 dev lo
auto vlan2200
iface vlan2200 inet manual
up ip link set up dev vlan2200
up ip addr add 2400:5000:6148:2a01::1160/120 dev vlan2200
up ip -6 route add default via 2400:5000:6148:2a01::1133 dev vlan2200
down ip addr del 2400:5000:6148:2a01::1160/120 dev vlan2200
down ip link set down dev vlan2200
auto vlan2210
iface vlan2210 inet manual
up ip link set up dev vlan2210
up ip addr add 172.16.210.1/24 brd + dev vlan2210
up ip addr add 2400:5000:6148:2aa1::1/64 dev vlan2210
down ip addr del 2400:5000:6148:2aa1::1/64 dev vlan2210
down ip addr del 172.16.210.1/24 dev vlan2210
down ip link set down dev vlan2210
auto vlan2211
iface vlan2211 inet manual
up ip link set up dev vlan2211
up ip addr add 172.16.211.1/24 brd + dev vlan2211
up ip addr add 2400:5000:6148:2aa2::1/64 dev vlan2211
down ip addr del 2400:5000:6148:2aa2::1/64 dev vlan2211
down ip addr del 172.16.211.1/24 dev vlan2211
down ip link set down dev vlan2211
auto vlan2220
iface vlan2220 inet manual
up ip link set up dev vlan2220
up ip addr add 172.16.220.60/24 brd + dev vlan2220
up ip addr add 2400:5000:6148:2af0::60/64 dev vlan2220
down ip addr del 2400:5000:6148:2af0::60/64 dev vlan2220
down ip addr del 172.16.220.60/24 dev vlan2220
down ip link set down dev vlan2220
auto vlan2221
iface vlan2221 inet manual
up ip link set up dev vlan2221
up ip addr add 172.16.221.60/24 brd + dev vlan2221
up ip addr add 2400:5000:6148:2af3::60/64 dev vlan2221
down ip addr del 2400:5000:6148:2af3::60/64 dev vlan2221
down ip addr del 172.16.221.60/24 dev vlan2221
down ip link set down dev vlan2221
auto vlan2008
iface vlan2008 inet manual
up ip link set up dev vlan2008
up ip addr add 172.16.8.60/24 brd + dev vlan2008
up ip addr add 2400:5000:6148:2acc::60/64 dev vlan2008
down ip addr del 2400:5000:6148:2acc::60/64 dev vlan2008
down ip addr del 172.16.8.60/24 dev vlan2008
down ip link set down dev vlan2008