I'm curious about best practices regarding the usage of route-maps or prefix-list in the bgp config.
Some examples i've seen apply a prefix-list directly to a neighbor, others use a route-map.
I can't tell if there is a benefit one way or another.
prefix-list applied to neighbor:
prefix-list applied to route-map applied to neighbor:
router bgp 1234
neighbor 18.104.22.168 remote as 2345
neighbor 22.214.171.124 route-map recv in
neighbor 126.96.36.199 route-map announce out
route-map recv deny 10
match ip address prefix-list Block_RFC1918
route-map recv permit 20
match ip address prefix-list allowall
ip prefix-list Block_RFC1918 seq 5 permit 0.0.0.0/0
ip prefix-list Block RFC1918 seq 10 permit 10.0.0.0/8 le 32
ip prefix-list allowall seq 5 permit 0.0.0.0/0 le 32
route-map announce permit 10
match ip address prefix-list ASN1234
ip prefix-list ASN1234 seq 5 permit 188.8.131.52/24
you can use both but keep in mind
I preffer "route-map".