cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
2021
Views
5
Helpful
4
Replies

BGP Route Aggregation with Static Discard Route

cisc0.ameer
Level 1
Level 1

hello

when we are configuring :

router bgp XXXX
bgp log-neighbor-changes
network <ip> mask <mask>
neighbor <ip> remote-as <AS>
!
ip route 70.36.0.0 255.255.240.0 Null0

that static route means when ever matches  Drop the packets ....does it correct ?

it means when other BGP peers received Default Route (0.0.0.0) in their Routing Table if matches Drop

1 Accepted Solution

Accepted Solutions

Jon Marshall
Hall of Fame
Hall of Fame

 

It means if a more specific route is not found in the IP routing table then the packet will be dropped. 

 

For a route to be advertised in BGP using a network statement there must be a matching route in the IP routing table and the match must be for the prefix and the subnet mask. 

 

So with your example lets say in the IP routing table there are these subnets - 

 

70.36.0.0/24
70.36.1.0/24
70.36.2.0/24
....
70.36.15.0/24

 

and all of these can be summarised using - 70.36.0.0 255.255.240.0 which is what you want to advertise to BGP peers so you configure "network 70.36.0.0 mask 255.255.240.0" under your BGP configuration. 

 

Without that static route your route will not be advertised because BGP searches the IP routing table for that route with that exact mask ie. 255.255.240.0 but all the subnets in the IP routing table are /24s.

 

So you configure the static route which adds it to the IP routing table and now BGP can advertise the summary route. 

 

Note as well that no packets would be dropped because the IP routing table contains all the /24s and the most specific match always wins in the routing table. 

 

Jon

 

View solution in original post

4 Replies 4

omz
VIP Alumni
VIP Alumni

Hi 

1. When BGP network statement uses the mask keyword then the exact prefix of the network statement must be in the IP routing table. If the prefix is not in the routing table, BGP will not advertise the prefix in the network statement.

 

2. Stability to avoid route flapping - when there is a static route to null 0 then components routes will always be advertised to its neighbors. When a route is removed from the routing table BGP does not advertise that route. If you had a flapping interface/route BGP will advertise/withdraw that route. 

 

3. Preventing routing loops - any packet destined to some specific route in that summary will look for most specific route first and no specific route is available then check the static route pointing to null0 interface. Because that will be the longest match traffic is dropped. 

 

Hope this helps

 

many thanks sir

Jon Marshall
Hall of Fame
Hall of Fame

 

It means if a more specific route is not found in the IP routing table then the packet will be dropped. 

 

For a route to be advertised in BGP using a network statement there must be a matching route in the IP routing table and the match must be for the prefix and the subnet mask. 

 

So with your example lets say in the IP routing table there are these subnets - 

 

70.36.0.0/24
70.36.1.0/24
70.36.2.0/24
....
70.36.15.0/24

 

and all of these can be summarised using - 70.36.0.0 255.255.240.0 which is what you want to advertise to BGP peers so you configure "network 70.36.0.0 mask 255.255.240.0" under your BGP configuration. 

 

Without that static route your route will not be advertised because BGP searches the IP routing table for that route with that exact mask ie. 255.255.240.0 but all the subnets in the IP routing table are /24s.

 

So you configure the static route which adds it to the IP routing table and now BGP can advertise the summary route. 

 

Note as well that no packets would be dropped because the IP routing table contains all the /24s and the most specific match always wins in the routing table. 

 

Jon

 

so many thanks

Review Cisco Networking for a $25 gift card