Networkers Academy

        

bullet

Home            

bullet

Course Content        

bullet

Exam Tips

bullet

Testimonials

bullet

About Us

 

Subnetting Simplified Tutorial

Introduction to IP ADDRESSING

A host is a computer or device, such as a router, on a TCP/IP network.

Every TCP/IP host is uniquely identified by its IP address.

An IP address consists of a network ID and a host ID.

If two different hosts belong to the same network, they have the same network ID. The two hosts will have different host ID's and can communicate with each other locally without going through a router.

If two hosts have different network ID's, they belong to different segments on the network. They must communicate with each other remotely through a router or default gateway.

An IP address consists of 32 binary bits, where each bit is either a 0 or 1. We first write the 32 bits into four 8-bit numbers separated by a period in between each 8-bit number. 

11000001 . 00001010 . 00011110 . 00000010 (IP address in binary form)

To convert the IP address from binary to decimal form, we convert each of the four 8-bit numbers according to the following table:

8 Bit (octet)

1

1

1

1

1

1

1

1

Decimal (power of 2)

128

64

32

16

8

4

2

1

The above IP address would translate into

11000001 = 128 + 64 + 1 = 193

00001010 = 8 + 2 = 10

00011110 = 16 + 8 + 4 + 2 = 30

00000010 = 2

 So in decimal form, the IP address is:

193 . 10 . 30 . 2 

The network ID in the address consists of a certain number of bits starting from the left.

The host ID consists of the remaining bits.

---------------------------------------------------------------------------------------------------------

 Blocking / Incrementing Shortcut

In the previous example, we had the following situation in decimal form:

Network 131.107. y. z (Class B address)

Subnet mask: 255.255.224. 0

We found previously that the possible range of one of the subnets is:

131.107.32.1 through 131.107.63.254

Shortcut Method

To arrive at that result, we worked with binary bits. Next, we will use a shortcut to arrive at the same answer using only decimal numbers. This shortcut avoids the use of binary numbers.

Step 1: Take the rightmost non-zero number of the subnet mask (224).

Subtract this number from 256. (256 - 224 = 32) This is the increment.

Step 2: Append the increment to your network address.

(131.107. 32. z)

Step 3: Repeatedly add the increment (32) to the result in step 2 until you

reach the original rightmost non-zero number of the subnet mask (224).

131.107. 64.z = 131.107. ( 32 + 32) .z

131.107. 96.z = 131.107. ( 64 + 32) .z

131.107.128.z = 131.107. ( 96 + 32) .z

131.107.160.z = 131.107. (128 + 32) .z

131.107.192.z = 131.107. (160 + 32) .z

131.107.224.z but we do not accept this one because 224 corresponds to the case of a subnet ID with all 1's. (224 = 11100000)

Step 4: Write out the smallest and largest IP addresses for your subnets.

For our first subnet, we have 131.107.32.z. The smallest possible value is 131.107.32.1 because our host ID cannot have all 0's. The largest value on this subnet must be smaller than the start of the next subnet, which is 131.107.64.1. In addition, our host ID cannot have all 1's. So we eliminate 131.107.63.255 as a valid IP address. The largest value for an IP address on this subnet would be 131.107.63.254.**

** Note:

11111111 . 11111111 . 11100000 . 00000000 (subnet mask 255.255.224.0)

10000011 . 01101011 . 001 11111 . 11111110 (131.107.63.254,accepted)

10000011 . 01101011 . 001 11111 . 11111111 (131.107.63.255, largest binary value but not accepted because of all 1's in host ID)

10000011 . 01101011 . 010 00000 . 00000001 (131.107.64.1, smallest value for next subnet)

 Using the above logic, we find these to be range of values for all 6 subnets:

Subnet 1: 131.107. 32. 1 through 131.107. 63.254

Subnet 2: 131.107. 64. 1 through 131.107. 95.254

Subnet 3: 131.107. 96. 1 through 131.107.127.254

Subnet 4: 131.107. 128.1 through 131.107.159.254

Subnet 5: 131.107. 160.1 through 131.107.191.254

Subnet 6: 131.107. 192.1 through 131.107.223.254

 -----------------------------------------------------------------------------------------------

Example 2 (Class A IP addresses) 

Network : 10. X. y. z

Subnet Mask 255.240.0.0

 What are the ranges of IP addresses for all subnets?

240 is the rightmost nonzero number in the subnet mask.

256 - 240 = 16 (increment)

Append the increment to the network address until you reach 240.

10. 16.0.z

10. 32.0.z = 10. ( 16 + 16) .0 .z

10. 48.0.z = 10. ( 32 + 16) .0 .z

10. 64.0.z = 10. ( 48 + 16) .0 .z

10. 80.0.z and so on

10. 96.0.z

10.112.0.z

10.128.0.z

10.144.0.z

10.160.0.z

10.176.0.z

10.192.0.z

10.208.0.z

10.224.0.z

10.240.0.z but we do not accept this one because this corresponds to all 1's in the subnet ID.

 

Subnet 1: 10. 16. 0. 1 through 10.31.255.254 **

Subnet 2: 10. 32. 0. 1 through 10.47.255.254

Subnet 3: 10. 48. 0. 1 through 10.63.255.254

Subnet 4: 10. 64. 0. 1 through 10.79.255.254

and so forth

 

** Note:

11111111 . 11110000 . 00000000 . 00000000 (subnet mask 255.240.0.0)

00001010 . 00011111 . 11111111 . 11111110 (10.31.255.254)

is the largest possible acceptable IP address on the same subnet that is less than:

00001010 . 00100000 . 00000000 . 00000001 (10.32. 0. 1)

 

 --------------------------------------------------------------------------------------------------

 Creating Your TCP/IP Chart

 To get your answers quickly during the exam, you should use a chart that you've written down during the astronomy tutorial.

 A   1    - 126, N = 8 bits

B  128 - 191, N = 16 bits

C  192 - 223, N = 24 bits, where N = how many bits in Network ID

N + S + H = 32, where S = # of bits in Subnet ID, H = # of bits in Host ID

 

# bits

subnet

# subnets

increment

 

 # hosts

 =(2^H) - 2

in mask (S)

mask

 (2^S) - 2

256 - mask

A

B

C

2

192

2

64

4M

16K

62

3

224

6

32

2M

8K

30

4

240

14

16

1M

4K

14

5

248

30

8

500K

2K

6

6

252

62

4

250K

1K

2

7

254

126

2

130K

510

----

8

255

254

1

65K

254

----

 

You only need to remember a few things to derive the whole chart.

The second column is the sum of 128 + 64, 

                                                 128 + 64 + 32

                                                 128 + 64 + 32 + 16, and so on

The third column is (2^S) - 2, starting with S = 2

The other columns can be derived through dividing by 2.  

 

 

 

 

This website and the materials offered herein are neither affiliated with nor endorsed by Cisco Systems, Inc. "Cisco", "CCNA", "CCNP", "CCDA", and "CCIE" are all trademarks owned by Cisco Systems, Inc.
For problems or questions regarding this web contact [ProjectEmail].
Last updated: 01/02/06.

Hosted by www.Geocities.ws

1