Subnetting IP Addresses

dimerusticΔίκτυα και Επικοινωνίες

23 Οκτ 2013 (πριν από 3 χρόνια και 1 μήνα)

79 εμφανίσεις

Subnetting IP Addresses
Subnetting is done to break a larger network into smaller networks. For example, if you have a class C
network, you have 254 possible host addresses. However, if you only need to use 28 hosts, the other
addresses would be wasted, as no one else can use them. Subnetting allows for the division of larger
networks into smaller networks.
Key ideas
Remember the binary number progression:
128 64 32 16 8 4 2 1
If you know the subnet mask
1. Subtract Subnet mask from 256
Result is starting network address and block size
2. Figure out network addresses
Add block size to self up to subnet mask
3. Figure out Broadcast addresses
One less than next network address
4. Figure out available addresses
Between Network and Broadcast

Subnetting Chart

In any octet, the number of host bits that can be taken and their corresponding subnet masks are as
follows.
Bits Taken Subnet Mask Block Size Binary equivalent
1 128 128 10000000
2 192 64 11000000
3 224 32 11100000
4 240 16 11110000
5 248 8 11111000
6 252 4 11111100
7 254 2 11111110
8 255 1 11111111
Practice writing out this chart. You can use the chart to answer questions about subnets, when you know
the subnet mask.
For example, if you need to figure out the network address for the IP 171.230.28.32 255.255.240.0.
1. Look up 240 as a subnet mask in the chart.
2. Check the block size associated with that subnet mask.
3. Starting with the original classful address, start counting up bu the block size to find the network
for the IP address you are investigating.
NOTE: The network address is always less than an IP address.
a. 171.230.0.0
b. 171.230.16.0
c. 171.230.32.0
d. 171.230.48.0
e. 171.230.64.0
f. 171.230.80.0
g. 171.230.96.0
h. etc.
4. In this example, the answer is 171.230.16.0. This is the highest subnetwork address without
going past the IP address.

Choosing the subnet mask
Step 1
Figure out how many hosts or how many networks you need-This will tell you how many bits you will
need in your subnet mask. Use the formula 2
n
-2, where n is the number of bits you will need.
For example, if you needed 28 addresses while subne tting a class C network, you would need 5 bits for
hosts. 2
5
-2=30.
You couldnt use only 4 bits because 2
4
-2= 14, which would not be enough hosts. Now that you know
how many bits you need for hosts, figure out how many are for network. In this case 3 bits are for the
network(because 8-5 is 3).
Step 2
Now that you know how many bits you need (3), calculate the subnet mask. You will be taking bits
from the left hand side of the host portion such that the eight bit binary representation is 1 1 1 0 0 0 0 0.
This is a subnet mask of 224 (128 + 64 + 32).
Step 3
Calculate the network addresses for the networks by subtracting the subnet mask from 256.
256-224= 32. This means your first subnetwork addr ess is 32. You can then calculate the rest of the
subnet addresses by adding this number to the original subnet address:
0
0+32= 32
32 + 32= 64
64 + 32=96
96 + 32=128
128 + 32=160
160 + 32=192
You cannot use 224, as the subnet mask is 224)
Step 4
Figure out the broadcast address for each network. The broadcast address will be one less than the next
network address.
Subnetwork Address Broadcast Address
0 31
32 63
64 95
96 127
128 159
160 191
192 223

The remaining addresses between the subnetwork address and the broadcast address are the valid host
addresses.

Internet addresses contain the network portion and the host portion. The network portion precedes the host portion.
For example, in a Class A IP address, the first octet (8 bits) is the Network Address, and the last three octets (24 bits) are the host address:
125.110.25.6


Other Important Addresses include the Loopback address:
127.0.0.1
The numbers 0 and 255 can not be used to represent hosts on a network.
The 0 address is used to refer to the network as a whole. For example, if your computer has the address 192.168.10.12, 192.168.10.0 is your
network.
The 255 address is used for broadcasting messages. The address 255.255.255.255 is used in autoconfiguration protocols like BOOTP an DHCP. On
a particular network, 255 will broadcast to all hosts on that network. For example, if the network portion of your IP address is 192.32.200 and the
host portion is 12, your computer can broadcast messages to all network hosts by using the destination address 192.32.200.255.


Class A Class B Class C
Address Space
1.0.0.0 to 126.255.255.255 128.0.0.0 to 191.255.255.255 192.0.0.0 to 223.255.255.255
Subnet Mask
(Default)
255.0.0.0 255.255.0.0 255.255.255.0
Reserved
Addresses
10.0.0.0 to 10.255.255.255
127.0.0.1 Loopback
172.16.0.0 to 172.31.255.255 192.168.0.0 to 192.168.255.255
Network

Host