Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #
- #
- # Generated: 2020-04-03 09:19:52
- #
- #log "/var/log/bird/rs1.log" all;
- log syslog all;
- define routeserverasn = 1;
- define routeserveraddress = 192.168.2.2;
- router id 192.168.2.2;
- # ignore interface up/down events
- protocol device { }
- protocol kernel {
- scan time 20;
- ipv4 {
- export all;
- };
- }
- # This function excludes weird networks
- # rfc1918, class D, class E, too long and too short prefixes
- function avoid_martians()
- prefix set martians;
- {
- martians = [
- 10.0.0.0/8+,
- 169.254.0.0/16+,
- 172.16.0.0/12+,
- 192.0.0.0/24+,
- 192.0.2.0/24+,
- 192.168.0.0/16+,
- 198.18.0.0/15+,
- 198.51.100.0/24+,
- 203.0.113.0/24+,
- 224.0.0.0/4+,
- 240.0.0.0/4+,
- 0.0.0.0/32-,
- 0.0.0.0/0{25,32},
- 0.0.0.0/0{0,7}
- ];
- # Avoid RFC1918 and similar networks
- if net ~ martians then
- return false;
- return true;
- }
- function bgp_out(int peerID)
- {
- if (routeserverasn,peerID) ~ bgp_community then return false;
- # if (1,0) ~ bgp_community then return false;
- # if (0,peerID) ~ bgp_community then return false;
- return true;
- }
- ########################################################################################
- ########################################################################################
- #
- # Route Server client configuration
- #
- ########################################################################################
- ########################################################################################
- template bgp tb_rsclient {
- local as routeserverasn;
- source address routeserveraddress;
- strict bind yes;
- # give RPKI-RTR a chance to start and populate
- # (RPKI is /really/ quick)
- connect delay time 30;
- ipv4 {
- export all;
- };
- rs client;
- }
- ########################################################################################
- ########################################################################################
- #
- # Route server clients
- #
- ########################################################################################
- ########################################################################################
- ########################################################################################
- ########################################################################################
- ###
- ### AS2 - TEST - VLAN Interface #2
- ipv4 table t_0002_as2;
- protocol pipe pp_0002_as2 {
- description "Pipe for AS2 - TEST - VLAN Interface 2";
- table master4;
- peer table t_0002_as2;
- import filter f_export_to_master;
- export where bgp_out(2);
- }
- protocol bgp pb_0002_as2 from tb_rsclient {
- description "AS2 - TEST";
- neighbor 192.168.2.22 as 2;
- ipv4 {
- import limit 250 action restart;
- import all;
- table t_0002_as2;
- export where bgp_out(2);
- };
- }
- ########################################################################################
- ########################################################################################
- ###
- ### AS3 - TEST1 - VLAN Interface #5
- ipv4 table t_0005_as3;
- protocol pipe pp_0005_as3 {
- description "Pipe for AS3 - TEST1 - VLAN Interface 5";
- table master4;
- peer table t_0005_as3;
- import filter f_export_to_master;
- export where ixp_community_filter(3);
- }
- protocol bgp pb_0005_as3 from tb_rsclient {
- description "AS3 - TEST1";
- neighbor 192.168.2.222 as 3;
- ipv4 {
- import limit 250 action restart;
- import all;
- table t_0005_as3;
- export all;
- };
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement