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
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
Network | Hosts | Broadcast Address | |
from | to | ||
192.168.1.0 | 192.168.1.1 | 192.168.1.62 | 192.168.1.63 |
192.168.1.64 | 192.168.1.65 | 192.168.1.126 | 192.168.1.127 |
192.168.1.128 | 192.168.1.129 | 192.168.1.190 | 192.168.1.191 |
192.168.1.192 | 192.168.1.193 | 192.168.1.254 | 192.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
Network | Hosts | Broadcast Address | |
from | to | ||
192.168.1.0 | 192.168.1.1 | 192.168.1.14 | 192.168.1.15 |
192.168.1.16 | 192.168.1.17 | 192.168.1.30 | 192.168.1.31 |
192.168.1.32 | 192.168.1.33 | 192.168.1.46 | 192.168.1.47 |
192.168.1.48 | 192.168.1.49 | 192.168.1.62 | 192.168.1.63 |
192.168.1.64 | 192.168.1.65 | 192.168.1.78 | 192.168.1.79 |
192.168.1.80 | 192.168.1.81 | 192.168.1.94 | 192.168.1.95 |
192.168.1.96 | 192.168.1.97 | 192.168.1.110 | 192.168.1.111 |
192.168.1.112 | 192.168.1.113 | 192.168.1.126 | 192.168.1.127 |
192.168.1.128 | 192.168.1.129 | 192.168.1.142 | 192.168.1.143 |
192.168.1.144 | 192.168.1.145 | 192.168.1.158 | 192.168.1.159 |
192.168.1.160 | 192.168.1.161 | 192.168.1.174 | 192.168.1.175 |
192.168.1.176 | 192.168.1.177 | 192.168.1.190 | 192.168.1.191 |
192.168.1.192 | 192.168.1.193 | 192.168.1.206 | 192.168.1.207 |
192.168.1.208 | 192.168.1.209 | 192.168.1.222 | 192.168.1.223 |
192.168.1.224 | 192.168.1.225 | 192.168.1.238 | 192.168.1.239 |
192.168.1.240 | 192.168.1.241 | 192.168.1.254 | 192.168.1.255 |
For more help on calculating subnet mask, click here.
For information on IP Classes, click here
No comments:
Post a Comment