CNE Tutorial 05 - CIDR - and - Subnetting
CNE Tutorial 05 - CIDR - and - Subnetting
Week 5
IP Classless Addressing - CIDR
and Subnetting
Classless Inter-Domain Routing (CIDR) is a system of IP addressing and routing that solves
the many problems of “classful” addressing by eliminating fixed address classes in favor of
a flexible, multiple-level, hierarchical structure of networks of varying size.
Since there are no address classes in CIDR, one cannot tell the size of the network ID of an
address from the address alone. In CIDR, the length of the prefix (network ID) is indicated by
placing it following a slash after the address. This is called CIDR notation or slash notation.
Example:
Classless Network:
210.245.52.0/26
26 bits for prefix length (Network ID) and 6 bits for Host ID:
11010010 11110101 00110100 00000000
Binary Subnet mask for /26 network:
11111111 11111111 11111111 11000000
Binary Subnet mask converted to dotted decimal:
255.255.255.192
2. Subnetting:
Subnetting occurs when we take an address prefix that correspond to a physical locale
and extend it into longer sub-prefixes that correspond to smaller locales.
Say you're responsible for administering the IP network of HANU. HANU is assigned a
block of IP: 210.245.52.0/26. There are three new departments FIT, FMT and FCS. FIT has
20 PCs, FMT has 10 PCs and FCS has 5 PCs. Please assign IP addresses to each department.
- Look at the table of “CIDR Address Blocks and Classful Equivalents” above we
can find the subnet mask for 210.245.52.0/26 is 255.255.255.192
- Or you can look at this illustration to see the simple way we can do to find
subnet mask:
- Or we can use binary notation. See the example in the previous part.
2. Find the first address and the last address of IP block
a. First IP address: 210.245.52.0, which is the network address
b. Last IP address: 210.245.52.63, which is the broadcast address
- Look at the picture of subnetting in previous section, you can easily find out that
the last IP address is 210.245.52.63
- Or we can use binary notation for clearer understanding:
1st address: 11010010.11110101.00110100.00000000(210.245.52.0)
Subnet Mask: 11111111.11111111.11111111.11000000(255.255.255.192)
Last address: 11010010.11110101.00110100.00111111(210.245.52.63)
- Each subnetwork in the first level of division contains 30 hosts so we can use
1 subnetwork for FIT (20 PCs). For example, I use subnetwork 1 for FIT.
- Subnetwork 1:
1st address: 11010010.11110101.00110100.00000000(210.245.52.0)
Subnet Mask: 11111111.11111111.11111111.11100000(255.255.255.224)
Last address: 11010010.11110101.00110100.00011111(210.245.52.31)
- Subnetwork 2:
1st address: 11010010.11110101.00110100.00100000(210.245.52.32)
Subnet Mask: 11111111.11111111.11111111.11100000(255.255.255.224)
Last address: 11010010.11110101.00110100.00111111(210.245.52.63)
- Continue dividing subnetwork 2 into two smaller subnetwork:
- Each subnetwork in the second level of division contains 14 hosts so we can use
1 subnetwork for FMT (10 PCs). For example, I use subnetwork 2.1 for FMT.
- Subnetwork 2.1:
1st address: 11010010.11110101.00110100.00100000(210.245.52.32)
Subnet Mask: 11111111.11111111.11111111.11110000(255.255.255.240)
Last address: 11010010.11110101.00110100.00101111(210.245.52.47)
- Subnetwork 2.2:
1st address: 11010010.11110101.00110100.00110000(210.245.52.48)
Subnet Mask: 11111111.11111111.11111111.11110000(255.255.255.240)
Last address: 11010010.11110101.00110100.00111111(210.245.52.63)
4. Subnetting tips:
http://www.freesoft.org/CIE/Course/Subnet/109.htm
5. References:
http://www.tcpipguide.com/free/index.htm
http://www.freesoft.org/CIE/Course/Subnet/