1

Say that we have a router with the follwing forwarding table

--------------------------------------------------
| Destination       | Next hop        | Flags    |
--------------------------------------------------
| 177.121.128.0/18  | 73.0.45.1       | G        |
| 0.0.0.0/0         | 73.0.65.1       | UG       |
--------------------------------------------------

Say also that the router receives packets with the destination address 177.121.128.2. In that case, what would happen to the packet?

Since the targeted ip-block is down (as the U flag is absent from 77.121.128.0/18) will the router drop the packet or will the router send it to the default next hop router 73.0.65.1?

4
  • In general a router should always use the best (longest-match) route available. What device/OS are we talking about here?
    – hertitu
    Sep 7 '16 at 12:51
  • None, taking a course in IP and networking at university and trying to figure out how the situation should be handled. The example is purely theoretical. So default? Sep 7 '16 at 12:54
  • Well I'm not sure what this "U" flag means exactly. If it means that the router knows this route is unavailable then yes I would expect it to follow the default route. If it means something else then maybe the router will still try to send the packet to 73.0.45.1, and what happens then depends on what is wrong. Most probably the packet gets blackholed.
    – hertitu
    Sep 7 '16 at 13:05
  • So did you really mean 177.121.128.2, or is the packet's destination 77.121.128.2 ?
    – hertitu
    Sep 7 '16 at 13:28
1

In my experience with Cisco devices if it knows that the first gateway is unreachable (which it appears to know since it doesn't have the U flag), then it will move to the next entry on the list that provides the best match for the destination which is the quad zero.

***The routing table says that anything destined for 77.121.128.0/18 will be sent to 73.0.45.1. Packets destined for all other IP address will follow the quad zero rule; that is they will be sent to 73.0.65.1.

As such any packets destined for 177.121.128.2 will be sent to 73.0.65.1; in accordance with the rules in the routing table.***

4
  • Well, do you agree that it depends on what the flags in the routing table mean? If the absence of "U" means "don't use this route" then all packets, including the ones destined for 177.121.128.2 will follow the default route.
    – hertitu
    Sep 7 '16 at 13:07
  • I do agree with you @hertitu, however whether or not 73.0.45.1 is up doesn't affect where packets destined for 177.121.128.2 will be sent. It is one of those questions where there is extraneous information. I merely said, what the routing table says, not what it is going to do because the first gateway is down, which doesn't affect the path for data meant for 177.121.128.2., Sep 7 '16 at 13:10
  • Well not that I want to continue arguing per se (I think we're on the same page overall), but you assume that the absence of "U" means that next-hop is down. I agree that that is probably correct, but since we're talking about a hypothetical router, I think we also need to consider the hypothetical possibility that the absence of "U" means "do not use this route".
    – hertitu
    Sep 7 '16 at 13:24
  • I think we are, but the absence of U doesn't affect anything, seeing as how the destination doesn't match the first route at all. Sep 7 '16 at 13:37
1

In general a router should always use the best (longest-match) route available.

I'm not familiar with the output format you quote, so not sure if that router considers the /18 route as available. In that case it will try forwarding the packet to 73.0.45.1 which probably means it gets dropped.

(Real world example: a static route with the next-hop on an ethernet interface but the next-hop is down; the router doesn't "know" this so it still considers the route as active but packets get dropped because it cannot arp the next-hop).

If the absence of the U flag means "do not use this route", i.e. the router knows the route is not available, then I expect it to use the default route instead.

(Real world example: a static route with the next-hop on a serial interface but the next-hop is down; the router "knows" this because the serial interface is down so it removes the route from the routing table and traffic follows the default route).

7
  • It doesn't matter if the first route is up or down as it doesn't match the destination for the packets. As such it wouldn't get used for packets trying to reach 177.X.X.X Sep 7 '16 at 13:18
  • @ZackScaringello: ahhhh ok - could it be a typo (or is it a trick question from the OP or from their college professor) ? My comments and answer were based on the assumption that the packet destination is 77.121.128.2, not 177.121.128.2
    – hertitu
    Sep 7 '16 at 13:27
  • It is entirely possible that it is a typo, however I think it could be a trick question as many people tend to gloss over IP addresses if they look similar to data they are expecting. This could be one of those "you need to pay attention and not assume things" lessons. Sep 7 '16 at 13:38
  • @ZackScaringello: lesson learnt :) Well I'm sure that I would have caught it if this had been on a CCIE exam, but on SE I was not expecting trick questions :) Also the "Since the targeted ip-block is down" makes me think it is a typo, otherwise it's misleading rather than tricking IMHO.
    – hertitu
    Sep 7 '16 at 13:44
  • .@hertitu It is possible it is a typo, however he did say it was from some coursework, so it could be a typo or it could be deliberately misleading. Sep 7 '16 at 14:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.