IP Addressing Subnetting
SUBNETTING
Subnetting an IP Network can be done for a variety of reasons, including organization structure, use of different physical media (such as Ethernet, FDDI, WAN, etc.), preservation of address space, and security. The most common reason is to control network traffic. In an Ethernet network, all nodes on a segment see all the packets transmitted by all the other nodes on that segment. Performance can be adversely affected under heavy traffic loads, due to collisions and the resulting of retransmissions. A router is used to connect network segments to minimize the amount of traffic each segment must receive.
Subnet Masking
Applying a subnet mask to an IP address allows you to identify the network and node parts of the address. Performing a bitwise logical AND operation between the IP address and the subnet mask results in the Network Address. For example, using our test IP address and the default Class B subnet mask, we get:
|
Binary |
Decimal |
Description |
|
10001100.10110011.11110000.11001000 |
140.179.240.200 |
Class
Address |
|
11111111.11111111.00000000.00000000 |
255.255.0.0 |
Default
Subnet |
|
AND |
|
|
|
|
140.179.0.0 |
Network |
Default subnet masks:
Class A - 255.0.0.0 - 11111111.00000000.00000000.00000000
Class B - 255.255.0.0 - 11111111.11111111.00000000.00000000
Class C - 255.255.255.0 - 11111111.11111111.11111111.00000000
More Restrictive Subnet Masks
Additional bits can be added to the default subnet mask for a given Address Class to further subnet, or break down, a network. When a bitwise logical AND operation is performed between the subnet mask and IP address, the result defines the Subnet Address. There are some restrictions on the subnet address. Node addresses of all "O"s and all "1 "s are reserved for specifying the local network (when a host does not know it's network address) and all hosts on the network (broadcast address), respectively. This also applies to subnets. A subnet address cannot be all "O"s or all "1 "s. This also implies that a 1 bit subnet mask is not allowed (at least 2 bits). This restriction is required because older standards enforced this restriction. But, for classless type IP address, this restriction do not apply anymore provided that the router must be told that you want to use these addresses. It just a convention used in IP address allocation for all 0's and 1's.
The RULES for allocating IP numbers
1. All hosts on the same physical network must use the same unique prefix (network number) e.g.:
10101001 11011110 00010000 0xxxxxxx
2. The remaining part (host number) must be different for each host, e.g.:
10101001 11011110 00010001 0xxxxxxx
3. Host numbers of all zeros and all -ones are reserved e.g.:
1. Network number
10101001 11011110 00010001 00000000
2. Broadcast address
10101001 11011110 00010001 01111111
Recent standards that allow use of these subnets have superceded these standards, but many "legacy" devices do not support the newer standards. If you are operating in a controlled environment, such as a lab, you can safely use these restricted subnets. To calculate the number of subnets or nodes, use the formula (2" - 2) where n = number of bits in either field (network or host). Multiplying the number of subnets by the number of nodes available per subnet gives you the total number of nodes available for your class address and subnet mask. Also, note that although subnet masks with non-contiguous mask bits are allowed they are not recommended.
Example:
|
Binary representation |
Decimal |
Description |
|
|
New network portion |
Host portion |
|
|
|
10001100.10110011.11011100.11001000 |
140.179.220.200 |
Class B
Address |
|
|
11111111.11111111.11100000.00000000 |
255.255.224.0 |
Subnet |
|
|
AND Operation |
|
|
|
|
10001100.10110011.11000000.00000000 |
140.179.192.0 |
Subnet Mask |
|
|
10001100.10110011.11011111.11111111 |
140.179.223.255 |
Broadcast Address |
|
In this example a 3 bit subnet mask (111) was used. So, there are 6 (23-2=6) subnets available with this size mask (remember that subnets with all 0's and all 1's are not allowed). Each subnet has 8190 nodes. Each subnet can have nodes assigned to any address between the Subnet address and the Broadcast address. This gives a total of 49,140 nodes for the entire class B address subnetted this way. Notice that this is less than the 65,534 nodes in an unsubnetted class B address would have.
Calculation: Subnetted class B IP address
Class B total new subnetted network = 23-2
= 6 subnets
minus reserved IP persubnet (all 0's and all 1's) = 2 x 6 = 12 IP addresses
Class B total host per subnet (16-3=13 bits) =213- 2 = 8192 hosts per subnet
Total host per new subnetted class B address = 6 x 8192
= 49152 - 12
= 49140 hosts.
Subnetting always reduces the number of possible nodes for a given network. There are complete subnet tables available here for Class A, Class B and Class C. These tables list all the possible subnet masks for, each class, along with calculations of the number of networks, nodes and total hosts for each subnet. This is the beginning of the Classless IP address and then the Class type IP address become history.
AN EXAMPLE
Here is another, more detailed, example. Say you are assigned a Class C network number of 200.133.175.0. You want to utilize this network across multiple small groups within an organization. You can do this by subnetting that network with a subnet address.
Let say, we will break this network into 14 subnets of 14 nodes each. This will limit us to 196 nodes on the network instead of the 254 we would have without subnetting, but gives us the advantages of traffic isolation and security. To accomplish this, we need to use a subnet mask 4 bits long.
24 - 2 = 16 - 2 = 14 subnets or new networks
Given the class C IP address: 200.133.175.0
Recall that the default Class C subnet mask is:
255.255.255.0 (11111111.11111111.11111111.00000000 binary
Extending this by 4 bits yields a mask of
255.255.255.240 (11111111.11111111.11111111.11110000 binary)
This gives us 16 possible network numbers, 2 of which cannot be used:
The new network/subnet will start on:
200 .133 .175 .16
110010000 10000101 10101111 00010000 (all 0's)
200 .133 .175 .32
110010000 10000101 10101111 00100000
200 .133 .175 .48
110010000 10000101 10101111 00110000
200 .133 .175 .64
110010000 10000101 10101111 01000000
Let translate our design into a network diagram as follows.
- 315 reads
Recent popular content



















