BGP question

hi all

I was solving this question:

The 192.168.0.0 network is not being propagated throughout the network. Observe the BGP configuration commands from the advertising router. What is the reason the 192.168.0.0 route is not being advertised?

router bgp 65111
neighbor 172.16.1.1 remote-as 65111 
neighbor 172.16.2.1 remote-as 65112 
network 192.168.0.0 
network 10.0.0.0
!
ip route 192.168.0.0 255.255.0.0 null0

A. The network 192.168.0.0 statement is missing mask 255.255.0.0
B. The network 192.168.0.0 statement is missing mask 0.0.255.255.
C. The network 10.0.0.0 statement is missing mask 255.0.0.0.
D. The network 10.0.0.0 statement is missing mask 0.255.255.255.
E. The auto-summary configuration is missing.

 

the answer is A as I chose, but I really did not understand it well because of "ip route 192.168.0.0 255.255.0.0 null0"

if this statement will put the network into null0 and at the same time use to advertise the network to BGP routers, that means this router will tell the others BGP routers if you want to reach network 192.168.0.0/16 , send it to me and I will drop it !!!

which really does not make sense !

 

thanks,

Comments

  • Hi

     

    The minimum requirement for a prefix configured under the network command to be installed in a BGP table is to have a component route in the Routing table.That is why you should have the ip route 192.168.0.0 point to null0.

     

    If the router doesnt find a route to any destination in that range it will drop the packet.

    Ex:

    If the router receive a packet looking for 192.168.10.20 and the router knows how to reach in that destination, the packet will be forwarded........

    remember that exact match comes first and later non-exact match in the routing table.......

  • JoeMJoeM ✭✭✭

    ........ but I really did not understand it well because of "ip route 192.168.0.0 255.255.0.0 null0"

    if this statement will put the network into null0 and at the same time use to advertise the network to BGP routers, that means this router will tell the others BGP routers if you want to reach network 192.168.0.0/16 , send it to me and I will drop it !!!

    which really does not make sense !

    thanks,

    Hi Oudmaster,

    This has to do with a rule, that in order to advertise a prefix with the network statement -- the exact route must exist in the routing table (rib).  This static route is a dummy summary route making that possible.

    I suppose that we can say that this summay is an optional method to the BGP's aggregate-address (without the ability to suppress/unsuppress longer prefixes).   The only traffic that will get dropped, is traffic that doesn't have a longer prefix.

  • Hi oudmaster,

    It really doesn't matter from the perspective of network advertisement. If it has more specific network in its routing table, then it forwards the respective traffic referencing the specific route entry. If any packet comes with the destination which is not as part of the specific network, it will be matched with the 192.168.0.0/16 and gets dropped. 

    Hope this helps!

  • JoeMJoeM ✭✭✭

    Just another side note about null routes.

    Take a look at OSPF and EIGRP (but not RIP), and see what they do when a summary-address is created.   Same thing, but for another reason.  These protocols automatically create the null route, to avoid routing loops.  

    I do not remember which lab, but there is an interesting INE lab exercise demonstrating this in RIP -- where a null route must be created manually.   Without it, a loop occurs, because the router learns the summary-address via another interface (installs/uninstalls/installs/uninstalls).    Whereas, with the directly connected null route, RIP just dropped it -- because it has a better route (connected AD).

    In summary (no pun intended)

    1.   BGP rule makes it necessary.  Network must already exist in RIB (connected or otherwise).

    2.   null routes also mitigate routing loops/flapping by having the catchall directly connected.

     

  • peetypeety ✭✭✭

    BGP has classful ancestors.  As a result, it treats "network 192.168.0.0" as a /24.  The null route present does not match, therefore we can't assume that 192.168.0.0/24 exists in the routing table (even though 192.168.0.0/16 does).  Since there's no exact match, no BGP route is originated.

    On the surface, I'd say one of two commands is missing/broken: either the network 192.168.0.0 statement is missing mask 255.255.0.0 OR the statement 'ip route 192.168.0.0 255.255.255.0 null0' is completely missing.  Since the second choice isn't offered in the multiple choices, A wins.

    if this statement will put the network into null0 and at the same time use to advertise the network to BGP routers, that means this router will tell the others BGP routers if you want to reach network 192.168.0.0/16 , send it to me and I will drop it !!!

    which really does not make sense !

    Although BGP can handle a massive quantity of routes, it's intended to handle aggregate routes, especially out on the Internet.  As such, it's quite common for BGP to advertise big routes (i.e. this /16) and let the IGP handle the more-specific routes to more-specific destinations.  As a result, the BGP /16 draws traffic _to_ this router, and the (not shown in this example) IGP handles sending the traffic _through_ this router to the correct egress node.

    For scaling reasons, all of the networks I consult for use BGP to carry their internal routes too.  In this case, BGP might carry 192.168.0.0/16, and it might carry 192.168.123.0/24.  The second route is most likely marked with the 'no-export' community, and as a result none of the upstreams or customers will ever see it.  As a result, the externally-advertised /16 brings traffic "to" this network, and the internally-restricted /24 sends traffic to the correct router.  Although this router will drop any other unrouted subnets of the /16 because of the null route, it saves the Internet from having to handle potentially 256 routes for all of the /24s within the /16.

  • the answer is A as I chose, but I really did not understand it well because of "ip route 192.168.0.0 255.255.0.0 null0"

    if this statement will put the network into null0 and at the same time use to advertise the network to BGP routers, that means this router will tell the others BGP routers if you want to reach network 192.168.0.0/16 , send it to me and I will drop it !!!

    which really does not make sense !

    Yes like our peers tell,

    Routing to null0 permit to annonce a summary in BGP, EIGRP, OSPF, RIP.

    Let add that in the case of BGP when we don't specify the mask in the network command it default to the major class (A,B,C) mask and if the specific network doesn't exist in the RIB it's not advertised.

    In your case the command defaut to "network 192.168.0.0 mask  255.255.255.0 or there is no network with tath mask so no advertisement.

  • 1. It is rather saying that, if you want to reach 192.168.0.0/16 come to me so that I can forward you to a more specifc route  you are looking for such as 192.168.1.0/24... however if I can't find the route you are looking for my routing table I'm going to blackhole the packets by sending it to null0

    2. For a route to be adverstised by BGP it has to be in the routing table, so a route to null0 ensures that BGP continues to adverstise 192.168.0.0/16 even though more specific routes like..192.168.1.0/24 or 192.168.10.208/29 may or may not be available.

    3. It also helps BGP reduce the updates to its peers when more specific routes are unavailable or flapping

     

     

Sign In or Register to comment.