10 Classification of IPv4 Addresses
10 Classification of IPv4 Addresses
Building A Building B
10.1.1.1/30 10.1.1.2/30
10.1.1.1/30 10.1.1.2/30
• In early days, IPv4 addresses were classified into five classes based on the network scale: Class A, Class B, Class C,
Class D, and Class E. Such classification was simple and effective. However, with the network development,
classful classification fixes the network scale and wastes of IP addresses. Variable Length Subnet Mask (VLSM)
and Classless Inter-Domain Routing (CIDR) were proposed later to solve this problem.
• VLSM
• For example, the network segment 192.168.1.0/24 is further classified into the 192.168.1.0/25 and
192.168.1.128/25 subnets.
192.168.1.0/24
192.168.1.0/25 192.168.128.0/25
172.16.0.0/16
• CIDR
• It combines multiple classful subnets into one subnet to reduce routing entries in the routing table.
• On existing networks, subnet masks can be used to break the classful boundary of subnets, so as to
divide and combine networks conveniently.
192.168.0.0/24 192.168.1.0/24
192.168.0.0/23
Classification and Aggregation of IPv4 Addresses
• Subnet Mask
• Both IP addresses and subnet masks are composed of 32 binary digits. They are
often presented in dotted decimal notation for ease of writing. They can be
combined to differentiate network bits from host bits in IP addresses.
• Subnet Division
• According to the subnet mask, the first 30 bits of the IP address are network bits and the last
two bits are host bits.
Network bits of 10.1.1.2 are represented in binary notation as follows:
00001010 00000001 00000001 00000000
00、 01、 10、 11
• The last two bits have four combinations. Therefore, the network segment has four IP
addresses: 10.1.1.0 to 10.1.1.3. The first and last IP addresses of each network are
unavailable. Only 10.1.1.1 and 10.1.1.2 are actually available.
Classification and Aggregation of IPv4 Addresses
• Subnet Division
• Subnet division on networks:
• Number of subnets: 2x (x indicates the number of subnet bits).
• Number of effective hosts in each subnet: 2y – 2 (y indicates the number of host bits)
• Example: 192.168.10.213 255.255.255.192 (/26)
192.168.0.0 192.168.1.0
192.168.0.255 192.168.1.255
192.168.0.0
192.168.1.255
Classification and Aggregation of IPv4 Addresses
• Summary
• In this chapter, Tom had a deeper understanding of subnet masks, which can be used to
flexibly divide or combine subnets.
• IP addresses need to be combined with subnet masks to present network bits and host bits.
Tom also grasped the meaning of "10.1.1.1/30" and "192.168.10.0/26" in the figure.
• Then, how do two layer-3 switches communicate with each other? It will be described in the
next chapter.
• Exercises
• How many subnets are obtained by dividing the subnet 192.168.5.78/28? What are the start
and end IP addresses of each network segment?
• How can subnet masks be divided if three subnets are required in the network 172.3.0.0/16?
THANKS
Ruijie Networks Co., Ltd.
Address: Floor 11, East Wing, Zhongyipengao Plaza, No. 29 Fuxing Road, Haidian District, Beijing, China
Post Code: 100036
Tel: (8610) 5171-5996
Fax: (8610) 5171-5872
www.ruijienetworks.com