06-17-2019 11:26 PM
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
Solved! Go to Solution.
06-18-2019 12:13 AM
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
06-18-2019 12:04 AM
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
06-19-2019 07:10 AM
many thanks sir
06-18-2019 12:13 AM
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
06-19-2019 07:12 AM
so many thanks
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide