Pages

Saturday, January 29, 2011

BGP Outbound Route Filtering (BGP ORF)

ORF is the feature to allow the receiver router to tell sender what routes it wants. In fact, it works in the same manner of the filter list on the sender to allow advertising specific routes to receiver. However, the ORF is useful in the sense that we do not have to modify the configuration in the sender. This will very helpful when talking about PE and CE. 

In this scenario, R1 has 192.168.x.0/24 network in its routing table. Without route filtering, R1 will advertise all of its routes to R2. However, in this case, R2 only want 192.168.4.0/24, 192.168.5.0/24 and 192.168.6.0/24 from R1.  We will use ORF to accomplish this task.




When No Filter prefix, R1 advertised all of 192.168.x.0/24 network to R2 as shown in the show ip bgp command.

R1
R1#sh ip bgp
BGP table version is 7, local router ID is 192.168.6.1
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
              r RIB-failure, S Stale
Origin codes: i - IGP, e - EGP, ? - incomplete

   Network          Next Hop            Metric LocPrf Weight Path
*> 192.168.1.0      0.0.0.0                  0         32768 i
*> 192.168.2.0      0.0.0.0                  0         32768 i
*> 192.168.3.0      0.0.0.0                  0         32768 i
*> 192.168.4.0      0.0.0.0                  0         32768 i
*> 192.168.5.0      0.0.0.0                  0         32768 i
*> 192.168.6.0      0.0.0.0                  0         32768 i


Configuration

R1
router bgp 100
 no synchronization
 bgp log-neighbor-changes
 network 192.168.1.0
 network 192.168.2.0
 network 192.168.3.0
 network 192.168.4.0
 network 192.168.5.0
 network 192.168.6.0
 neighbor 10.10.1.2 remote-as 200
// receive ORF capability from R2
 neighbor 10.10.1.2 capability orf prefix-list receive


R2
ip prefix-list Block-1-3 seq 5 deny 192.168.0.0/22 ge 24 le 24
ip prefix-list Block-1-3 seq 10 permit 0.0.0.0/0 le 32

router bgp 200
 no synchronization
 bgp log-neighbor-changes
 neighbor 10.10.1.1 remote-as 100
// Send ORF capability to R1
 neighbor 10.10.1.1 capability orf prefix-list send
 neighbor 10.10.1.1 prefix-list Block-1-3 in
 no auto-summary

Verify configuration

R1#sh ip bgp neighbors 10.10.1.2 advertised-routes
BGP table version is 7, local router ID is 192.168.6.1
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
              r RIB-failure, S Stale
Origin codes: i - IGP, e - EGP, ? - incomplete

   Network          Next Hop            Metric LocPrf Weight Path
*> 192.168.4.0      0.0.0.0                  0         32768 i
*> 192.168.5.0      0.0.0.0                  0         32768 i
*> 192.168.6.0      0.0.0.0                  0         32768 i

Total number of prefixes 3
R1#

Now, R1 only advertise 192.168.4.0/24, 192.168.5.0/24 and 192.168.6.0/24 to R2

R2#sh ip bgp
BGP table version is 34, local router ID is 10.10.1.2
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
              r RIB-failure, S Stale
Origin codes: i - IGP, e - EGP, ? - incomplete

   Network          Next Hop            Metric LocPrf Weight Path
*> 192.168.4.0      10.10.1.1                0             0 100 i
*> 192.168.5.0      10.10.1.1                0             0 100 i
*> 192.168.6.0      10.10.1.1                0             0 100 i


No comments:

Post a Comment