Created
September 19, 2015 20:07
-
-
Save lkmhaqer/c04b713c7529d0c62d57 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
template bgp dnpeers { | |
local as OWNAS; | |
# metric is the number of hops between us and the peer | |
path metric 1; | |
# this lines allows debugging filter rules | |
# filtered routes can be looked up in birdc using the "show route filtered" command | |
import keep filtered; | |
import filter { | |
# accept every subnet, except our own advertised subnet | |
# filtering is important, because some guys try to advertise routes like 0.0.0.0 | |
if is_valid_network() && !is_self_net() && !is_anycast_invalid() then { | |
accept; | |
} | |
reject; | |
}; | |
export filter { | |
# here we export the whole net | |
if is_valid_network() then { | |
accept; | |
} | |
reject; | |
}; | |
route limit 10000; | |
source address OWNIP; | |
}; | |
template bgp ibgp { | |
local as OWNAS; | |
path metric 1; | |
route limit 10000; | |
source address 172.22.150.126; | |
gateway recursive; | |
next hop self; | |
import filter { | |
if net != 172.22.150.126/32 then { | |
accept; | |
} | |
}; | |
export filter { | |
accept; | |
}; | |
}; | |
include "/etc/bird/peers4/*"; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment