Classful IP Address Tutorial (Interactive Animation 4)

Q1. What is address classification?

Answer: IP address is divided into network ID and host ID. It is classified into 5 classes: A, B, C, D, E. The division is based on network mask, a fixed length of leftmost bits assigned to network ID and host ID.

Q2. How to classify IP address?

Answer: IP address has 32 bits (4 bytes) and is often represented as 4 decimal numbers a.b.c.d, one number per byte. Each number’s value is between 0~255. They are classified as follows:

Class A: “a” is 0~127. Network ID is “a” (the leftmost digit). Host ID is “b.c.d ” (right 3 digits)

Class B: “a” is 128~191. Network ID is “a.b” (the left 2 digits). Host ID is “c.d ” (the right 2 digits)

Class C: “a” is 192~223. Network ID is “a.b.c” (the leftmost 3 digits). Host ID is “d ” (the rightmost digit)

Class D, E: “a” is 224~255. Class D addresses are used for multicasting. Class E addresses are reserved for scientific research.

Q3. How many host IDs and network IDs for class A, B, C addresses?

Answer: The number of host/network IDs is determined by the number of bytes allocated for each class.

Class Host-IDs Network-IDs Usage

A: 16,777,216 256 Very large networks

B: 65,536 65,536 Large networks

C: 256 16,777,216 Small networks. Each contains no more than 256 computers.

Note: In each class, two host IDs are reserved and cannot be assigned to hosts: all 0 bits, all 1 bits.

Q4. How to determine classes when IP addresses are presented in binary?

Answer: We can just look at the first byte (leftmost 3 bits)

Number of left- Leftmost byte a.b.c.d

Class most bits, value in binary (4-decimals)

A: 1 bit: 0 0xxxxxxx a is 0~127

B: 2 bit: 10 10xxxxxx a is 128~191

C: 3 bit: 110 110xxxxx a is 192~223

Note: The relationship between classful address and routing table destination network is more clear when playing the companion animation.

Q5. How well does classful address work?

Answer: It worked well in the early stage of Internet when there were not too many computers connected to Internet. However, classifying IP addresses by fixed length of bit does not scale well when the number of networks increases.

For example, how to assign a network address for a group of 1000 computers? One class C network is not enough. If allocate a class B address space for this group, there are 64,536 host IDs unused. It’s a big waste.

To solve this problem, computer scientists designed classless IP address (or subnetting) to further divide a classful address space into smaller networks. This way, a group of 1000 computers can fit into a network address that contains 1024 hosts.

To learn classless IP address, see next tutorial: IP subnetting.

This article is the FAQ of an interactive animation. Concepts are easier to grasp when seeing visualizd topology, packets, and tables in this animation. It is listed under External links.


Source link