...
 
Commits (4)
log "bird.log" all;
# debug protocols all;
router id 192.168.1.1;
protocol device {
scan time 10;
debug all;
}
protocol direct {
ipv4;
ipv6;
interface "*";
}
protocol kernel {
ipv4 { export all; };
scan time 20;
}
protocol kernel {
ipv6 { export all; };
scan time 20;
}
protocol static static4 {
ipv4;
route 10.10.0.0/24 via 192.168.1.2;
route 10.10.1.0/24 via 192.168.1.2;
}
protocol static {
ipv6;
route 2001:db8:1:10::/64 via 2001:db8:1:1::10;
route 2001:db8:1:11::/64 via 2001:db8:1:1::10;
}
protocol babel {
ipv4 { export all; };
ipv6 { export all; };
# debug { events };
debug all;
# disabled;
interface "*" {
check link no;
# hello interval 300 ms;
# update interval 15 s;
};
}
log "bird.log" all;
# debug protocols all;
router id 192.168.1.2;
protocol device {
scan time 10;
debug all;
}
protocol direct {
ipv4;
ipv6;
}
protocol kernel {
ipv4 { export all; };
scan time 20;
}
protocol kernel {
ipv6 { export all; };
scan time 20;
}
protocol static static4 {
ipv4;
route 10.20.0.0/24 via 192.168.2.2;
route 10.20.1.0/24 via 192.168.2.2;
}
protocol static {
ipv6;
route 2001:db8:2:10::/64 via 2001:db8:2:1::10;
route 2001:db8:2:11::/64 via 2001:db8:2:1::10;
}
protocol babel {
ipv4 { export all; };
ipv6 { export all; };
# debug { events };
debug all;
# disabled;
interface "*" {
# hello interval 300 ms;
# update interval 15 s;
};
}
log "bird.log" all;
# debug protocols all;
router id 192.168.1.3;
protocol device {
scan time 10;
debug all;
}
protocol direct {
ipv4;
ipv6;
}
protocol kernel {
ipv4 { export all; };
scan time 20;
}
protocol kernel {
ipv6 { export all; };
scan time 20;
}
protocol static static4 {
ipv4;
route 10.30.0.0/24 via 192.168.3.2;
route 10.30.1.0/24 via 192.168.3.2;
}
protocol static {
ipv6;
route 2001:db8:3:10::/64 via 2001:db8:3:1::10;
route 2001:db8:3:11::/64 via 2001:db8:3:1::10;
}
protocol babel {
ipv4 { export all; };
ipv6 { export all; };
# debug { events };
debug all;
# disabled;
interface "*" {
# hello interval 300 ms;
# update interval 15 s;
};
}
log "bird.log" all;
# debug protocols all;
router id 192.168.1.4;
protocol device {
scan time 10;
debug all;
}
protocol direct {
ipv4;
ipv6;
}
protocol kernel {
ipv4 { export all; };
scan time 20;
}
protocol kernel {
ipv6 { export all; };
scan time 20;
}
protocol static static4 {
ipv4;
route 10.40.0.0/24 via 192.168.4.2;
route 10.40.1.0/24 via 192.168.4.2;
}
protocol static {
ipv6;
route 2001:db8:4:10::/64 via 2001:db8:4:1::10;
route 2001:db8:4:11::/64 via 2001:db8:4:1::10;
}
protocol babel {
ipv4 { export all; };
ipv6 { export all; };
# debug { events };
debug all;
# disabled;
interface "*" {
# hello interval 300 ms;
# update interval 15 s;
};
}
NETLAB_NODES="m1 m2 m3 m4"
netlab_init
if_dummy m1 ve0 192.168.1 2001:db8:01:1
if_dummy m2 ve0 192.168.2 2001:db8:02:1
if_dummy m3 ve0 192.168.3 2001:db8:03:1
if_dummy m4 ve0 192.168.4 2001:db8:04:1
if_veth m1 ve1 m2 ve2 192.168.11
if_veth m2 ve1 m3 ve2 192.168.12
if_veth m3 ve1 m4 ve2 192.168.13
if_veth m4 ve1 m1 ve2 192.168.14
netlab_start
log "bird.log" all;
# debug protocols all;
router id 192.168.1.1;
ipv4 table master4;
ipv6 table master6;
vpn4 table vpntab4;
vpn6 table vpntab6;
flow4 table flowtab4;
flow6 table flowtab6;
protocol device {
scan time 10;
}
protocol kernel kernel4 {
scan time 20;
# metric 64;
# disabled;
ipv4 {
# export all;
export where source = RTS_OSPF;
};
}
protocol kernel kernel6 {
scan time 20;
# metric 64;
# disabled;
ipv6 {
# export all;
export where source = RTS_OSPF;
};
}
protocol static static4 {
ipv4;
route 10.10.0.0/24 via 192.168.1.2;
route 10.10.1.0/24 via 192.168.1.2 { bgp_large_community.add((10,20,30)); bgp_large_community.add((10,(20*3),10)); };
}
protocol static static6 {
ipv6;
route 2001:db8:10:10::/64 via 2001:db8:1:1::10;
route 2001:db8:10:11::/64 via 2001:db8:1:1::10;
# route 2001:db8:1:1::/64 via fe80::ec9b:67ff:fe60:fd5d % ve1;
}
protocol static flowstat4 {
flow4;
route flow4 {
dst 127.0.0.0/8;
proto = 23;
dport > 24 && < 30 || 40..50,60..70,80;
sport > 24 && < 30 || = 40 || 50,60..70,80;
icmp type 80;
icmp code 90;
tcp flags 0x03/0x0f;
length 2048..65535;
dscp = 63;
fragment dont_fragment, is_fragment || !first_fragment;
};
route flow4 {
dst 11.0.0.0/8;
proto = 0x12;
sport > 0x5678 && < 0x9abc || 0xdef0 || 0x1234,0x5678,0x9abc..0xdef0;
dport = 50;
tcp flags 0xf80/0xfff;
};
route flow4 {
dst 12.0.0.0/32;
tcp flags ! 0 / 0xfff;
};
route flow4 {
dst 220.0.254.0/24;
tcp flags 0x8 / 0xf;
};
route flow4 {
dst 220.0.254.192/28;
tcp flags !0xfff / 0xfff;
};
route flow4 {
dst 15.0.0.0/8;
tcp flags !0x999/0x999;
};
}
protocol static flowstat6 {
flow6;
route flow6 {
dst fec0:1122:3344:5566::1/128;
src 0000:0000:0000:0001:1234:5678:9800:0000/101 offset 63;
next header = 23;
sport 24..30, 42 || 50,60,70..80;
dport = 50;
tcp flags 0x03/0x0f, !0/0xff || 0x33/0x33;
fragment !is_fragment || !first_fragment;
label 0xaaaa/0xaaaa && 0x33/0x33;
};
route flow6 {
dst fec0:1122:3344:5566::1/128;
src ::1:1234:5678:9800:0/101 offset 63;
next header = 23;
dport = 50;
sport > 24 && < 30 || = 40 || = 50 || = 60 || >= 70 && <= 80;
tcp flags 0x3/0x3 && 0x0/0xc;
};
}
protocol bgp {
local 192.168.11.1 as 10;
neighbor 192.168.11.2 as 20;
# debug all;
ipv4 {
import all;
export where source ~ [ RTS_STATIC, RTS_BGP ];
};
ipv6 {
import all;
export where source ~ [ RTS_STATIC, RTS_BGP ];
};
vpn4 multicast {
import all;
export where source ~ [ RTS_STATIC, RTS_BGP ];
};
vpn6 multicast {
import all;
export where source ~ [ RTS_STATIC, RTS_BGP ];
};
flow4 {
import all;
export where source ~ [ RTS_STATIC, RTS_BGP ];
};
flow6 {
import all;
export where source ~ [ RTS_STATIC, RTS_BGP ];
};
}
protocol bgp {
local 192.168.14.2 as 10;
neighbor 192.168.14.1 as 40;
# debug all;
ipv4 {
import all;
export where source ~ [ RTS_STATIC, RTS_BGP ];
};
ipv6 {
import all;
export where source ~ [ RTS_STATIC, RTS_BGP ];
};
vpn4 multicast {
import all;
export where source ~ [ RTS_STATIC, RTS_BGP ];
};
vpn6 multicast {
import all;
export where source ~ [ RTS_STATIC, RTS_BGP ];
};
flow4 {
import all;
export where source ~ [ RTS_STATIC, RTS_BGP ];
};
flow6 {
import all;
export where source ~ [ RTS_STATIC, RTS_BGP ];
};
}
log "bird.log" all;
# debug protocols all;
router id 192.168.2.1;
ipv4 table master4;
ipv6 table master6;
vpn4 table vpntab4;
vpn6 table vpntab6;
flow4 table flowtab4;
flow6 table flowtab6;
protocol device {
scan time 10;
}
protocol kernel kernel4 {
scan time 20;
# disabled;
ipv4 {
# export all;
export where source = RTS_OSPF;
};
}
protocol kernel kernel6 {
scan time 20;
# disabled;
ipv6 {
# export all;
export where source = RTS_OSPF;
};
}
protocol static static4 {
ipv4;
route 10.50.0.0/24 via 192.168.2.2;
route 10.50.1.0/24 via 192.168.2.2;
route 10.20.0.0/24 via 192.168.2.2;
route 10.20.1.0/24 via 192.168.2.2 mpls 200;
}
protocol static static6 {
ipv6;
route 2001:db8:50:1::/64 via 2001:db8:2:1::10;
route 2001:db8:50:2::/64 via 2001:db8:2:1::10;
# route 2001:db8:20:10::/64 via 2001:db8:2:1::10;
route 2001:db8:20:10::/64 via 192.168.2.2 mpls 200/200;
route 2001:db8:20:11::/64 via 2001:db8:2:1::10 mpls 200/200;
}
protocol static statvpn4 {
vpn4;
route 10:10 10.20.0.0/24 via 192.168.2.2 mpls 210;
route 10:10 10.20.1.0/24 via 192.168.2.2 mpls 210;
route 10:20 10.20.0.0/24 via 192.168.2.2 mpls 220;
route 10:20 10.20.1.0/24 via 192.168.2.2 mpls 220;
}
protocol static statvpn6 {
vpn6;
route 0:10:10 2001:db8:20:10::/64 via 2001:db8:2:1::10 mpls 200/210;
route 0:10:10 2001:db8:20:11::/64 via 2001:db8:2:1::10 mpls 200/210;
route 0:10:20 2001:db8:20:10::/64 via 2001:db8:2:1::10 mpls 200/220;
route 0:10:20 2001:db8:20:11::/64 via 2001:db8:2:1::10 mpls 200/220;
}
protocol bgp {
local 192.168.12.1 as 20;
neighbor 192.168.12.2 as 30;
# debug all;
ipv4 {
import all;
export where source ~ [ RTS_STATIC, RTS_BGP ];
graceful restart;
};
ipv6 {
import all;
export where source ~ [ RTS_STATIC, RTS_BGP ];
graceful restart;
};
vpn4 multicast {
import all;
export where source ~ [ RTS_STATIC, RTS_BGP ];
};
vpn6 multicast {
import all;
export where source ~ [ RTS_STATIC, RTS_BGP ];
};
flow4 {
import all;
export where source ~ [ RTS_STATIC, RTS_BGP ];
};
flow6 {
import all;
export where source ~ [ RTS_STATIC, RTS_BGP ];
};
}
protocol bgp {
local 192.168.11.2 as 20;
neighbor 192.168.11.1 as 10;
# debug all;
ipv4 {
import all;
export where source ~ [ RTS_STATIC, RTS_BGP ];
graceful restart;
};
ipv6 {
import all;
export where source ~ [ RTS_STATIC, RTS_BGP ];
graceful restart;
};
vpn4 multicast {
import all;
export where source ~ [ RTS_STATIC, RTS_BGP ];
};
vpn6 multicast {
import all;
export where source ~ [ RTS_STATIC, RTS_BGP ];
};
flow4 {
import all;
export where source ~ [ RTS_STATIC, RTS_BGP ];
};
flow6 {
import all;
export where source ~ [ RTS_STATIC, RTS_BGP ];
};
}
log "bird.log" all;
# debug protocols all;
router id 192.168.3.1;
ipv4 table master4;
ipv6 table master6;
vpn4 table vpntab4;
vpn6 table vpntab6;
flow4 table flowtab4;
flow6 table flowtab6;
protocol device {
scan time 10;
}
protocol kernel kernel4 {
scan time 20;
# disabled;
ipv4 {
# export all;
export where source = RTS_OSPF;
};
}
protocol kernel kernel6 {
scan time 20;
# disabled;
ipv6 {
# export all;
export where source = RTS_OSPF;
};
}
protocol static static4 {
ipv4;
route 10.30.0.0/24 via 192.168.3.2;
route 10.30.1.0/24 via 192.168.3.2 mpls 300;
}
protocol static static6 {
ipv6;
route 2001:db8:30:10::/64 via 2001:db8:3:1::10;
route 2001:db8:30:11::/64 via 2001:db8:3:1::10 mpls 300/300;
}
protocol bgp {
local 192.168.13.1 as 30;
neighbor 192.168.13.2 as 40;
# debug all;
ipv4 {
import all;
export where source ~ [ RTS_STATIC, RTS_BGP ];
};
ipv6 {
import all;
export where source ~ [ RTS_STATIC, RTS_BGP ];
};
vpn4 multicast {
import all;
export where source ~ [ RTS_STATIC, RTS_BGP ];
};
vpn6 multicast {
import all;
export where source ~ [ RTS_STATIC, RTS_BGP ];
};
flow4 {
import all;
export where source ~ [ RTS_STATIC, RTS_BGP ];
};
flow6 {
import all;
export where source ~ [ RTS_STATIC, RTS_BGP ];
};
}
protocol bgp {
local 192.168.12.2 as 30;
neighbor 192.168.12.1 as 20;
# debug all;
ipv4 {
import all;
export where source ~ [ RTS_STATIC, RTS_BGP ];
};
ipv6 {
import all;
export where source ~ [ RTS_STATIC, RTS_BGP ];
};
vpn4 multicast {
import all;
export where source ~ [ RTS_STATIC, RTS_BGP ];
};
vpn6 multicast {
import all;
export where source ~ [ RTS_STATIC, RTS_BGP ];
};
flow4 {
import all;
export where source ~ [ RTS_STATIC, RTS_BGP ];
};
flow6 {
import all;
export where source ~ [ RTS_STATIC, RTS_BGP ];
};
}
log "bird.log" all;
# debug protocols all;
router id 192.168.4.1;
ipv4 table master4;
ipv6 table master6;
vpn4 table vpntab4;
vpn6 table vpntab6;
flow4 table flowtab4;
flow6 table flowtab6;
protocol device {
scan time 10;
}
protocol kernel kernel4 {
scan time 20;
# disabled;
ipv4 {
# export all;
export where source = RTS_OSPF;
};
}
protocol kernel kernel6 {
scan time 20;
# disabled;
ipv6 {
# export all;
export where source = RTS_OSPF;
};
}
protocol static static4 {
ipv4;
route 10.50.0.0/24 via 192.168.4.2 { bgp_local_pref = 500; };
route 10.50.1.0/24 via 192.168.4.2 { bgp_local_pref = 500; };
route 10.40.0.0/24 via 192.168.4.2 { bgp_local_pref = 500; };
route 10.40.1.0/24 via 192.168.4.2 mpls 400 { bgp_local_pref = 500; };
}
protocol static static6 {
ipv6;
route 2001:db8:50:1::/64 via 2001:db8:4:1::10;
route 2001:db8:50:2::/64 via 2001:db8:4:1::10;
route 2001:db8:40:10::/64 via 2001:db8:4:1::10;
route 2001:db8:40:11::/64 via 2001:db8:4:1::10 mpls 400/400;
}
protocol bgp {
local 192.168.14.1 as 40;
neighbor 192.168.14.2 as 10;
# debug all;
ipv4 {
import all;
export where source ~ [ RTS_STATIC, RTS_BGP ];
};
ipv6 {
import all;
export where source ~ [ RTS_STATIC, RTS_BGP ];
};
vpn4 multicast {
import all;
export where source ~ [ RTS_STATIC, RTS_BGP ];
};
vpn6 multicast {
import all;
export where source ~ [ RTS_STATIC, RTS_BGP ];
};
flow4 {
import all;
export where source ~ [ RTS_STATIC, RTS_BGP ];
};
flow6 {
import all;
export where source ~ [ RTS_STATIC, RTS_BGP ];
};
}
protocol bgp {
local 192.168.13.2 as 40;
neighbor 192.168.13.1 as 30;
# debug all;
ipv4 {
import all;
export where source ~ [ RTS_STATIC, RTS_BGP ];
};
ipv6 {
import all;
export where source ~ [ RTS_STATIC, RTS_BGP ];
};
vpn4 multicast {
import all;
export where source ~ [ RTS_STATIC, RTS_BGP ];
};
vpn6 multicast {
import all;
export where source ~ [ RTS_STATIC, RTS_BGP ];
};
flow4 {
import all;
export where source ~ [ RTS_STATIC, RTS_BGP ];
};
flow6 {
import all;
export where source ~ [ RTS_STATIC, RTS_BGP ];
};
}
NETLAB_NODES="m1 m2 m3 m4"
netlab_init
if_dummy m1 ve0 192.168.1 2001:db8:01:1
if_dummy m2 ve0 192.168.2 2001:db8:02:1
if_dummy m3 ve0 192.168.3 2001:db8:03:1
if_dummy m4 ve0 192.168.4 2001:db8:04:1
if_veth m1 ve1 m2 ve2 192.168.11 2001:db8:11:1
if_veth m2 ve1 m3 ve2 192.168.12 2001:db8:12:1
if_veth m3 ve1 m4 ve2 192.168.13 2001:db8:13:1
if_veth m4 ve1 m1 ve2 192.168.14 2001:db8:14:1
netlab_start
log "bird.log" all;
# debug protocols all;
router id 192.168.1.1;
ipv4 table master4;
ipv6 table master6;
ipv4 table mcast4;
ipv6 table mcast6;
vpn4 table vpntab4;
vpn6 table vpntab6;
vpn4 table vpn4mc;
vpn6 table vpn6mc;
flow4 table flowtab4;
flow6 table flowtab6;
protocol device {
scan time 10;
}
protocol kernel kernel4 {
scan time 20;
debug all;
# metric 64;
# disabled;
ipv4 {
# export all;
export where source = RTS_OSPF;
};
}
protocol kernel kernel6 {
scan time 20;
debug all;
# metric 64;
# disabled;
ipv6 {
# export all;
export where source = RTS_OSPF;
};
}
protocol static static4 {
ipv4;
route 10.10.0.0/24 via 192.168.1.2;
route 10.10.1.0/24 via 192.168.1.2 { bgp_large_community.add((10,20,30)); bgp_large_community.add((10,(20*3),10)); };
}
protocol static static6 {
ipv6;
route 2001:db8:10:10::/64 via 2001:db8:1:1::10;
route 2001:db8:10:11::/64 via 2001:db8:1:1::10;
# route 2001:db8:1:1::/64 via fe80::ec9b:67ff:fe60:fd5d % ve1;
}
/*
protocol static flowstat4 {
flow4;
route flow4 {
dst 10.0.0.0/8;
proto = 23;
dport > 24 && < 30 || 40..50,60..70,80;
sport > 24 && < 30 || = 40 || 50,60..70,80;
icmp type 80;
icmp code 90;
tcp flags 0x03/0x0f;
length 2048..65535;
dscp = 63;
fragment dont_fragment, is_fragment || !first_fragment;
} drop;
route flow4 {
dst 11.0.0.0/8;
proto = 0x12;
sport > 0x5678 && < 0x9abc || 0xdef0 || 0x1234,0x5678,0x9abc..0xdef0;
dport = 50;
tcp flags 0xabcd/0xbbdd;
} drop;
route flow4 {
dst 12.0.0.0/32;
tcp flags ! 0 / 0x9999;
} drop;
route flow4 {
dst 220.0.254.0/24;
tcp flags 0x99 / 0x9999;
} drop;
route flow4 {
dst 220.0.254.192/28;
tcp flags !0xffff / 0xFFFF;
} drop;
route flow4 {
dst 15.0.0.0/8;
tcp flags !0x9999/0x9999;
} drop;
}
protocol static flowstat6 {
flow6;
route flow6 {
dst fec0:1122:3344:5566::1/128;
src 0000:0000:0000:0001:1234:5678:9800:0000/101 offset 63;
next header = 23;
sport 24..30, 42 || 50,60,70..80;
dport = 50;
tcp flags 0x03/0x0f, !0/0xff || 0x33/0x33;
fragment !is_fragment || !first_fragment;
label 0xaaaa/0xaaaa && 0x33/0x33;
} drop;
route flow6 {
dst fec0:1122:3344:5566::1/128;
src ::1:1234:5678:9800:0/101 offset 63;
next header = 23;
dport = 50;
sport > 24 && < 30 || = 40 || = 50 || = 60 || >= 70 && <= 80;
tcp flags 0x3/0x3 && 0x0/0xc;
} drop;
}
*/
protocol pipe {
table master4;
peer table mcast4;
import none;
export where source = RTS_OSPF;
}
protocol pipe {
table master6;
peer table mcast6;
import none;
export where source = RTS_OSPF;
}
protocol ospf v3 ospf4 {
ecmp;
ipv4 {
import all;
export where source = RTS_STATIC;
};
area 0 {
interface "ve0" { stub; };
interface "ve1" { hello 5; type ptp; };
interface "ve2" { hello 5; type bcast; ttl security; };
interface "ve3" { hello 5; type bcast; ttl security; };
};
}
protocol ospf v3 ospf6 {
ecmp;
ipv6 {
import all;
export where source = RTS_STATIC;
};
area 0 {
interface "ve0" { stub; };
interface "ve1" { hello 5; type ptp; };
interface "ve2" { hello 5; type bcast; };
};
}
protocol bgp {
# local 192.168.11.1 as 1000;
# neighbor 192.168.11.2 as 2000;
local 192.168.1.1 as 1000;
neighbor 192.168.2.1 as 1000;
# multihop;
# rr client;
# strict bind;
debug all;
ipv4 mpls {
import all;
export where source ~ [ RTS_STATIC, RTS_BGP ];
};
ipv6 mpls {
import all;
export where source ~ [ RTS_STATIC, RTS_BGP ];
};
ipv4 multicast {
table mcast4;
import all;
export all;
};
ipv6 multicast {
table mcast6;
import all;
export all;
};
vpn4 mpls {
import all;
export all;
};
vpn6 mpls {
import all;
export all;
};
vpn4 multicast {
table vpn4mc;
import all;
export all;
};
vpn6 multicast {
table vpn6mc;
import all;
export all;
};
flow4 {
import all;
export all;
};
flow6 {
import all;
export all;
};
}
protocol bgp {
local 192.168.1.1 as 1000;
neighbor 192.168.3.1 as 1000;
multihop;
rr client;
ipv4 mpls {
import all;
export where source ~ [ RTS_STATIC, RTS_BGP ];
};
ipv6 mpls {
import all;
export where source ~ [ RTS_STATIC, RTS_BGP ];
};
}
protocol bgp {
local 2001:db8:1:1::1 as 1000;
neighbor 2001:db8:4:1::1 as 1000;
multihop;
rr client;
ipv4 {
import all;
export where source ~ [ RTS_STATIC, RTS_BGP ];
};
ipv6 {
import all;
export where source ~ [ RTS_STATIC, RTS_BGP ];
};
}
log "bird.log" all;
# debug protocols all;
router id 192.168.2.1;
ipv4 table master4;
ipv6 table master6;
ipv4 table mcast4;
ipv6 table mcast6;
vpn4 table vpntab4;
vpn6 table vpntab6;
vpn4 table vpn4mc;
vpn6 table vpn6mc;
flow4 table flowtab4;
flow6 table flowtab6;
protocol device {
scan time 10;
}
protocol kernel kernel4 {
scan time 20;
# disabled;
ipv4 {
# export all;
export where source = RTS_OSPF;
};
}
protocol kernel kernel6 {
scan time 20;
# disabled;
ipv6 {
# export all;
export where source = RTS_OSPF;
};
}
protocol static static4 {
ipv4;
route 10.50.0.0/24 via 192.168.2.2;
route 10.50.1.0/24 via 192.168.2.2;
route 10.20.0.0/24 via 192.168.2.2;
route 10.20.1.0/24 via 192.168.2.2 mpls 200;
}
protocol static static6 {
ipv6;
route 2001:db8:50:1::/64 via 2001:db8:2:1::10;
route 2001:db8:50:2::/64 via 2001:db8:2:1::10;
# route 2001:db8:20:10::/64 via 2001:db8:2:1::10;
# route 2001:db8:20:10::/64 via 192.168.2.2 mpls 200/200;
route 2001:db8:20:11::/64 via 2001:db8:2:1::10 mpls 200/200;
}
protocol static statvpn4 {
vpn4;
route 10:10 10.20.0.0/24 via 192.168.2.2 mpls 210;
route 10:10 10.20.1.0/24 via 192.168.2.2 mpls 210;
route 10:20 10.20.0.0/24 via 192.168.2.2 mpls 220;
route 10:20 10.20.1.0/24 via 192.168.2.2 mpls 220;
}
protocol static statvpn6 {
vpn6;
route 0:10:10 2001:db8:20:10::/64 via 2001:db8:2:1::10 mpls 200/210;
route 0:10:10 2001:db8:20:11::/64 via 2001:db8:2:1::10 mpls 200/210;
route 0:10:20 2001:db8:20:10::/64 via 2001:db8:2:1::10 mpls 200/220;
route 0:10:20 2001:db8:20:11::/64 via 2001:db8:2:1::10 mpls 200/220;
}
protocol static statvpn4mc {
vpn4 { table vpn4mc; };
route 0:10:10 10.20.0.0/24 via 192.168.2.2 mpls 210;
route 0:10:10 10.20.1.0/24 via 192.168.2.2 mpls 210;
route 0:10:20 10.20.0.0/24 via 192.168.2.2 mpls 220;
route 0:10:20 10.20.1.0/24 via 192.168.2.2 mpls 220;
}
protocol static statvpn6mc {
vpn6 { table vpn6mc; };
route 0:10:10 2001:db8:20:10::/64 via 2001:db8:2:1::10 mpls 200/210;
route 0:10:10 2001:db8:20:11::/64 via 2001:db8:2:1::10 mpls 200/210;
route 0:10:20 2001:db8:20:10::/64 via 2001:db8:2:1::10 mpls 200/220;
route 0:10:20 2001:db8:20:11::/64 via 2001:db8:2:1::10 mpls 200/220;
}
protocol ospf v3 ospf4 {
# ecmp;
ipv4 {
import all;
export where source = RTS_STATIC;
};
area 0 {
stubnet 192.168.120.0/24 { cost 100; };
stubnet 192.168.220.0/32 { cost 100; };
interface "ve0" { stub; };
interface "ve1" { hello 5; type bcast; ttl security; };
# interface "ve1" { hello 5; type bcast; authentication simple; password "pass"; };
interface "ve2" { hello 5; type ptp; };
};
}
protocol ospf v3 ospf6 {
# ecmp;
ipv6 {
import all;
export where source = RTS_STATIC;
};
area 0 {
interface "ve0" { stub; };
interface "ve1" { hello 5; type bcast; ttl security; };
interface "ve2" { hello 5; type ptp; };
};
}
protocol bgp {
# local 192.168.11.2 as 2000;
# neighbor 192.168.11.1 as 1000;
local 192.168.2.1 as 1000;
neighbor 192.168.1.1 as 1000;
# multihop;
debug all;
ipv4 mpls {
import all;
export where source = RTS_STATIC;
};
ipv6 mpls {
import all;
export where source = RTS_STATIC;
};
ipv4 multicast {
table mcast4;
import all;
export none;
};
ipv6 multicast {
table mcast6;
import all;
export none;
};
vpn4 mpls {
import all;
export all;
};
vpn6 mpls {
import all;
export all;
};
vpn4 multicast {
table vpn4mc;
import all;
export all;
};
vpn6 multicast {
table vpn6mc;
import all;
export all;
};
flow4 {
import all;
export none;
};
flow6 {
import all;
export none;
};
}
log "bird.log" all;
# debug protocols all;
router id 192.168.3.1;
ipv4 table master4;
ipv6 table master6;
protocol device {
scan time 10;
}
protocol kernel kernel4 {
scan time 20;
# disabled;
ipv4 {
# export all;
export where source = RTS_OSPF;
};
}
protocol kernel kernel6 {
scan time 20;
# disabled;
ipv6 {
# export all;
export where source = RTS_OSPF;
};
}
protocol static static4 {
ipv4;
route 10.30.0.0/24 via 192.168.3.2;
route 10.30.1.0/24 via 192.168.3.2 mpls 300;
}
protocol static static6 {
ipv6;
route 2001:db8:30:10::/64 via 2001:db8:3:1::10;
route 2001:db8:30:11::/64 via 2001:db8:3:1::10 mpls 300/300;
}
protocol ospf v3 ospf4 {
# ecmp;
ipv4 {
import all;
export where source = RTS_STATIC;
};
area 0 {
stubnet 192.168.120.0/24 { cost 400; };
stubnet 192.168.220.0/32 { cost 10; };
interface "ve0" { stub; };
interface "ve1" { hello 5; type ptp; };
interface "ve2" { hello 5; type bcast; ttl security; };
# interface "ve3" { hello 5; type bcast; ttl security; };
# interface "ve1" { hello 5; type ptp; authentication cryptographic; password "qwerty"; };
# interface "ve2" { hello 5; type bcast; authentication simple; password "pass"; };
};
}
protocol ospf v3 ospf6 {
# ecmp;
ipv6 {
import all;
export where source = RTS_STATIC;
};
area 0 {
interface "ve0" { stub; };
interface "ve1" { hello 5; type ptp; ttl security; };
interface "ve2" { hello 5; type bcast; ttl security; };
};
}
protocol bgp {
local 192.168.3.1 as 1000;
neighbor 192.168.1.1 as 1000;
multihop;
ipv4 mpls {
import all;
export where source = RTS_STATIC;
next hop self;
};
ipv6 mpls {
import all;
export where source = RTS_STATIC;
next hop self;
# extended next hop;
# next hop address 2001:db8:3:1::1;
};
}
log "bird.log" all;
# debug protocols all;
router id 192.168.4.1;
ipv4 table master4;
ipv6 table master6;
protocol device {
scan time 10;
}
protocol kernel kernel4 {
scan time 20;
# disabled;
ipv4 {
# export all;
export where source = RTS_OSPF;
};
}
protocol kernel kernel6 {
scan time 20;
# disabled;
ipv6 {
# export all;
export where source = RTS_OSPF;
};
}
protocol static static4 {
ipv4;
route 10.50.0.0/24 via 192.168.4.2 { bgp_local_pref = 500; };
route 10.50.1.0/24 via 192.168.4.2 { bgp_local_pref = 500; };
route 10.40.0.0/24 via 192.168.4.2 { bgp_local_pref = 500; };
route 10.40.1.0/24 via 192.168.4.2 mpls 400 { bgp_local_pref = 500; };
}
protocol static static6 {
ipv6;
route 2001:db8:50:1::/64 via 2001:db8:4:1::10;
route 2001:db8:50:2::/64 via 2001:db8:4:1::10;
route 2001:db8:40:10::/64 via 2001:db8:4:1::10;
route 2001:db8:40:11::/64 via 2001:db8:4:1::10 mpls 400/400;
}
protocol ospf v3 ospf4 {
# ecmp;
ipv4 {
import all;
export where source = RTS_STATIC;
};
area 0 {
stubnet 192.168.120.0/24 { cost 10; };
stubnet 192.168.220.0/32 { cost 400; };
interface "ve0" { stub; };
interface "ve1" { hello 5; type bcast; ttl security; };
interface "ve2" { hello 5; type ptp; };
# interface "ve2" { hello 5; type ptp; authentication cryptographic; password "qwerty"; };
};
}
protocol ospf v3 ospf6 {
# ecmp;
ipv6 {
import all;
export where source = RTS_STATIC;
};
area 0 {
interface "ve0" { stub; };
interface "ve1" { hello 5; type bcast; };
interface "ve2" { hello 5; type ptp; ttl security; };
};
}
protocol bgp {
local 2001:db8:4:1::1 as 1000;
neighbor 2001:db8:1:1::1 as 1000;
multihop;
ipv4 {
import all;
export where source = RTS_STATIC;
# export where proto = "static4";
# next hop address 192.168.4.1;
next hop self;
};
ipv6 {
import all;
export where source = RTS_STATIC;
next hop self;
};
}
NETLAB_NODES="m1 m2 m3 m4"
netlab_init
if_dummy m1 ve0 192.168.1 2001:db8:01:1
if_dummy m2 ve0 192.168.2 2001:db8:02:1
if_dummy m3 ve0 192.168.3 2001:db8:03:1
if_dummy m4 ve0 192.168.4 2001:db8:04:1
if_veth m1 ve1 m2 ve2 192.168.11
if_veth m2 ve1 m3 ve2 192.168.12
if_veth m3 ve1 m4 ve2 192.168.13
if_veth m4 ve1 m1 ve2 192.168.14
netlab_start
log "bird.log" all;
# debug protocols all;
router id 192.168.1.1;
protocol device {
scan time 10;
debug all;
}
protocol direct {
ipv4;
ipv6;
}
protocol kernel {
ipv4 { export all; };
scan time 20;
}
protocol kernel {
ipv6 { export all; };
scan time 20;
}
protocol static {
ipv4;
route 10.10.0.0/24 via 192.168.1.2;
route 10.10.1.0/24 via 192.168.1.2;
}
protocol static {
ipv6;
route 2001:db8:1:10::/64 via 2001:db8:1:1::10;
route 2001:db8:1:11::/64 via 2001:db8:1:1::10;
}
protocol bfd {
}
protocol rip {
ipv4 { export all; };
debug { events };
# debug all;
interface "*" {
bfd;
};
}
protocol rip ng {
ipv6 { export all; };
debug { events };
# debug all;
interface "*" {
bfd;
};
}
log "bird.log" all;
# debug protocols all;
router id 192.168.1.2;
protocol device {
scan time 10;
debug all;
}
protocol direct {
ipv4;
ipv6;
}
protocol kernel {
ipv4 { export all; };
scan time 20;
}
protocol kernel {
ipv6 { export all; };
scan time 20;
}
protocol static static4 {
ipv4;
route 10.20.0.0/24 via 192.168.2.2;
route 10.20.1.0/24 via 192.168.2.2;
}
protocol static {
ipv6;
route 2001:db8:2:10::/64 via 2001:db8:2:1::10;
route 2001:db8:2:11::/64 via 2001:db8:2:1::10;
}
protocol bfd {
}
protocol rip {
ipv4 { export all; };
debug { events };
# debug all;
interface "*" {
bfd;
};
}
protocol rip ng {
ipv6 { export all; };
debug { events };
# debug all;
interface "*" {
bfd;
};
}
log "bird.log" all;
# debug protocols all;
router id 192.168.1.3;
protocol device {
scan time 10;
debug all;
}
protocol direct {
ipv4;
ipv6;
}
protocol kernel {
ipv4 { export all; };
scan time 20;
}
protocol kernel {
ipv6 { export all; };
scan time 20;
}
protocol static static4 {
ipv4;
route 10.30.0.0/24 via 192.168.3.2;
route 10.30.1.0/24 via 192.168.3.2;
}
protocol static {
ipv6;
route 2001:db8:3:10::/64 via 2001:db8:3:1::10;
route 2001:db8:3:11::/64 via 2001:db8:3:1::10;
}
protocol bfd {
}
protocol rip {
ipv4 { export all; };
debug { events };
# debug all;