In this Class C Subnetting Tutorial - Part 1, you will learn how to subnet a Class C network.
Subnetting (RFC 950) is the process of dividing a network of any classful IP network (A, B, or C) into smaller networks. Before proceeding further deep into subnetting, we should know these terms.
What is Subnet Mask?
If we recollect from the previous lessons, an IP address has two components, the network part and the host part. Really, IP address is a combination of IP address and Subnet mask and the purpose of subnet mask is to identify which part of an IP address is the network part and which part is the host part. Subnet mask is also a 32 bit number where all the bits of the network part are represented as "1" and all the bits of the host part are represented as "0".
If we take an example for a Class C network, 192.168.10.0, the address part and the subnet mask can be represented as below.
| Component |
Binary |
Decimal |
| Address Part |
11000000.10101000.00001010.00000000 |
192.168.10.0 |
| SN Mask |
11111111.11111111.11111111.00000000 |
255.255.255.0 |
For a Class C IP address, the first three octets are used to represent the Network part and the lact octet is used to represent the host part. From the above table, we can see all "1" in the network part and all "0" in nthe host part. When this subnet mask is converted to a decimals, it will become 255.2555.255.0. The default subnet mask for a Class C network is 255.255.255.0, Class B network is 255.255.0.0 and Class A network is 255.0.0.0
What is a Network Address?
A network address is used to identify the subnet that a host may be on and is used to represent that network. We can find the network address by assigning all bits in the host part as 0.
What is Directed Broadcast?
The host id value containing all 1's in the bit pattern indicates a directed broadcast address. A directed broadcast address can occur in the destination IP address of an IP datagram, but never as a source IP address. A directed broadcast address will be seen by all nodes on that network. For example, the broadcast id for the network 192.168.10.0 will be 192.168.10.255.
A directed broadcast is sent to a specific network identified in the Network part of the IP address. Routers on the network configured to forward-directed broadcasts will send the IP datagram to the final router that connects the destination specidied in the network part, and the router at the destination network should forward it to the destination host.
What is Limited Broadcast?
Limited broadcast is another type of broadcast, represented by 255.255.255.255. The limited broadcast can be used in local area networks, where a broadcast never crosses a router to reach another network. If a broadcast is to be done over the local network, you can use the limited broadcast. A limited broadcast address can never appear as a source IP address; it can appear only as a destination IP address
What is CIDR?
Classless Inter-Domain Routing (CIDR, RFC 1517, RFC 1518, RFC 1519, RFC 1520) was published in 1993 to keep the internet from running out of IP addresses. The "classful" system of allocating IP addresses can waste many IP addresses. Any organization who need just a few IP addresses more than 254 must get a Class B address block of 65533 IP addresses. Even much more IP addresses are wasted in the case of Class A, where total usable IP addresses per network is 16777214 ((2^24) - 2).
The original IPv4 "Class A" uses 8 bits to represent the network part, "Class B" uses 16 bits to represent the network part and "Class C" uses 24 bits to represent the network part. CIDR replaced these categories with a more generalized
network prefix. This network prefix could be of any length, not just 8, 16, or 24 bits.
Classless Inter-Domain Routing (CIDR) includes supernetting (supernetting is the method of
using contiguous blocks of Class C address spaces to simulate a single, larger,
address space), VLSM (Variable Length Subnet Masking, a method of subnetting a subnet) and route aggregation (method representing multiple networks using a single entry in a router's routing table. This can greatly reduce the size of the routing tables in routers).
Class C Subnetting Tutorial
Subnetting is done by taking the bit/s from
host part and adding it to the network part.
Consider the same Class C example given above.
Remember, the first three octets of a Class C network is used to represent the network and the last octet is used to represent the host. The default format for a Class C IP address is Network.Network.Network.Host.
To make things easy, you may remember this.
If all the bits in the host part are "0", that represents the network id.
If all the bits in the host part are "0" except the last bit, it is the first usable IP address.
If all the bits in the host part are "1" except the last bit, it is the last usable IP address.
If all the bits in the host part are "1", that represents the direct broadcat address.
All the IP addresses between the first and last IP addresses (including the first and last) can be used to configure the devices.
Class C - One Bit Subnetting Tutorial
Consider the network shown above. If we include one bit from the host part to the network part, the subnet mask is changed into 255.255.255.128. The single bit can have two values in last octet, either 0 or 1.
11000000.10101000.00001010.0 | 0000000
11111111.11111111.11111111.1 | 0000000
That means, we can get two subnets if we do a single bit subnetting.
| SN No |
Description |
Binaries
|
Decimal |
| 1 |
Network Address |
11000000.10101000.00001010.00000000 |
192.168.10.0 |
| First IP Address |
11000000.10101000.00001010.00000001 |
192.168.10.1 |
| Last IP Address |
11000000.10101000.00001010.01111110 |
192.168.10.126 |
| Broadcast Address |
11000000.10101000.00001010.01111111 |
192.168.10.127 |
| 2 |
Network Address |
11000000.10101000.00001010.10000000 |
192.168.10.128 |
| First IP Address |
11000000.10101000.00001010.10000001 |
192.168.10.129 |
| Last IP Address |
11000000.10101000.00001010.11111110 |
192.168.10.224 |
| Broadcast Address |
11000000.10101000.00001010.11111111 |
192.168.10.225 |
The network 192.168.10.0 is divided into two networks, each network has 128 total IP addresses and 126 usable IP addresses (two IP addresses are used in each subnet to represent the netwok id and the broadcast id). The subnet mask for one bit subnetting is 255.255.255.128.
Class C - Two Bit Subnetting Tutorial
If we include two bits from the host part to the network part, the subnet mask is changed into 255.255.255.192. The two bits added to network part can have four possible values in last octet and that are 00, 01, 10 and 11. That means, we can get four networks if we do a two bit subnetting.
11000000.10101000.00001010.00 | 000000
11111111.11111111.11111111.11 | 000000
| SN No |
Description |
Binaries
|
Decimal |
| 1 |
Network Address |
11000000.10101000.00001010.00000000 |
192.168.10.0 |
| First IP Address |
11000000.10101000.00001010.00000001 |
192.168.10.1 |
| Last IP Address |
11000000.10101000.00001010.00111110 |
192.168.10.62 |
| Broadcast Address |
11000000.10101000.00001010.00111111 |
192.168.10.63 |
| 2 |
Network Address |
11000000.10101000.00001010.01000000 |
192.168.10.64 |
| First IP Address |
11000000.10101000.00001010.01000001 |
192.168.10.65 |
| Last IP Address |
11000000.10101000.00001010.01111110 |
192.168.10.126 |
| Broadcast Address |
11000000.10101000.00001010.01111111 |
192.168.10.127 |
| 3 |
Network Address |
11000000.10101000.00001010.10000000 |
192.168.10.128 |
| First IP Address |
11000000.10101000.00001010.10000001 |
192.168.10.129 |
| Last IP Address |
11000000.10101000.00001010.10111110 |
192.168.10.190 |
| Broadcast Address |
11000000.10101000.00001010.10111111 |
192.168.10.191 |
| 4 |
Network Address |
11000000.10101000.00001010.11000000 |
192.168.10.192 |
| First IP Address |
11000000.10101000.00001010.11000001 |
192.168.10.193 |
| Last IP Address |
11000000.10101000.00001010.11111110 |
192.168.10.254 |
| Broadcast Address |
11000000.10101000.00001010.11111111 |
192.168.10.255 |
The network 192.168.10.0 is divided into four networks, each network has 64 total IP addresses and 62 usable IP addresses (two IP addresses are used in each subnet to represent the netwok id and the broadcast id). The subnet mask for two bit subnetting is 255.255.255.192.
Class C - 3 Bit Subnetting Tutorial
If we include three bits from the host part to the network part, the subnet mask is changed into 255.255.255.224. The three bits added to network part can have eight possible values in last octet and that are 000, 001, 010, 011, 100, 101, 110 and 111. That means, we can get eight networks if we do a three bit subnetting.
11000000.10101000.00001010.000 | 00000
11111111.11111111.11111111.111 | 00000
| SN No |
Description |
Binaries
|
Decimal |
| 1 |
Network Address |
11000000.10101000.00001010.00000000 |
192.168.10.0 |
| First IP Address |
11000000.10101000.00001010.00000001 |
192.168.10.1 |
| Last IP Address |
11000000.10101000.00001010.00011110 |
192.168.10.30 |
| Broadcast Address |
11000000.10101000.00001010.00011111 |
192.168.10.31 |
| 2 |
Network Address |
11000000.10101000.00001010.00100000 |
192.168.10.32 |
| First IP Address |
11000000.10101000.00001010.00100001 |
192.168.10.33 |
| Last IP Address |
11000000.10101000.00001010.00111110 |
192.168.10.62 |
| Broadcast Address |
11000000.10101000.00001010.00111111 |
192.168.10.63 |
| 3 |
Network Address |
11000000.10101000.00001010.01000000 |
192.168.10.64 |
| First IP Address |
11000000.10101000.00001010.01000001 |
192.168.10.65 |
| Last IP Address |
11000000.10101000.00001010.01011110 |
192.168.10.94 |
| Broadcast Address |
11000000.10101000.00001010.01011111 |
192.168.10.95 |
| 4 |
Network Address |
11000000.10101000.00001010.01100000 |
192.168.10.96 |
| First IP Address |
11000000.10101000.00001010.01100001 |
192.168.10.97 |
| Last IP Address |
11000000.10101000.00001010.01111110 |
192.168.10.126 |
| Broadcast Address |
11000000.10101000.00001010.01111111 |
192.168.10.127 |
| 5 |
Network Address |
11000000.10101000.00001010.10000000 |
192.168.10.128 |
| First IP Address |
11000000.10101000.00001010.10000001 |
192.168.10.129 |
| Last IP Address |
11000000.10101000.00001010.10011110 |
192.168.10.158 |
| Broadcast Address |
11000000.10101000.00001010.10011111 |
192.168.10.159 |
| 6 |
Network Address |
11000000.10101000.00001010.10100000 |
192.168.10.160 |
| First IP Address |
11000000.10101000.00001010.10100001 |
192.168.10.161 |
| Last IP Address |
11000000.10101000.00001010.10111110 |
192.168.10.190 |
| Broadcast Address |
11000000.10101000.00001010.10111111 |
192.168.10.191 |
| 7 |
Network Address |
11000000.10101000.00001010.11000000 |
192.168.10.192 |
| First IP Address |
11000000.10101000.00001010.11000001 |
192.168.10.193 |
| Last IP Address |
11000000.10101000.00001010.11011110 |
192.168.10.222 |
| Broadcast Address |
11000000.10101000.00001010.11011111 |
192.168.10.223 |
| 8 |
Network Address |
11000000.10101000.00001010.11100000 |
192.168.10.224 |
| First IP Address |
11000000.10101000.00001010.11100001 |
192.168.10.225 |
| Last IP Address |
11000000.10101000.00001010.11111110 |
192.168.10.254 |
| Broadcast Address |
11000000.10101000.00001010.11111111 |
192.168.10.255 |
The network 192.168.10.0 is divided into eight networks, each network has 32 total IP addresses and 30 usable IP addresses (two IP addresses are used in each subnet to represent the netwok id and the broadcast id). The subnet mask for three bit subnetting is 255.255.255.224.
In this Class C Subnetting Tutorial - Part 1, you have learned what is a subnet mask, what is network address, what is directed broadcast,what is limited broadcast, what is CIDR and how to perform a Class C subnetting. Click "Next" to view Class C Subnetting Tutorial - Part 2.
Related Topics...
• IP Addresses
• Class C Subnetting Tutorial - Part 2
• Class B Subnetting Tutorial - Part 1
• Class B Subnetting Tutorial - Part 2
• Class A Subnetting Tutorial - Part 1
• Class A Subnetting Tutorial - Part 2
• Variable Length Subnet Masking (VLSM)
• Supernetting