The BGP Prefix-Based Outbound Route Filtering feature is enabled through the advertisement of ORF capabilities to peer routers. The advertisement of the ORF capability indicates that a BGP speaker will accept a prefix list from a neighbor and apply the prefix list to locally configured ORFs (if any exist).
When this capability is enabled, the BGP speaker can install the inbound prefix list filter to the remote peer as an outbound filter, which reduces unwanted routing updates.
- ORF is a BGP capability (Code 3), can be send only, receive only, or send AND receive, aka both.
- prefix-list MUST be applied 'in' on the sender side.
- clear ip bgp * soft in prefix-filter to propagate the config.
R1#sh run | i bgp|1.13.3
router bgp 146
bgp router-id 150.1.1.1
bgp log-neighbor-changes
bgp dampening route-map DAMP
neighbor 155.1.13.3 remote-as 200
neighbor 155.1.13.3 local-as 100 no-prepend replace-as
neighbor 155.1.13.3 send-community
neighbor 155.1.13.3 capability orf prefix-list receive
neighbor 155.1.13.3 advertisement-interval 0
neighbor 155.1.13.3 soft-reconfiguration inbound
ip bgp-community new-format
R1#
R3#sh run | i bgp|1.13.1
router bgp 200
bgp always-compare-med
bgp log-neighbor-changes
bgp deterministic-med
bgp dampening 4
neighbor 155.1.13.1 remote-as 100
neighbor 155.1.13.1 send-community both
neighbor 155.1.13.1 capability orf prefix-list send
neighbor 155.1.13.1 soft-reconfiguration inbound
neighbor 155.1.13.1 prefix-list ORF-SEND in
neighbor 155.1.13.1 route-map COM200 in
ip bgp-community new-format
R3#
Verification:
R3#sh ip pref det ORF-SEND
ip prefix-list ORF-SEND:
count: 3, range entries: 1, sequences: 5 - 15, refcount: 3
seq 5 deny 112.0.0.0/8 (hit count: 1, refcount: 1)
seq 10 deny 114.0.0.0/8 (hit count: 1, refcount: 2)
seq 15 permit 0.0.0.0/0 le 32 (hit count: 38, refcount: 1)
R3#
R1#sh ip bgp ne 155.1.13.3 received pref
Address family: IPv4 Unicast
ip prefix-list 155.1.13.3: 3 entries
seq 5 deny 112.0.0.0/8
seq 10 deny 114.0.0.0/8
seq 15 permit 0.0.0.0/0 le 32
R1#
R1#sh ip bgp ne 155.1.13.3 | i ORF
Outbound Route Filter (ORF) type (128) Prefix-list:
Outbound Route Filter (ORF): received (3 entries)
ORF prefix-list: 2 n/a
R1#
R1#
R1#sh run | i orf
neighbor 155.1.0.5 capability orf prefix-list receive
neighbor 155.1.13.3 capability orf prefix-list receive
R1#
R1#debug ip bgp 155.1.13.3 updates
BGP updates debugging is on for neighbor 155.1.13.3 for address family: IPv4 Unicast
R1#
No comments:
Post a Comment