Question:

How does a Cisco network router determine "subnet zero"?

by  |  earlier

0 LIKES UnLike

Hello everyone,

I understand the concept of subnet zero and the "ip zubnet zero" command. I'm having problems figuring out how the Cisco router knows which subnet is actually subnet zero, though.

For example, if I have a network 10.0.50.0 class C, and divide it into 64 host chunks, I might assign 10.0.50.1 /27 to an interface. This would be "subnet zero". But how does the router know that my original network was a class C? What if it was a class B, and I am creating 16,384 subnets.

In this case 10.0.0.0 /27 would be "subnet zero". How does a Cisco router detect which subnet is actually subnet zero without telling it your larger network (e.g. 10.0.0.0 /16)?

Thanks for any clarification you can provide.

Phil

 Tags:

   Report

3 ANSWERS


  1. it knows by your subnet mask which class it is examples 255.255.255.0 class c 255.255.0.0 class b 255.0.0.0 class a


  2. I believe it is a matter of the router's perspective of the world.

    The router's largest subnet determines its zero subnet.  If the router has a network configured of 10.x.x.x/24 and 10.x.x.x/16, then it knows that its subnet zero is 10.x.0.0/16 because that is the first subnet created after applying the netmask.

    So, your router will always see the zero subnet based on the addresses and netmasks assigned to the interfaces on it.  It doesn't care about possible zero subnets, it only cares about the ones it knows about.

    In your example, if the largest subnet your router knows about on any of its interfaces is 10.0.0.0/27, then that is where its subnet zero is because that is the first subnet in the address block it knows about.  It doesn't care about subnets outside of itself because it shouldn't be seeing traffic from those subnets.

    I don't think subnet zero really has any significance anymore.  It used to be that using addresses in the zero subnet could cause problems, but that is no longer the case.

  3. Ok.. Subnetting can get confusing..

    When you asign an interface an IP address and subnet mask, the subnet that the interface is in is Subnet zero. So in your example, you have given it an IP address of 10.0.50.1, Which means that whatever subnet it is in, is subnet zero.. You gave a mask of 27 so the base address (the network address) is 10.0.50.0 and the broadcast address (the top address) is 10.0.50.31.. The next subnet up starts at 10.0.50.32 as the network address, and goes up to 10.0.50.63 for the broadcast address.

    Your Cisco router (or any other make of router or network aware product that uses TCP/IP for that matter) doesn't know about your concept of Class A, Class B and Class C addresses, it only understands the binary IP address and Binary Subnet mask.. How we humans divide the network into A,B and C is arbitrary, therefore, it isn't expecting a subnet mask of 16 any more than it is 23 or 25 or even 7..

    As an example, just to make it a little more interesting, say you have an interface of 10.56.243.73, Here is a list of the Subnet Zeros (An alternate way of describing the network address) for each:

    Mask    Subnet               Hosts per subnet

    32         10.56.243.73    1

    31         You cant             0

    30         10.56.243.72     2

    29         10.56.243.72     6

    28         10.56.243.64     14

    27         10.56.243.64     30

    26         10.56.243.64     62

    25         10.56.243.0       126

    24         10.56.243.0       254

    23         10.56.242.0       512

    22         10.56.240.0       1022

    21         10.56.240.0       2046

    20         10.56.240.0       4094

    19         10.56.224.0       8190

    18         10.56.192.0      16382

    17         10.56.128.0      32766

    16         10.56.0.0           65534

    15         10.56.0.0         131070

    14         10.56.0.0         262142

    13         10.56.0.0         524286

    12         10.48.0.0       1048574

    11         10.32.0.0       2097150

    10         10.0.0.0         4194302

    9           10.0.0.0        8388606

    8           10.0.0.0       16777214

    7            10.0.0.0      33554430

    6            8.0.0.0        67108862

    5            8.0.0.0        133217726

    4            0.0.0.0        268435454

    3            0.0.0.0        536870910

    2            0.0.0.0        1073741822

    1            0.0.0.0        2147483646

    0            0.0.0.0        4294967294 (Which is the theoretical maximum number of hosts on the internet, although we have far more because we have ddynamic NAT, which allows (theortically) this number x 65536 (number of useable TCP ports) of hosts on the internet..

    The router decides the Subnet range that the interface is in from the mask, and the IP and Range and mask are both set by you.

Question Stats

Latest activity: earlier.
This question has 3 answers.

BECOME A GUIDE

Share your knowledge and help people by answering questions.