Thursday, April 9, 2009

BGP - ORF (Outbound Route Filtering)

The standard method for BGP to filter routes entering the BGP table is to apply prefix-list filtering on incoming updates. For example

R1
ip prefix-list rich permit 10.1.1.0/24
neighbor 1.2.3.4 prefix-list rich in

In the above example R1 will only allow the 10.1.1.0/24 route into its BGP table.

The flaw with the above is that R1 must receive ALL routes from the 1.2.3.4 neighbor. Upon receipt R1 then allows only the required routes to enter the local BGP table. The problem here is that R1 must first receive the whole BGP table advertised by its neighbor.

It is exactly this BGP characteristic that ORF was designed to improve. With ORF enabled on neighboring routers, only the required routes are sent in the first place. Hence link bandwidth and the local routers memory are then spared unnecessary overhead.

An important note i made to myself is that the above config still applies i.e. route filtering is set up exactly as when ORF is not enabled. The required ORF functionality is then simply configured on top of this configuration.

N.B. Running Version 12.3(23) i noticed the config would only take hold if i applied under the address-family ipv4 sub command prompt.

R1
router bgp 200
address-family ipv4
neighbor 1.2.3.4 capability orf prefix-list send

R2
router bgp 100
address-family ipv4
neighbor 4.3.2.1 capability orf prefix-list receive

Once applied i ran debug ip bgp updates and was able to see the router only received the required routes. Before applying the ORF capability i was able to see all routes arriving and then the router denying those not allowed in the prefix-list.

No comments: