1. The three Netmask Classes
Class A Class A comprises networks 1.0.0.0 through 127.0.0.0. The
network number is contained in the first octet. The last three octets
provide for a 24 bit (32 - 8) host part, allowing 256 x 256 x 256 - 2 = 16,777,214
hosts for each A class.
Class B Class B contains networks 128.0.0.0 through 191.255.0.0; the
network number is in the first two octets. This allows for
(191 - 128 + 1 )x 255 = 16320 networks with 256 x 256 - 2 = 65024 hosts each.
Class C networks range from 192.0.0.0 through 223.255.255.0,
with the network number being contained in the first three
octets. This allows for (223 - 192 + 1) x 256 x 256 - 2 = 2 million networks with
254 hosts each.
Classes D (Multicast, that is between groups), E (Experimental), and F (for
future use) Addresses range from 224.0.0.0 through 254.0.0.0.
2. Netmask Classes
The IP address is first divided between networks and hosts.
The host bits are further divided between subnets and hosts.
(Where there is 255 that is 11111111, is masked)
Three different Network classes:
First octet range
Class A: 1 - 126
Default Subnet mask: 255.0.0.0
Network - Host - Host - Host
Class B: 128 - 191
Default Subnet mask: 255.255.0.0
Network - Network - Host - Host
Class C: 192 - 223
Default Subnet mask: 255.255.255.0
Network - Network - Network - Host
3. Example in C Class
Example 1
If the net mask is 255.255.255.128,
the last 8-bits is masked as follows:
- 10000000 == 128
It remains: 1 + 2 + 4 + 8 + 16 + 32 + 64 = 127
Or:
= 255 - 128 = 127 hosts to network.
Add 1 for the first host add subtract it because it is reserved.
we subtract 127 because also it is reserved (Broadcast Address: 192.168.0.127).
We get 127 + 1 - 2 = 126
If the Subnet ID is 192.168.0.0, then :
The Host Address Range is 192.168.0.1 - 192.168.0.126
The Subnet Bit is 1; then the max subnet is 2
21 = 2 subnets.
Example 2
If the net mask is 255.255.255.192,
the last 8-bits is masked as follows:
- 11000000 == 192
It remains: 1 + 2 + 4 + 8 + 16 + 32 = 63
Or:
= 255 - 192 = 63 hosts to network.
If the Subnet ID is 192.168.0.0, then :
The Host Address Range is 192.168.0.1 - 192.168.0.62
Add 1 for 192.168.0.0 and subtract it because it is reserved.
Subtractthe 192.168.0.63 because also it is reserved (Broadcast
Address is 192.168.0.63). We get 63 + 1 - 2 = 62
The Subnet Bit is 1; then the max subnet is 1 + 2
21 = 2 subnets.
Example 3
3. Other information about the classes
IP addressing is set to assure communication between hosts within networks.
A host is a device capable of receiving and transmitting IP packets on the network,
such as a workstation or a router. The hosts can be connected together by one or more
networks. We call a host a node and a network segment
The bits are labeled in network order, so that the first bit is bit 0 and the last is bit 31, The Class A takes the bits from 0 to 7 ( In decimal, 0 corresponds to 1 and 7 corresponds to 127)
Class D addresses are multicast, and Class E are reserved.
The address starting with 127 is a loopback address and should never be used for addressing outside the host. A host number of all binary 1's indicates a directed broadcast over the specific network. For example, 200.1.2.255 would indicate a broadcast over the 200.1.2 network. If the host number is 0, it indicates "this host". If the network number is 0, it indicates "this network" [2].
Broadcasting means to address a packet to all machines on
the netwark. Multicasting means addressing a packet to a certain group
of machines on the network.
Point-to-point network means connections betwin individual pairs of
machines. The packet steming from a source can accross another
intermediate machine before arriving to its destination. The path followed
by a packet is called a route. The routing table gives information
about the itinerary of a packet during its trip.
Class |
Prefix |
Network Number Bits |
Host Number Bits |
Range of Net Numbers |
Range of Host Numbers |
A |
0 |
1-7 |
8-31 |
0 to 126 |
0.0.1 to 255.255.254 |
B |
10 |
2-15 |
16-31 |
128.0 to 191.255 |
0.1 to 255.254 |
C |
110 |
3-23 |
24-31 |
192.0.0 to 233.255.255 |
1 to 254 |
D |
1110 |
|
|
|
|
E |
1111 |
|
|
|
|
|