# What is subnetting?

What are the subnet mask, first available host address of subnet one (NOT subnet zero), and the maximum number of hosts per subnet for the network below? (You need to allow for maximum number of hosts. Also, you can use subnet zero and all-ones subnet. RFC 1878)

Network ID: 129.209.0 .0

Subnets Required: 117

``````         255.255.254.0
``````

1st Available Host Address of Subnet 1:

``````        129.209.2..1
``````

Max # of hosts/subnet: 510

How did it get this answer? I read it in the book but can't understand it. I am looking for a step by step and detailed answer.

-

2^7 = 128 subnets, assuming ip subnet-zero is enabled.

Since 2^6 is only 64, and we require 117, 6 bits is not enough for 117 subnets and we will borrow 7 bits.

Therefore 7 bits are in use for subnetting (2^7), and we can now display it in binary form:

11111111.11111111.11111110.00000000

That is our subnet mask, 255.255.254.0. Take a look at the third octet, which is where we started borrowing bits. Since our starting address is class B address, we start subnetting in octet 3.

Now we take our network ID, 129.208.0.0 and apply subnet number 1 to it. Remember, our subnetting takes place in the first 7 bits of octet 3:

11111111.11111111.00000010.00000000

This is the binary form of subnet 1, 255.255.2.0. When applied to our network ID:

129.208.2.0

This is our subnetted network ID. For the first host, we simply increment our host bits (the last 9 binary bits):

129.208.2.1

or, in binary:

10000001.11010000.00000010.00000001

• We have 9 bits for hosts available, 2^9 = 512 hosts, subtract 2 for network ID and broadcast number. This leaves 510 hosts per subnet.
-
Arin, this is the explanation. John T. knows what he is talking about. – Everett Nov 20 '10 at 21:46
thank you very much , this is useful – arin Nov 20 '10 at 21:51

You can calculate all this using some simple binary conversion, but I find the easiest is to just use a cheat sheet like the one on packetlife.net (search for IPv4 Subnetting)

So let me walk you through it:

The 129.209.0.0 network would have a subnet mask of 255.255.0.0. This would allow for 65536 addresses within that network.

You want to divide that up in 117 networks so 65536/117 gives you about 560 addresses per subnet.

The closest you can get to that is 512 addresses, the mask that gives you this is 255.255.254.0

Of these 512 addresses per subnet, only 510 are usable for addressing hosts. The first one is the network address and the last one is the broadcast address.

Now finally, you take the base network 129.209.0.0 and apply that 255.255.254.0 netmask. The first subnet (subnet 0) you get will end at 129.209.1.255, and so the next network will be 129.209.2.0 . The first host of this network will be 129.209.2.1

-
Be cautious, you can't use any calculators (let alone subnet calculators) in most networking exams. – John T Nov 20 '10 at 21:52