ccie blog

BGP Network Summary

I’m going to look be doing a very simple BGP network summarisation.  The topology below shows a three networks on R2 that get summarised into a single prefix, then advertised to R3.

Let’s see how we can configure this on R2.

//R2's config
interface Loopback0
ip address 206.25.128.1 255.255.224.0
!
interface Loopback1
ip address 206.25.224.1 255.255.224.0
!
interface Loopback2
ip address 206.25.160.1 255.255.224.0
!
interface FastEthernet0/0
ip address 195.26.10.10 255.255.255.252
!
router bgp 10
network 206.25.128.0 mask 255.255.128.0
neighbor 195.26.10.9 remote-as 40
no auto-summary
!
ip route 206.25.128.0 255.255.128.0 Null0

 

There are two key elements to this config:

  • Use a network statement to advertise the summary address
  • Create a static route that points the summary address to null0

The first statement is self explanatory, however the static route may need some justification.   Because the address advertised in the network statement is merely just a summary address that represents a group of networks that R2 knows about, the actual network does not exist; therefore we should drop traffic that is destined specifically to the summary address.  Another reason for the static route is because you need to drop traffic within the summary range that doesn’t exist (such as 206.25.192.0/19). If we didn’t, and consider a situation where R2 has been configured with a default route to another ISP in a different AS (not shown in the diagram).  Then R2 would now forward traffic destined to this non-existent network via the default route.  The other ISP would then route this traffic back to you, causing a routing loop.  The null 0 route can be used to avoid this situation by dropping traffic when a more specific route in his routing table within the summarised range does not exist.

The configuration below shows R3’s BGP table after receiving a BGP update from R2:

R3#sh ip bgp
BGP table version is 2, local router ID is 195.26.10.9
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
*> 206.25.128.0/17  195.26.10.10             0             0 10 i

As you can see, the BGP table has only been populated with one route instead of three.

To see how to do this using the aggregate-address command, check out my post on the BGP aggregate-address.

Leave a comment

Your comment