Thursday, June 4, 2009

Subnetting

Applying a subnet mask to an IP address allows you to identify the network and node parts of the address. The network bits are represented by the 1s in the mask, and the node bits are represented by the 0s.

Default subnet masks:
  • Class A - 255.0.0.0 - 1111 1111 . 0000 0000 . 0000 0000 . 0000 0000
  • Class B - 255.255.0.0 - 1111 1111 . 1111 1111 . 0000 0000 . 0000 0000
  • Class C - 255.255.255.0 - 1111 1111 . 1111 1111 . 1111 1111. 0000 0000
For an IP range = 256 ( 0 - 255 )
0 is a Network Address, while 255 is a Broadcast Address. This number can't be used/set as an IP address. Any IP number that were set as a Network/Broadcast Address can't be used.


eg. A customer/client needs you to set 4 subnet for her/him. What can you do?
255 . 255 . 255 . 0
0000 0000
1100 0000
2^n = 4
2^2 = 4
▒ 4 -> segments
▓ Subnet mask = 128 + 64 = 192
▓ Subnet = 2 (1's) = 2^2 = 4
▓ Hosts = 2 (0's) = 2^6 = 64

Table of Network, Broadcast, & IP range
NetworkHostsBroadcast Address
fromto
192.168.1.0192.168.1.1192.168.1.62192.168.1.63
192.168.1.64192.168.1.65192.168.1.126192.168.1.127
192.168.1.128192.168.1.129192.168.1.190192.168.1.191
192.168.1.192192.168.1.193192.168.1.254192.168.1.255

eg. In KISMEC, there were 9 dept. You were ask to create 9 subnet for them. Calculate it?
255 . 255 . 255 . 0
0000 0000
1111 0000
2^n = 16
2^4 = 16
▒ 16 -> segments
▓ Subnet mask = 128 + 64 + 32 + 16 = 240
▓ Subnet = 2 (1's) = 2^4 = 16
▓ Hosts = 2 (0's) = 2^4 = 16

Table of Network, Broadcast, & IP range
NetworkHostsBroadcast Address
fromto
192.168.1.0192.168.1.1192.168.1.14192.168.1.15
192.168.1.16192.168.1.17192.168.1.30192.168.1.31
192.168.1.32192.168.1.33192.168.1.46192.168.1.47
192.168.1.48192.168.1.49192.168.1.62192.168.1.63
192.168.1.64192.168.1.65192.168.1.78192.168.1.79
192.168.1.80192.168.1.81192.168.1.94192.168.1.95
192.168.1.96192.168.1.97192.168.1.110192.168.1.111
192.168.1.112192.168.1.113192.168.1.126192.168.1.127
192.168.1.128192.168.1.129192.168.1.142192.168.1.143
192.168.1.144192.168.1.145192.168.1.158192.168.1.159
192.168.1.160192.168.1.161192.168.1.174192.168.1.175
192.168.1.176192.168.1.177192.168.1.190192.168.1.191
192.168.1.192192.168.1.193192.168.1.206192.168.1.207
192.168.1.208192.168.1.209192.168.1.222192.168.1.223
192.168.1.224192.168.1.225192.168.1.238192.168.1.239
192.168.1.240192.168.1.241192.168.1.254192.168.1.255

For more help on calculating subnet mask, click here.
For information on IP Classes, click here

No comments:

Post a Comment