Q1. What is classless IP address?
Answer: Classless is also called IP subnetting. It divides classful network addresses into smaller networks (subnet). The rules are simple: – In classful addressing scheme, a 32 bit address is divided into Network ID and Host ID in 8-bIt boundary:
Class Network_ID Host_ID Examples……………..Leftmost_byte_range(a.b.c.d)
A……….8 bit……. 24 bit…..22.214.171.124, 126.96.36.199…………0~127
B………16 bit…… 16 bit……188.8.131.52, 184.108.40.206…..128~191
C……. 24 bit……… 8 bit…… 220.127.116.11, 18.104.22.168…192~223
– Classless IP allows more left bits for network ID (and fewer bits for host ID). The number of bits used by
network ID is called network mask. For example, a.b.c.d/m says “network ID is the leftmost m bit.” – Examples of classful and classless addresses:
IP address Mask Class? Network address Network ID Host ID Number of hosts in this network 22.214.171.124/8 /8 class A 126.96.36.199/8 100 4.5.6 16,777,216 188.8.131.52/16 /16 classless 184.108.40.206/16 100.4 5.6 65,536 220.127.116.11/24 /24 classless 18.104.22.168/24 100.4.5 6 256 22.214.171.124/25 /25 classless 126.96.36.199/25 188.8.131.52 6 128
Q2. Why classless?
Answer: Using fixed boundary to allocate bits for network ID and hosts ID results side effects: IP address starvation. Consider this example: A network has 100 computers to be connected to Internet. They are using a class C network 184.108.40.206/24. Then the network grows to 500 computers. It needs a class B network, say 220.127.116.11/16. However, 18.104.22.168/16 covers 65,536 class B IP addresses. This network only uses 500 of them. 65,036 IP addresses are wasted. This causes the shortage of IP address due classful addressing scheme’s fixed networ/host boundary. This problem can be solved by classless addressing. For example, 22.214.171.124/23 allows 512 host ID. It covers addresses 126.96.36.199~188.8.131.52).
Q3. How to subnetting and creates network ID crossing byte boundary?
Answer: Subnetting uses network mask to allocate leftmost bits for network ID. The rules are simple: – Start with a classful address (class A, B, or C). – Add more bits to the classful network ID bits. Class B uses leftmost 16 bits for network ID. Its mask is /16. With classless addressing, the network mask for class B derived network can be /16~.31. – For example,
184.108.40.206 is a class B network address. Its default mask is /16. It covers 65,536 addresses.
220.127.116.11/24 is a classless subnet derived from class B network. Its mask is /24 and contains 256 addresses.
18.104.22.168/25 is a classless subnet derived from a class B network. Its mask is /25 and has 128 addresses. The table below presents classful and classless addresses in binary form:
Network ID/Mask Binary form (32 bits) Network ID/class Number of host ID and range
– 22.214.171.124/16 is a class B address, network ID 150.1 (16 bit), contains 65,356 hosts, (126.96.36.199~188.8.131.52), Its binary presentation is 10010110. 00000001.00000000.00000000
– 184.108.40.206/24 is classless derived from class B, network ID 150.1.2 (24 bits), contains 256 host addresses (220.127.116.11~18.104.22.168 ). Its binary form is 10010110. 00000001.00000010.00000000.
– 22.214.171.124/25 is classless derived from class B, network ID is 126.96.36.199 (25 bit), contains 128 host addresses (188.8.131.52~184.108.40.206). its binary form is 10010110. 00000001.00000010.10000000
Q4. Can we subnetting to create 220.127.116.11/14? Answer: No. Subnetting starts with classful address scheme. 18.104.22.168 is a class B address (150 is within class B range: 128~191). Class B network mask is /16. Subnetting a class B network address can only use masks to reduce the size of network, or increase the mask. /16~/21 are allowed. /1~/15 are not allowed.
Q5. How does a router lookup a classless IP address?
Answer: Let’s use examples to explain router’s operations: 1) When R1 receives ping sent by Jack, it compares ping’s destination IP address (22.214.171.124/25) with destination networks listed in routing table.
– 126.96.36.199/8. 188.8.131.52/25’s left most 8 bit is 150, not 100. Not a match.
– 184.108.40.206/16. 220.127.116.11/25’s left most 16 bit is 150.1. It’s a match. R1 forwards ping to 18.104.22.168/16. 2) When R2 receives ping, it compares ping’s destination IP address (22.214.171.124/25) with routing table’s destination networks. -126.96.36.199/24: 188.8.131.52/25’s left most 24 bit is 150.1. 2, not 150.1.0. Not a match.
-184.108.40.206/24: 220.127.116.11/25’s left most 24 bit is 150.1. 2, not 150.1.1. Not a match.
-18.104.22.168/24: 22.214.171.124/25’s left most 24 bit is 150.1. 2. It’s a match. R2 forward ping to 126.96.36.199/24 network 3) When R3 receives ping, it compares ping’s destination IP address (188.8.131.52/25) with routing table. -184.108.40.206/25: 220.127.116.11/25’s left most 25 bit is 18.104.22.168 2, not 22.214.171.124, Not a match.
– 126.96.36.199/25: 188.8.131.52/25’s left most 25 bit is 184.108.40.206. A match. R3 forwards ping to Rose.
Note: This example is more clear if read together with topology from the companion simulation.
This article is the FAQ of an interactive simulation. You may get more clear concepts by playing the simulation with visualized topology, packets, table. It is located under External links.