diff --git a/bird/ibgp.conf b/bird/ibgp.conf index e0a15a2..3b57b7f 100644 --- a/bird/ibgp.conf +++ b/bird/ibgp.conf @@ -4,16 +4,16 @@ template bgp ibgp_peers { graceful restart on; # bfd on; ipv4 { - next hop self; + next hop self ebgp; igp table OSPF_table; table BGP_table; import filter { dn11_update_cross_ibgp(); + dn11_update_server_location(); accept; }; export filter { if source != RTS_BGP then reject; - dn11_update_server_location(); unset(bgp_med); accept; }; diff --git a/bird/ibgp_rr.conf b/bird/ibgp_rr.conf new file mode 100644 index 0000000..4393884 --- /dev/null +++ b/bird/ibgp_rr.conf @@ -0,0 +1,80 @@ +template bgp ibgp_base { + local as LOCAL_ASN; + source address SERVE_IP; + graceful restart on; + # bfd on; + ipv4 { + next hop self ebgp; + igp table OSPF_table; + table BGP_table; + import filter { + dn11_update_cross_ibgp(); + dn11_update_server_location(); + accept; + }; + } +} + +template bgp ibgp_peers from ibgp_base { + ipv4 { + next hop self ebgp; + export filter { + if source != RTS_BGP then reject; + accept; + }; + }; +} + +# for ibgp between rr +template bgp ibgp_rrs from ibgp_peers { + ipv4 { + add paths tx; + add paths rx; + } +} + +template bgp ibgp_rr from ibgp_base { + rr client; + rr cluster id ; + ipv4 { + add paths tx; + export filter { + if source != RTS_BGP then reject; + accept; + }; + }; +} + +template bgp ibgp_rr_client from ibgp_base { + ipv4 { + add paths rx; + export filter { + if source != RTS_BGP then reject; + accept; + }; + }; +} + +# plain ibgp between RRs +protocol bgp IBGP_ from ibgp_peers { + neighbor internal; +} + +# ibgp from RR Server to RR Client +protocol bgp IBGP_ from ibgp_rr { + neighbor internal; +} + +# or a dynamic protocol +protocol bgp IBGP_RRClient from ibgp_rr { + neighbor range internal; + dynamic name "RRClient"; + # password "string" # when needed +} + +# ibgp from RR Client to RR Server +protocol bgp IBGP_ from ibgp_rr_client { + neighbor internal; +} + +