Skip navigation
Cisco Learning Home > Certifications > Routing & Switching (CCNA) > Discussions

_Communities

This Question is Answered 1 Correct Answer available (4 pts)
9074 Views 12 Replies Latest reply: Sep 12, 2008 5:45 AM by Stuart Sheffield RSS

Currently Being Moderated

Route Selection ?

Sep 10, 2008 4:47 PM

TX858 18 posts since
Jul 3, 2008

 

I'm confused....

 

 

Given the output of 'show ip route rip' cmd below, what route would be selected for packets destined for 172.16.4.3 ?

 

 

......

 

 

Gateway of last resort is not set.

 

 

172.16.0.0 / 16 is variably subnetted, 5 subnets, 4 mastks

 

 

R 172.16.1.1 / 32 Route Selection ? via 172.16.25.2, Serial 0/1/1

R 172.16.1.0 / 24 Route Selection ? via 172.16.25.129 Serial 0/1/0

R 172.16.0.0 / 22 [120/1\ via 172.16.25.2 Serial 0/1/0

R 172.16.0.0 / 16 Route Selection ? via 172.16.25.129 Serial 0/1/0

R 0.0.0.0 / 0 Route Selection ? via 172.16.25.129 Serial 0/1/0

 

 

I've always understood that when a destination ip falls within the range of multiple routes, the route with the longest prefix wins. So my choice was the 3rd route from the top - 172.16.0.0 / 22. But the answer given is the 4th line down - 172.16.0.0 / 16.

 

 

If the text is correct, what am I missing?

 

 

Thanks!

 

 

  • Chetan 539 posts since
    Jul 26, 2008
    Currently Being Moderated
    2. Sep 10, 2008 10:09 PM (in response to TX858)
    Re: Route Selection ?

     

     

     

     

    Hello Mr. TX858,

     

     

    The correct is 4th option i.e. the packet destined for 172.16.4.3 will follow

     

     

    R 172.16.0.0 / 16 120/2 via 172.16.25.129 Serial 0/1/0

     

     

     

     

     

    According to you, the answer should be 172.16.0.0 / 22. But can u make a subnet with network address 172.16.4.0 ?

     

     

    No u can't do that.. because 4 means that you require 00000100 in the 3rd octet.

     

     

    But the possible options for 3rd octet for 172.16.0.0 / 22 are

     

     

    00000000 this is 172.16.0.0 / 22

     

     

    00000001 this is 172.16.1.0 / 22

     

     

    00000010 this is 172.16.2.0 / 22

     

     

    00000011 this is 172.16.3.0 / 22

     

     

    So u see, as only 2 bits are available in the 3rd octet......this is the not the match for packet to 172.16.4.3.

     

     

    I hope everything is clear now..

     

     

     

     

     

  • Sandeep N 7 posts since
    Sep 11, 2008
    Currently Being Moderated
    3. Sep 11, 2008 4:36 AM (in response to Chetan)
    Re: Route Selection ?

     

    Hello MR chetan,

     

     

    Referring the original scenario,

     

     

    1) What if there is a host with IP 172.16.4.3 (Whose subnet address can be considered as 172.16.4.0/22). In this case which will be prefered route?

     

     

    2) Also with 172.16.0.0 / 22 we can make following subnet address.

     

     

    a)172.16.0.0

     

     

    b)172.16.4.0 (This will contain IP 172.16.4.3)

     

     

    c)172.16.8.0

     

     

    and so on....

     

     

    I guess it is possible to make subnet with network address 172.16.4.0.

     

     

    Please comment.....

     

     

     

     

     

     

     

     

  • Stuart Sheffield 13 posts since
    Jun 26, 2008
    Currently Being Moderated
    4. Sep 11, 2008 4:55 AM (in response to Sandeep N)
    Re: Route Selection ?

     

    Hi

     

     

    Forgive me if I'm missing the point to this post but we are talking about RIP.

     

     

    As you all know this is a classful protocol and since the 172.16.4.0 network in not in the routing table it is not known so will be forwarded at the bit boundary which is /16.

     

     

    hope I've not got the wrong end of the stick here.

     

     

  • Sandeep N 7 posts since
    Sep 11, 2008
    Currently Being Moderated
    5. Sep 11, 2008 6:11 AM (in response to Stuart Sheffield)
    Re: Route Selection ?

     

    Stuart,

     

     

    The route will be through 172.16.0.0/16 (As RIP is classfull).....I guess.........

     

     

    I was bit confused when chetan updated that we cannot make a subnet 172.16.4.0. out of 172.16.0.0/22. This created other question. I was trying to clarify it. Hope it is correct.

     

     

     

     

     

    Comment.......

     

     

  • Chetan 539 posts since
    Jul 26, 2008
    Currently Being Moderated
    6. Sep 11, 2008 9:00 AM (in response to Sandeep N)
    Re: Route Selection ?

     

    Hello Sandeep,

     

     

    Dear, even i got confused when u questioned my answer..

     

     

    I think i didn't explain it properly

     

     

     

    Here is what i was actually thinking .

     

     

    With Network Address 172.16.0.0 / 22, you can make a total of 64 subnets.

     

     

    Subnets start from 172.16.0.0 / 22, 172.16.4.0 / 22, 172.16.8.0 / 22...........and last one is 172.16.252.0 / 22.

     

     

    Here in the routing table, Rip is showing first subnet of the network address 172.16.0.0 / 22.

     

     

    This

    is also known as Zero Subnet. The range of this subnet will be

    172.16.0.1 to 172.16.3.254 with 172.16.3.255 being the broadcast

    address. So there is no way that 172.16.4.3 fits into this range. Thatz why it will follow the path via 172.16.0.0/16

     

     

    And regarding your first question what if there is a host with IP 172.16.4.3, Then in this case there will be an additional entry

     

     

    in the routing table which shows like R 172.16.4.0 / 22, so this would automatically become the preferred path instead of

     

     

    172.16.0.0 / 16 .

     

     

    Please clear if i am not guessing it correctly.

     

     

    Thanks

     

     

  • Chetan 539 posts since
    Jul 26, 2008
    Currently Being Moderated
    7. Sep 11, 2008 9:18 AM (in response to TX858)
    Re: Route Selection ?

     

    Here is another simple explaination for the answer.

     

     

    The given routing table is as follows:

     

     

    172.16.0.0 / 16 is variably subnetted, 5 subnets, 4 masks

     

     

     

    R 172.16.1.1 / 32 120/1 via 172.16.25.2, Serial 0/1/1

    R 172.16.1.0 / 24 120/2 via 172.16.25.129 Serial 0/1/0

    R 172.16.0.0 / 22 [120/1\ via 172.16.25.2 Serial 0/1/0

    R 172.16.0.0 / 16 120/2 via 172.16.25.129 Serial 0/1/0

    R 0.0.0.0 / 0 120/3 via 172.16.25.129 Serial 0/1/0

     

     

    To decide the destination network of a packet, there are two guidelines :

     

     

    First, the IP of the packet must match a minimum of mask bits specified in the route in the routing table.

     

     

    Second, In case of tie, follow the route with the longest prefix match.

     

     

     

     

     

    If we assume that destination IP of packet is 172.16.4.3, there are two possible routes for this packet

     

     

    Either ,

    R 172.16.0.0 / 16 120/2 via 172.16.25.129 Serial 0/1/0

     

     

    Or,

    R 0.0.0.0 / 0 120/3 via 172.16.25.129 Serial 0/1/0

     

     

    Since there are multiple possible routes for 172.16.4.3, so to decide the final route follow the Second guideline, which states that follow the route with longest prefix match.

     

     

    Hence option 4 is the correct answer for TX's question.

     

     

    As far as route

    R 172.16.0.0 / 22 [120/1\ via 172.16.25.2 Serial 0/1/0 is concerned, packet 172.16.4.3 can't follow this route.

     

     

    I have explained this in my previous posting.

     

     

  • Chetan 539 posts since
    Jul 26, 2008
    Currently Being Moderated
    8. Sep 11, 2008 9:32 AM (in response to Stuart Sheffield)
    Re: Route Selection ?

     

    Hi Stuart and Sandeep,

     

     

    I have a question. You both wrote that RIP is classful. How can you say that classful RIP is used here in this question ?

     

     

    Rip Version 1 is classful

     

     

    Rip Version 2 is classless.

     

     

    In the routing table, both RIPv1 and RIPv2 entries are shown starting with the same prefix "R".

     

     

    So what made u think that classful version is in use here ??

     

     

     

     

     

  • Steven King 21 posts since
    Sep 11, 2008
    Currently Being Moderated
    9. Sep 11, 2008 9:41 AM (in response to Chetan)
    Re: Route Selection ?

    RIPv1 is Classful but RIPv2 is Classless. We need to distinguish which version we are dealing with here.

     

    For route R 172.16.0.0 / 22 [120/1\ via 172.16.25.2 Serial 0/1/0 You can not make 172.16.4.0 out of that Address: 172.16.0.0 10101100.00010000.000000 00.00000000 Netmask: 255.255.252.0 = 22 11111111.11111111.111111 00.00000000 Wildcard: 0.0.3.255 00000000.00000000.000000 11.11111111 => Network: 172.16.0.0/22 10101100.00010000.000000 00.00000000 HostMin: 172.16.0.1 10101100.00010000.000000 00.00000001 HostMax: 172.16.3.254 10101100.00010000.000000 11.11111110 Broadcast: 172.16.3.255 10101100.00010000.000000 11.11111111 Hosts/Net: 1022 Class B, Private Internet With route R 172.16.0.0 / 16 120/2 via 172.16.25.129 Serial 0/1/0

     

    You can make a 172.16.4.0 subnet. You have to ensure that the subnet matches the range of the route.

     

     

     

    Address: 172.16.0.0 10101100.00010000. 00000000.00000000

    Netmask: 255.255.0.0 = 16 11111111.11111111. 00000000.00000000

    Wildcard: 0.0.255.255 00000000.00000000. 11111111.11111111

    =>

    Network: 172.16.0.0/16 10101100.00010000. 00000000.00000000

    HostMin: 172.16.0.1 10101100.00010000. 00000000.00000001

    HostMax: 172.16.255.254 10101100.00010000. 11111111.11111110

    Broadcast: 172.16.255.255 10101100.00010000. 11111111.11111111

    Hosts/Net: 65534 Class B, Private Internet

     

     

     

    So as stated, the correct answer is 172.16.0.0/16

  • Paul Stewart  -  CCIE Security, CCSI 6,952 posts since
    Jul 18, 2008
    Currently Being Moderated
    10. Sep 11, 2008 4:49 PM (in response to Steven King)
    Re: Route Selection ?

    I would have thought the varying slash notation would have given away the fact that it is version 2. Althought RIPv1 is classless, you can use subnets. The prefix length is derived from the interface in which the packet is received. However, all the subnets of a particular network must be the same length in order for it to work in all cases.

  • Stuart Sheffield 13 posts since
    Jun 26, 2008
    Currently Being Moderated
    12. Sep 12, 2008 5:45 AM (in response to Chetan)
    Re: Route Selection ?

     

    Very good question

     

     

    The question/answer pointed to version 1 hence why I originally committed to that but......

     

     

    Looking again at the routing table entries I notice variable length masks which have been learnt through the routing protocol.

     

     

    This indeed indicates version 2 since in version 1 you can only have variable masks if those networks are known locally (i.e. connected).

     

     

    Unfortunately all the entries are "R" and not "C" so I guess it is indeed version 2.

     

     

    I need a lie down

     

     

Actions

More Like This

  • Retrieving data ...

Bookmarked By (0)