The network address—also called the network number—uniquely identifies each network. Every machine on the same network shares that network address as part of its IP address. In the IP address 172.16.30.56, for example, 172.16 is the network address (and in just a minute I'll show you how this is true).
The host address is assigned to, and uniquely identifies, each machine on a network. This part of the address must be unique because it identifies a particular machine—an individual—as opposed to a network, which is a group. So in the sample IP address 172.16.30.56, the 30.56 is the host address.
The designers of the Internet decided to create classes of networks based on network size. For the small number of networks possessing a very large number of hosts, they created the rank Class A network. At the other extreme is the Class C network, which is reserved for the numerous networks with a small number of hosts. The class distinction for networks between very large and very small is predictably the Class B network.
Subdividing an IP address into a network and host address is determined by the class designation of your network.
To ensure efficient routing, Internet designers defined a mandate for the leading-bits section of the address for each different network class. For example, since a router knows that a Class A network address always starts with a 0, the router might be able to speed a packet on its way after reading only the first bit of its address. This is where the address schemes define the difference between a Class A, a Class B, and a Class C address. Coming up, I'll discuss the differences between these three classes followed by a discussion of the Class D and Class E addresses. For now, know that Classes A, B, and C are the only ranges that are used to address hosts in our networks.
Class A Addresses
In a Class A network address, the first byte is assigned to the network address, and the three remaining bytes are used for the host addresses. The Class A format is as follows:
network.host.host.host For example, in the IP address 18.104.22.168, the 49 is the network address and 22.102.70 is the host address. Every machine on this particular network would begin with the distinctive network address of 49.
Class A network addresses are 1 byte long, with the first bit of that byte reserved and the 7 remaining bits available for manipulation, or addressing. As a result, the theoretical maximum number of Class A networks that can be created is 128. Why? Well, each of the 7 bit positions can be either a 0 or a 1 and 27 gives you 128.
The designers of the IP address scheme said that the first bit of the first byte in a Class A network address must always be off, or 0. This means a Class A address must be between 0 and 127 in the first byte, inclusive.
Consider the following network address:
0xxxxxxx If we turn the other 7 bits all off and then turn them all on, we'll find the Class A range of network addresses:
00000000 = 0 01111111 = 127 So, a Class A network is defined in the first octet between 0 and 127, and it can't be less or more.
To complicate matters further, the network address of all 0s (0000 0000) is reserved to designate the default route. Additionally, the address 127, which is reserved for diagnostics, can't be used either, which means that you can really only use the numbers 1 to 126 to designate Class A network addresses. This means the actual number of usable Class A network addresses is 128 minus 2, or 126.
Table to show Reserved IP adresses
|Network address of all 0s||Interpreted to mean “this network or segment.”|
|Network address of all 1s||Interpreted to mean “all networks.”|
|Network 127.0.0.1||Reserved for loopback tests. Designates the local host and allows that host to send a test packet to itself without generating network traffic.|
|Host address of all 0s||Interpreted to mean “network address” or any host on specified network.|
|Host address of all 1s||Interpreted to mean “all hosts” on the specified network; for example, 22.214.171.124 means “all hosts” on network 126 (Class A address).|
|Entire IP address set to all 0s||Used by Cisco routers to designate the default route. Could also mean “any network.”|
|Entire IP address set to all 1s (same as 255.255.255.255)||Broadcast to all hosts on the current network; sometimes called an “all 1s broadcast” or limited broadcast.|
Each Class A address has 3 bytes (24 bit positions) for the host address of a machine. This means there are 224—or 16,777,216—unique combinations and, therefore, precisely that many potential unique host addresses for each Class A network. Because host addresses with the two patterns of all 0s and all 1s are reserved, the actual maximum usable number of hosts for a Class A network is 224 minus 2, which equals 16,777,214. Either way, you can see that's a seriously huge number of hosts to have on a network segment!
Here's an example of how to figure out the valid host IDs in a Class A network address:
All host bits off is the network address: 10.0.0.0. All host bits on is the broadcast address: 10.255.255.255.
The valid hosts are the numbers in between the network address and the broadcast address: 10.0.0.1 through 10.255.255.254. Notice that 0s and 255s can be valid host IDs. All you need to remember when trying to find valid host addresses is that the host bits can't ever be all turned off or all turned on at the same time.
Class B Addresses
In a Class B network address, the first 2 bytes are assigned to the network address and the remaining 2 bytes are used for host addresses. The format is as follows:
network.network.host.host For example, in the IP address 172.16.30.56, the network address is 172.16 and the host address is 30.56.
With a network address being 2 bytes (8 bits each), we're left with 216 unique combinations. But the Internet designers decided that all Class B network addresses should start with the binary digit 1, then 0. This leaves 14 bit positions available to manipulate, so in reality, we get 16,384 (that is, 214) unique Class B network addresses.
In a Class B network, the RFCs state that the first bit of the first byte must always be turned on but the second bit must always be turned off. If we turn the other 6 bits all off and then all on, we will find the range for a Class B network:
10000000 = 128 10111111 = 191 As you can see, a Class B network is defined when the first byte is configured from 128 to 191.
A Class B address uses 2 bytes for host addresses. This is 216 minus the two reserved patterns (all 0s and all 1s), for a total of 65,534 possible host addresses for each Class B network.
Here's an example of how to find the valid hosts in a Class B network:
All host bits turned off is the network address: 172.16.0.0. All host bits turned on is the broadcast address: 172.16.255.255. The valid hosts would be the numbers in between the network address and the broadcast address: 172.16.0.1 through 172.16.255.254.
Class C Addresses
The first 3 bytes of a Class C network address are dedicated to the network portion of the address, with only 1 measly byte remaining for the host address. Here's the format:
network.network.network.host Using the example IP address 192.168.100.102, the network address is 192.168.100 and the host address is 102.
In a Class C network address, the first three bit positions are always the binary 110. The calculation is as follows: 3 bytes, or 24 bits, minus 3 reserved positions leaves 21 positions. Hence, there are 221, or 2,097,152, possible Class C networks.
For Class C networks, the RFCs define the first 2 bits of the first octet as always turned on, but the third bit can never be on. Following the same process as the previous classes, convert from binary to decimal to find the range. Here's the range for a Class C network:
11000000 = 192 11011111 = 223
So, if you see an IP address with a range from 192 up to 223, you'll know it's a Class C IP address.
Each unique Class C network has 1 byte to use for host addresses. This gets us to 28, or 256, minus the two reserved patterns of all 0s and all 1s for a total of 254 available host addresses for each Class C network.
Here's an example of how to find a valid host ID in a Class C network:
All host bits turned off is the network ID: 192.168.100.0. All host bits turned on is the broadcast address: 192.168.100.255. The valid hosts would be the numbers in between the network address and the broadcast address: 192.168.100.1 through 192.168.100.254.
Class D and E Addresses
Addresses with the first octet of 224 to 255 are reserved for Class D and E networks. Class D (224–239) is used for multicast addresses and Class E (240–255) for scientific purposes.
The multicast range is from 126.96.36.199 through 188.8.131.52.
Special Purposes of Network Addresses
Some IP addresses are reserved for special purposes, so network administrators can't ever assign them to hosts.
These are available to use for private ip addresses on an internal network.
Published on Sun 08 April 2007 by Alistair Pinter in Networking with tag(s): ip addresses