newbie question about routing table content

johnifanx98johnifanx98 Member Posts: 329
router A
#show ip route
Gateway of last resort is not set

172.16.0.0/24 is subnetted, 3 subnets
C 172.16.4.0 is directly connected, Serial 0
C 172.16.6.0 is directly connected, eth0
C 172.16.8.0 is directly connected, eth1


"172.16.0.0/24" confuses me. Should it be "172.16.0.0/16"?!

Comments

  • kryollakryolla Member Posts: 785
    do you have any interfaces with that mask or are getting any updates with that mask?
    Studying for CCIE and drinking Home Brew
  • networker050184networker050184 Mod Posts: 11,962 Mod
    All your networks have a /24 mask. Get one on there with a different mask and it will change to 172.16.0.0/16.
    An expert is a man who has made all the mistakes which can be made.
  • johnifanx98johnifanx98 Member Posts: 329
    kryolla wrote: »
    do you have any interfaces with that mask or are getting any updates with that mask?

    No. It just demos how router shows its routing table with one serial and two ehternet connected.
  • SlowhandSlowhand Mod Posts: 5,161 Mod
    Looks like your router is taking the three IP ranges and summarizing them. Not well, mind you, you can summarize those three much more efficiently than rounding up to /24, but it's definitely summarizing.

    Free Microsoft Training: Microsoft Learn
    Free PowerShell Resources: Top PowerShell Blogs
    Free DevOps/Azure Resources: Visual Studio Dev Essentials

    Let it never be said that I didn't do the very least I could do.
  • kryollakryolla Member Posts: 785
    No. It just demos how router shows its routing table with one serial and two ehternet connected.

    it looks like you are not familiar with the routing table. Once you configure a interface with an IP address and mask and is in a up/up state. It will be in the routing table as directly connected with the subnet you put on the interface.
    Studying for CCIE and drinking Home Brew
  • tech-airmantech-airman Member Posts: 953
    router A
    #show ip route
    Gateway of last resort is not set

    172.16.0.0/24 is subnetted, 3 subnets
    C 172.16.4.0 is directly connected, Serial 0
    C 172.16.6.0 is directly connected, eth0
    C 172.16.8.0 is directly connected, eth1


    "172.16.0.0/24" confuses me. Should it be "172.16.0.0/16"?!

    johnifanx98,

    Let me see if I can help you with your confusion.

    Generally speaking, a network address has two parts: a) Network part b) Host part. The private IP network address for a Class B address is 172.16.0.0/16. The network part being 172.16. and the host part being .0.0 based on the default mask of /16 or 255.255.0.0. Now, when you subnet a network, you borrow bits from the host part to accomplish that. So, when you read "172.16.0.0/24" it was of an "incomplete reading" issue. To read that line complete enough is "172.16.0.0/24 _is subnetted_..." So what the /24 refers to is NOT the default mask for the NETWORK 172.16.0.0 but instead it refers to the SUBNET mask for the SUBnetworks 172.16.4.0, 172.16.6.0, and 172.16.8.0.

    Does my explanation help?
  • johnifanx98johnifanx98 Member Posts: 329
    johnifanx98,

    Let me see if I can help you with your confusion.

    Generally speaking, a network address has two parts: a) Network part b) Host part. The private IP network address for a Class B address is 172.16.0.0/16. The network part being 172.16. and the host part being .0.0 based on the default mask of /16 or 255.255.0.0. Now, when you subnet a network, you borrow bits from the host part to accomplish that. So, when you read "172.16.0.0/24" it was of an "incomplete reading" issue. To read that line complete enough is "172.16.0.0/24 _is subnetted_..." So what the /24 refers to is NOT the default mask for the NETWORK 172.16.0.0 but instead it refers to the SUBNET mask for the SUBnetworks 172.16.4.0, 172.16.6.0, and 172.16.8.0.

    Does my explanation help?

    Lots of help. Apologies I was not able to clarify my question enough. It seems like the language used by router is different than what I learned from textbooks. "172.16.0.0/24" does give me an wrong impression that there exist a network of 172.16.0.0 with netmask 25.255.255.0. However, I do not quite understand your explanation. Is there any official doc explaining this?
  • networker050184networker050184 Mod Posts: 11,962 Mod
    It is only giving you 172.16.0.0/24 because all your routes in that classful range (172.16.0.0./16) have a /24 mask. For instance if you had a few subnets with /25 masks only the statement would say 172.16.0.0/25 subnetted. When you mix different masks in the classful network then it will give you the classful network subnetted with the proper mask next to each entry.

    Slowhand wrote: »
    Looks like your router is taking the three IP ranges and summarizing them. Not well, mind you, you can summarize those three much more efficiently than rounding up to /24, but it's definitely summarizing.

    No summarizing going on here. Its just the way the routing table displays the routes.
    An expert is a man who has made all the mistakes which can be made.
  • johnifanx98johnifanx98 Member Posts: 329
    what's more, for VLSM demonstration, it looks a bit more reasonable, but I still wonder if there is any other reason behind it rather than incomplete reading ...


    172.16.0.0/24 is variably subnetted, 3 subnets, 2 masks
    C 172.16.4.0/30 is directly connected, Serial 0
    C 172.16.0.0/24 is directly connected, eth0
    C 172.16.8.0/24 is directly connected, eth1
  • johnifanx98johnifanx98 Member Posts: 329
    It is only giving you 172.16.0.0/24 because all your routes in that classful range (172.16.0.0./16) have a /24 mask. For instance if you had a few subnets with /25 masks only the statement would say 172.16.0.0/25 subnetted. When you mix different masks in the classful network then it will give you the classful network subnetted with the proper mask next to each entry.

    Thanks for clarification. It seems like that this is the way router shows its content. But I just wonder why it's using this misleading format...
  • johnifanx98johnifanx98 Member Posts: 329
    No summarizing going on here. Its just the way the routing table displays the routes.

    Just realized that RIPv1 has limitation of not advertising netmask. So maybe this way of displaying routing table has something to do with summarizing, but again not the summarizing I learned from textbooks. Is it possible?
  • networker050184networker050184 Mod Posts: 11,962 Mod
    Just realized that RIPv1 has limitation of not advertising netmask. So maybe this way of displaying routing table has something to do with summarizing, but again not the summarizing I learned from textbooks. Is it possible?

    The routing table will display this way regardless if you have a routing protocol enabled or not.
    An expert is a man who has made all the mistakes which can be made.
  • SlowhandSlowhand Mod Posts: 5,161 Mod
    No summarizing going on here. Its just the way the routing table displays the routes.
    Yup, I took a second look at this thread when I hadn't been up working until 4am the night before, and realized that there wasn't. Man, those late-nights/early mornings are really braining my damage.

    Free Microsoft Training: Microsoft Learn
    Free PowerShell Resources: Top PowerShell Blogs
    Free DevOps/Azure Resources: Visual Studio Dev Essentials

    Let it never be said that I didn't do the very least I could do.
  • tech-airmantech-airman Member Posts: 953
    Lots of help. Apologies I was not able to clarify my question enough. It seems like the language used by router is different than what I learned from textbooks. "172.16.0.0/24" does give me an wrong impression that there exist a network of 172.16.0.0 with netmask 25.255.255.0. However, I do not quite understand your explanation. Is there any official doc explaining this?

    johnifanx98,

    I think maybe the confusion is that you're using the same term "network" for both the network and subnetwork.

    172.16.0.0 255.255.0.0 or 172.16.0.0/16 is a network because it is classful. Here it is in decimal/binary format...
    Network
    172.016.00000000.00000000
    Default Mask
    255.255.00000000.00000000
    
    Result
    172.016.|00000000.00000000
    172.016.|0.0
    

    172.16.0.0 255.255.255.0 or 172.16.0.0/24 is a SUBnetwork because in order to extend the network side, some bits were borrowed from the host side, specifically the entire third octet as follows...
    Subnetwork
    172.016.00000000.00000000
    Subnet Mask
    255.255.11111111.00000000
    
    Result
    172.016.00000000.|00000000
    172.016.0.|0
    

    So the thing is, 172.16.0.0 is BOTH a network address AND a SUBnetwork address. The way to tell them apart is the mask. The network 172.16.0.0 has a default mask of 255.255.0.0 or /16. The SUBnetwork 172.16.0.0 has a SUBNET mask of 255.255.255.0 or /24. Does this help any more?
  • APAAPA Member Posts: 959
    The key is reading those output again and paying close attention to two lines...

    1)172.16.0.0/24 is subnetted, 3 subnets

    2)172.16.0.0/24 is variably subnetted, 3 subnets, 2 masks

    1) is occuring because all your networks have a /24 network

    2)is correct in saying it's variably subnetted but it should not be occuring with a /24.... as saying 172.16.0.0/24 is variably subnetted is incorrect when you have a /30 subnet that doesn't even belong to the 172.16.0.0/24 prefix... I think you may have found a bug...

    Output from my 1841 running 12.4T when using different prefixes from 172.16.0.0/16

    172.16.0.0/16 is variably subnetted, 4 subnets, 2 masks
    C 172.16.4.0/30 is directly connected, Loopback4
    C 172.16.1.0/24 is directly connected, Loopback1
    C 172.16.2.0/24 is directly connected, Loopback2
    C 172.16.3.0/24 is directly connected, Loopback3

    Hope this helps...

    What router and what image are you using?

    CCNA | CCNA:Security | CCNP | CCIP
    JNCIA:JUNOS | JNCIA:EX | JNCIS:ENT | JNCIS:SEC
    JNCIS:SP | JNCIP:SP
  • johnifanx98johnifanx98 Member Posts: 329
    APA wrote: »
    The key is reading those output again and paying close attention to two lines...

    1)172.16.0.0/24 is subnetted, 3 subnets

    2)172.16.0.0/24 is variably subnetted, 3 subnets, 2 masks

    1) is occuring because all your networks have a /24 network

    2)is correct in saying it's variably subnetted but it should not be occuring with a /24.... as saying 172.16.0.0/24 is variably subnetted is incorrect when you have a /30 subnet that doesn't even belong to the 172.16.0.0/24 prefix... I think you may have found a bug...

    Output from my 1841 running 12.4T when using different prefixes from 172.16.0.0/16

    172.16.0.0/16 is variably subnetted, 4 subnets, 2 masks
    C 172.16.4.0/30 is directly connected, Loopback4
    C 172.16.1.0/24 is directly connected, Loopback1
    C 172.16.2.0/24 is directly connected, Loopback2
    C 172.16.3.0/24 is directly connected, Loopback3

    Hope this helps...

    What router and what image are you using?

    My typo. You're right. When variably subnetted, it's "172.16.0.0/16", not "172.16.0.0/24". I just quoted this from a book.

    BTW, if a 172.16.0.0 is subnetted into subnets of purely mask 30, would it be like following?

    172.16.0.0/30 is subnetted, 4 subnets
    C 172.16.4.0/30 is directly connected, Loopback4
    C 172.16.1.0/30 is directly connected, Loopback1
    C 172.16.2.0/30 is directly connected, Loopback2
    C 172.16.3.0/30 is directly connected, Loopback3
    ......
  • billscott92787billscott92787 Member Posts: 933
    172.16.0.0/30 is subnetted, 4 subnets
    C 172.16.4.0/30 is directly connected, Loopback4
    C 172.16.1.0/30 is directly connected, Loopback1
    C 172.16.2.0/30 is directly connected, Loopback2
    C 172.16.3.0/30 is directly connected, Loopback3


    a /30 masks indicates that we are interested in the last octect so let's take the network address

    172.16.0.0 which has a classful mask of /16. We are going to address it with a /30 mask


    10101100.00010000.00000000.00000000
    11111111.11111111.11111111.11111100 (/30)

    /30 = 252, so you would need to calculate the subnet block first which is 256 - 252 which equals 4. So the addressing would go like this:

    * you may be asking where am I getting the 252?

    look at the first 6 ones. Look at the places they are in. Remember 128 + 64 + 32 + 16 + 8 + 4 + 2 + 1


    So we are filling up the first six space 128+64+32+16+8+4 = 252



    172.16.0.0 /30
    172.16.0.4 / 30
    172.16.0.8 /30
    172.16.0.12 /30
    172.16.0.16 / 30

    You are focusing on the fact that the address has a /16 mask. That's why you were breaking it down in the third "octect" instead of the fourth. VLSM doesn't care at all about the "classful" mask. This is the purpose of VLSM to further get the best usage out of addressing space. I hope this helps. I'd check out some further tutorials and try to understand it on your own. Honestly every text I have read has confused me. I learned it on my own and practicing subnetting questions, then reviewing the answers.
Sign In or Register to comment.