130 lines
2.3 KiB
Plaintext
130 lines
2.3 KiB
Plaintext
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 "lan" {
|
|
};
|
|
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::11 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::11 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::11 as 65010;
|
|
neighbor 2001:db8:10::12 as 65010;
|
|
}
|
|
|
|
|
|
protocol bgp ibgp_r10 {
|
|
table t_bgp;
|
|
igp table master;
|
|
import all;
|
|
export all;
|
|
local 2001:db8:10::11 as 65010;
|
|
neighbor 2001:db8:10::10 as 65010;
|
|
}
|
|
|