Computer Networks · IPv4 Addressing
Unicasting with Class A Networks
Overview
Casting describes how a packet travels from one host to another, and it comes in two forms: unicast (one-to-one) and broadcast (one-to-many).
In a Class A network, the first 8 bits of the address form the network ID and the remaining 24 bits form the host ID, so identifying the class from the first octet is the key step before any unicast transmission.
Key concepts
- Casting: The general term for how a packet is sent from one host to another. It has two types:
- Unicast: A packet sent from one host to only one particular host.
- Broadcast: A packet sent from one host to many hosts.
- Network ID: The part of the IP address that identifies the network. For a Class A network, the network ID is the first 8 bits and the host ID is the following 24 bits.
- Class ranges (first octet): Class A is 1 to 126, Class B is 128 to 191, and Class C is 192 to 223.
- Class A split: The first octet value tells the class; once the address is known to be Class A, the first 8 bits are the network portion and the last 24 bits are the host portion.
How it works
- Consider a network whose network ID is 11.0.0.0.
- The first octet value 11 tells the class of the address. Since 11 falls in the Class A range, this is a Class A network.
- Because 11 belongs to Class A, the address is split as: network ID = first 8 bits (here, 11), host ID = following 24 bits.
- A host inside this network is given the IP address 11.1.2.3: 11 is the network portion (Class A, 8 bits) and 1.2.3 is the host portion (24 bits).
- To perform unicast, this host sends a message to exactly one host in another network (for example, another Class A network 20.0.0.0).
Only one destination host receives the packet, which is what distinguishes unicast from broadcast.
Formulas
-
Class A split:
-
Class ranges (first octet):
-
Class A:
-
Class B:
-
Class C:
Worked examples
Identifying the class and splitting the address 11.1.2.3
- Step 1: Look at the first octet: 11.
- Step 2: Check the range. 11 lies between 1 and 126, so it is Class A.
- Step 3: For Class A, network ID = first 8 bits = 11; host ID = next 24 bits = 1.2.3.
- Step 4: The network ID written in full is 11.0.0.0 (host bits set to 0).
- Step 5: A unicast packet from 11.1.2.3 goes to exactly one host in the destination network (e.g., a host in 20.0.0.0).
Comparison
| Casting type | Meaning | Number of receivers |
|---|---|---|
| Unicast | Packet sent from one host to one particular host | Exactly one |
| Broadcast | Packet sent from one host to many hosts | Many |
Revision summary
- Casting has two types: unicast (one-to-one) and broadcast (one-to-many).
- The first octet decides the class: Class A = 1–126, Class B = 128–191, Class C = 192–223.
- In a Class A address, the first 8 bits are the network ID and the last 24 bits are the host ID.
- The network ID is written with all host bits as 0 (e.g., 11.0.0.0).
- In unicast, the packet is delivered to only one specific destination host, even if that host lies in a different network.
Previous-year exam insights
- In classful IPv4, the class-defining leading bits are not counted in the network-bit field: Class A has 7 network bits + 24 host bits, Class B has 14 + 16, and Class C has 21 + 8; their default masks are /8, /16, and /24 respectively.
Asked inUGC NET 2013 - First-octet ranges: Class A 1–126, Class B 128–191, Class C 192–223, Class D 224–239 (multicast), Class E 240–255 (reserved/experimental); 0 is reserved/'this network' and 127 is loopback, so they are not valid Class A host networks.
- For a classful network, the network address has all host bits 0, a directed broadcast address has all host bits 1, and usable host addresses = - 2 (Class A: - 2, Class B: - 2, Class C: - 2).
- Unicast uses one valid host IP as destination; multicast uses Class D group addresses; broadcast uses an all-ones host part for directed broadcast or 255.255.255.255 for limited broadcast.
- Private IPv4 ranges are 10.0.0.0/8 (Class A), 172.16.0.0/12 (Class B block), and 192.168.0.0/16 (Class C block); they are not routed on the public Internet.
- Loopback is 127.0.0.0/8 (commonly 127.0.0.1), 0.0.0.0 is used as an unspecified/default address, and a host cannot be assigned the network address or a broadcast address.