Yesterday I learned about a really interesting BGP feature that I’d never heard of. It’s called ORF (Outbound Route Filtering). With traditional filtering we have two options, filter updated in (coming from your neighbor) or out (going to your neighbor). This method works well, but there is overhead on both sides, one neighbor sending all the updates with the other neighbor filtering some or most of them. ORF is a better way of accomplishing this. Here’s the topology:

ORF Topology

The goal of ORF is the ability of the neighbors to tell each other what prefixes they want BEFORE they are sent. This saves bandwidth and processing. For instance, R1 can tell R2 that it only cares about the 24.95.102.0/24 and 128.27.45.0/24 networks, so R2 doesn’t bother sending the 72.89.30.0/24 network at all.

Let’s get to the config:

R1

hostname R1
!
interface Loopback1
 ip address 41.58.12.1 255.255.255.0
!
interface Serial0/0
 ip address 10.1.1.1 255.255.255.252
!
router bgp 6505
 no synchronization
 bgp log-neighbor-changes
 network 41.58.12.0 mask 255.255.255.0
 neighbor 10.1.1.2 remote-as 5680
 no auto-summary

R2

hostname R2
!
interface Loopback1
 ip address 72.89.30.1 255.255.255.0
!
interface Loopback2
 ip address 24.95.102.1 255.255.255.0
!
interface Loopback3
 ip address 128.27.45.1 255.255.255.0
!
interface Serial0/0
 ip address 10.1.1.2 255.255.255.252
!
router bgp 5680
 no synchronization
 bgp log-neighbor-changes
 network 24.95.102.0 mask 255.255.255.0
 network 72.89.30.0 mask 255.255.255.0
 network 128.27.45.0 mask 255.255.255.0
 neighbor 10.1.1.1 remote-as 6505
 no auto-summary