Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Subnetting class C
1. Sub netting Notes: Class C
By Muhammad Hammad
What is Subnet Mask?
An IPv4addresshas twocomponents,the network partandthe host part. IPv4 addressisa combination
of IPv4addressand Subnetmaskandthe purpose of subnetmaskisto identifywhichpartof an IPv4
addressisthe networkpart andwhichpart is the host part. Subnetmaskis alsoa 32-bit numberwhere
all the bitsof the networkpartare representedas"1"and all the bits of the host part are representedas
"0".
If we take an example foraClassC network,192.168.10.0, the addresspart and the subnetmaskcan be
representedasbelow.
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 ClassC IPv4 address,the firstthree octetsare usedto representthe Networkpartandthe last
octetis usedto representthe hostpart.Fromthe above table,we can see all "1" inthe networkpart
and all "0" in the hostpart. Whenthissubnet maskis convertedtoa decimal, itwill become
255.2555.255.0. The defaultsubnetmaskfora ClassC networkis255.255.255.0, ClassB networkis
255.255.0.0 and ClassA networkis255.0.0.0
What is a Network Address?
A network address is used to identify the subnet that a host may be placed 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. Adirected broadcast
address can occur in the destination IPv4 address of an IPdatagram, but never as a source IPv4 address. Adirected
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 IPv4 address. Routers on
the network configured to forward-directed broadcasts willsend the IP datagram to the final router that connects
the destination specified in the network part, and the router at the destination network should forward it to the
destination host.
2. 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 IPv4 addresses. The "classful" system of allocating IPv4 addresses can
waste many IPv4 addresses. Any organization who need just a few IPv4 addresses more than 254 must get a Class
B address block of 65533 IPv4 addresses. Even much more IPv4 addresses are wasted in the case of Class A,
where total usable IPv4 addresses per network is 16777214 ((2^24) - 2).
The original "IPv4 Class A networks" uses 8 bits to represent the network part, "Class B networks" uses 16 bits to
represent the network part and "Class C networks" 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.
For example; 172.16.120.213 255.255.128.0 can be represented in CIDR format as 172.16.120.213/17, because
there are 17 bits used for network part.
Classless Inter-Domain Routing (CIDR) includes super netting (super netting is the method of using contiguous
blocks of address spaces to simulate a single, larger, address space), VLSM (Variable Length Subnet Masking, a
method of sub netting 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 Sub netting:
Subnetting is done by taking thebit/s fromhost part and adding it to the networkpart. Consider the same 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 IPv4 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 IPv4 address.
If all the bits in the host part are "1" except the last bit, it is the last usable IPv4 address.
If all the bits in the host part are "1", that represents the directed broadcast address.
All the IPv4 addresses between the first and last IPv4 addresses (including the first and last) can be used to
configure the devices.
3. Class C - One Bit Sub netting:
Considerthe networkshownabove.If we include one bitfromthe hostpartto the networkpart,the
subnetmaskischangedinto 255.255.255.128. The single bitcanhave two valuesinlastoctet,either0
or 1.
11000000.10101000.00001010.0 | 0000000
11111111.11111111.11111111.1 | 0000000
That means,we can gettwo subnetsif we doa single bitsubnetting.
SN No Description Binaries Decimal
1
Network Address 11000000.10101000.00001010.00000000 192.168.10.0
First IPv4 address 11000000.10101000.00001010.00000001 192.168.10.1
Last IPv4 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 IPv4 address 11000000.10101000.00001010.10000001 192.168.10.129
Last IPv4 address 11000000.10101000.00001010.11111110 192.168.10.254
Broadcast Address 11000000.10101000.00001010.11111111 192.168.10.255
The network192.168.10.0 is dividedintotwonetworks,eachnetworkhas128 total IPv4 addressesand
126 usable IPv4addresses(twoIPv4addressesare usedineachsubnettorepresentthe network
addressandthe directedbroadcastaddress).The subnetmaskforone-bitsubnettingis
255.255.255.128.
Class C - Two Bit Sub netting:
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 sub netting.
11000000.10101000.00001010.00 | 000000
11111111.11111111.11111111.11 | 000000
4. SN No Description Binaries Decimal
1
Network Address 11000000.10101000.00001010.00000000 192.168.10.0
First IPv4 address 11000000.10101000.00001010.00000001 192.168.10.1
Last IPv4 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 IPv4 address 11000000.10101000.00001010.01000001 192.168.10.65
Last IPv4 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 IPv4 address 11000000.10101000.00001010.10000001 192.168.10.129
Last IPv4 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 IPv4 address 11000000.10101000.00001010.11000001 192.168.10.193
Last IPv4 address 11000000.10101000.00001010.11111110 192.168.10.254
Broadcast Address 11000000.10101000.00001010.11111111 192.168.10.255
5. The network 192.168.10.0 is divided into four networks, each network has 64 total IPv4 addresses and 62
usable IPv4 addresses (twoIPv4addresses areusedin each subnet to represent the network address andthe directed
broadcast address). The subnet mask for two-bit sub netting is 255.255.255.192.
Class C - 3 Bit Sub netting:
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 sub netting.
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 IPv4 address 11000000.10101000.00001010.00000001 192.168.10.1
Last IPv4 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 IPv4 address 11000000.10101000.00001010.00100001 192.168.10.33
Last IPv4 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 IPv4 address 11000000.10101000.00001010.01000001 192.168.10.65
Last IPv4 address 11000000.10101000.00001010.01011110 192.168.10.94
7. Last IPv4 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 IPv4 addresses and 30
usable IPv4 addresses (twoIPv4addresses areusedin each subnet to represent the network address andthe directed
broadcast address). The subnet mask for three-bit sub netting is 255.255.255.224.
Class C - 4 Bit Sub netting:
If we include four bits from the host part to the network part, the subnet mask is changed to 255.255.255.240.
11000000.10101000.00001010.0000 | 0000
11111111.11111111.11111111.1111 | 0000
The four bits added to network part can have sixteen possible values in last (fourth) octet and that are 0000,
0001, 0010, 0011, 0100, 0101, 0110, 0111, 1000, 1001, 1010, 1011, 1100, 1101, 1110, 1111.
SN No Description Binaries Decimal
1
Network Address 11000000.10101000.00001010.00000000 192.168.10.0
First IPv4 address 11000000.10101000.00001010.00000001 192.168.10.1
Last IPv4 address 11000000.10101000.00001010.00001110 192.168.10.14
Broadcast Address 11000000.10101000.00001010.00001111 192.168.10.15
2
Network Address 11000000.10101000.00001010.00010000 192.168.10.16
First IPv4 address 11000000.10101000.00001010.00010001 192.168.10.17
Last IPv4 address 11000000.10101000.00001010.00011110 192.168.10.30
Broadcast Address 11000000.10101000.00001010.00011111 192.168.10.31
3
Network Address 11000000.10101000.00001010.00100000 192.168.10.32
First IPv4 address 11000000.10101000.00001010.00100001 192.168.10.33
Last IPv4 address 11000000.10101000.00001010.00101110 192.168.10.46
Broadcast Address 11000000.10101000.00001010.00101111 192.168.10.47
8. 4
Network Address 11000000.10101000.00001010.00110000 192.168.10.48
First IPv4 address 11000000.10101000.00001010.00110001 192.168.10.49
Last IPv4 address 11000000.10101000.00001010.00111110 192.168.10.62
Broadcast Address 11000000.10101000.00001010.00111111 192.168.10.63
5
Network Address 11000000.10101000.00001010.01000000 192.168.10.64
First IPv4 address 11000000.10101000.00001010.01000001 192.168.10.65
Last IPv4 address 11000000.10101000.00001010.01001110 192.168.10.78
Broadcast Address 11000000.10101000.00001010.01001111 192.168.10.79
6
Network Address 11000000.10101000.00001010.01010000 192.168.10.80
First IPv4 address 11000000.10101000.00001010.01010001 192.168.10.81
Last IPv4 address 11000000.10101000.00001010.01011110 192.168.10.94
Broadcast Address 11000000.10101000.00001010.01011111 192.168.10.95
7
Network Address 11000000.10101000.00001010.01100000 192.168.10.96
First IPv4 address 11000000.10101000.00001010.01100001 192.168.10.97
Last IPv4 address 11000000.10101000.00001010.01101110 192.168.10.110
Broadcast Address 11000000.10101000.00001010.01101111 192.168.10.111
8
Network Address 11000000.10101000.00001010.01110000 192.168.10.112
First IPv4 address 11000000.10101000.00001010.01110001 192.168.10.113
Last IPv4 address 11000000.10101000.00001010.01111110 192.168.10.126
Broadcast Address 11000000.10101000.00001010.01111111 192.168.10.127
9
Network Address 11000000.10101000.00001010.10000000 192.168.10.128
First IPv4 address 11000000.10101000.00001010.10000001 192.168.10.129
Last IPv4 address 11000000.10101000.00001010.10001110 192.168.10.142
Broadcast Address 11000000.10101000.00001010.10001111 192.168.10.143
10 Network Address 11000000.10101000.00001010.10010000 192.168.10.144
9. First IPv4 address 11000000.10101000.00001010.10010001 192.168.10.145
Last IPv4 address 11000000.10101000.00001010.10011110 192.168.10.158
Broadcast Address 11000000.10101000.00001010.10011111 192.168.10.159
11
Network Address 11000000.10101000.00001010.10100000 192.168.10.160
First IPv4 address 11000000.10101000.00001010.10100001 192.168.10.161
Last IPv4 address 11000000.10101000.00001010.10101110 192.168.10.174
Broadcast Address 11000000.10101000.00001010.10101111 192.168.10.175
12
Network Address 11000000.10101000.00001010.10110000 192.168.10.176
First IPv4 address 11000000.10101000.00001010.10110001 192.168.10.177
Last IPv4 address 11000000.10101000.00001010.10111110 192.168.10.190
Broadcast Address 11000000.10101000.00001010.10111111 192.168.10.191
13
Network Address 11000000.10101000.00001010.11000000 192.168.10.192
First IPv4 address 11000000.10101000.00001010.11000001 192.168.10.193
Last IPv4 address 11000000.10101000.00001010.11001110 192.168.10.206
Broadcast Address 11000000.10101000.00001010.11001111 192.168.10.207
14
Network Address 11000000.10101000.00001010.11010000 192.168.10.208
First IPv4 address 11000000.10101000.00001010.11010001 192.168.10.209
Last IPv4 address 11000000.10101000.00001010.11011110 192.168.10.222
Broadcast Address 11000000.10101000.00001010.11011111 192.168.10.223
15
Network Address 11000000.10101000.00001010.11100000 192.168.10.224
First IPv4 address 11000000.10101000.00001010.11100001 192.168.10.225
Last IPv4 address 11000000.10101000.00001010.11101110 192.168.10.238
Broadcast Address 11000000.10101000.00001010.11101111 192.168.10.239
16
Network Address 11000000.10101000.00001010.11110000 192.168.10.240
First IPv4 address 11000000.10101000.00001010.11110001 192.168.10.241
10. Last IPv4 address 11000000.10101000.00001010.11111110 192.168.10.254
Broadcast Address 11000000.10101000.00001010.11111111 192.168.10.255
The network192.168.10.0 is dividedintosixteennetworks, eachnetworkhas16 total IPv4 addresses
and 14 usable IPv4addresses(twoIPv4addressesare usedineachsubnettorepresentthe network
addressandthe directedbroadcastaddress).
From the above examples,youcanclearlyunderstandhow tosubneta ClassC network.
ClassC Sub nettingcanbe summarizedasbelow.
Subnet Bits Subnet Mask CIDR Total Subnets Usable IPs/Subnet
0 255.255.255.0 /24 1 254
1 255.255.255.128 /25 2 126
2 255.255.255.192 /26 4 62
3 255.255.255.224 /27 8 30
4 255.255.255.240 /28 16 14
5 255.255.255.248 /29 32 6
6 255.255.255.252 /30 64 2