February 22, 2011

Subnetting Notes for Beginners

Here are some notes on IP subnetting for beginners.

1 and 1 = 1, everything else = 0.

An IP v4 IP address is 32 bit and made up of four octets, each 8 bits long. The minimum octet value is 0 and the maximum octet value is 255. 4 x 8 = 32.

The decimal notation to binary chart for IP subnetting is: 128, 64, 32, 16, 8, 4, 2, 1 The sum of which is 255 (128+64+32+16+8+4+2+1). 128 is the first 1 in binary chart, 1 is the last.

To convert a IP address from decimal to binary separate each octet, e.g. 203.170.50.1

203 = 128+64+8+2+1 or 11001011
170 = 128+32+8+1 or 10101001
50 = 32+16+2 or 00110010
1 = 00000001

1 and 1 = 1
1 and 0 = 0
0 and 1 = 0
0 and 0 = 0

If your IP address is 192.168.183.91 and your subnet mask is 255.255.255.224 you can find the network address as follows:

Convert 192.168.183.91 to binary: 192=11000000, 168=10101000, 183 =10110111, 91=01011011

In full: 11000000101010001011011101011011

Convert 255.255.255.224 to binary: 255=11111111, 255=11111111, 255=11111111, 224=11100000

In full: 11111111111111111111111111100000

Now use Boolean algebra (anding) to identify the network address in binary format, remember only 1 and 1 = 1.

IP Address:          11000000101010001011011101011011

Subnet Mask:       11111111111111111111111111100000

Network Address: 11000000101010001011011101000000

11000000.10101000.10110111.01000000 = 192.168.183.64

We now know the IP address: 192.168.183.91 has a subnet mask of 255.255.255.224, a network address if 192.168.183.64. We can calculate the broadcast by subtracting the number of missing bits from the subnet mask, example:

255.255.255.255 – 255.255.255.224 = 31.

Network Address 192.168.183.64 + 31 = 95 The network broadcast address is 192.168.183.95