Classes of Networks – Data Link – Cisco Certified Expert
Classes of Networks
Data Link
Last Updated on Sun, 19 Feb 2023
In Figure 5-3 and the surrounding text, I claimed that the IP addresses of devices attached to the Token Ring all started with 8 and that the IP addresses of devices attached to the Ethernet all started with 130.4. Why only one number for the “prefix” on the Token Ring and two numbers on the Ethernet? Well, it all has to do with IP address classes.
RFC 790 defines the IP protocol, including multiple different classes of networks. IP defines three different network classes, called A, B, and C, from which individual hosts are assigned IP addresses. TCP/IP defines Class D (multicast) addresses and Class E (experimental) addresses as well.
By definition, all addresses in the same Class A, B, or C network have the same numeric value network portion of the addresses. The rest of the address is called the host portion of the address.
Using the post office example, the network part of an IP address acts like the ZIP code, and the host part acts like the street address. Just as a letter-sorting machine three states away from you cares only about the ZIP code on a letter addressed to you, a router three hops away from you cares only about the network number that your address resides in.
Class A, B, and C networks each have a different length for the part that identifies the network:
■ Class A networks have a 1-byte-long network part. That leaves 3 bytes for the rest of the address, called the host part.
■ Class B networks have a 2-byte-long network part, leaving 2 bytes for the host portion of the address.
■ Class C networks have a 3-byte-long network part, leaving only 1 byte for the host part.
For instance, Figure 5-3 lists network 8.0.0.0 next to the Token Ring. Network 8.0.0.0 is a Class A network, which means that only 1 byte is used for the network part of the address. So, all hosts in network 8.0.0.0 begin with 8. Similarly, Class B network 130.4.0.0 is listed next to the Ethernet; because it is Class B, 2 bytes define the network part, and all addresses begin with those same two bytes. When written down, network numbers have all decimal 0s in the host part of the number. So, Class A network “8” is written 8.0.0.0, Class B network 130.4 is written 130.4.0.0, and so on.
Now consider the size of each class of network. Class A networks need 1 byte for the network part, leaving 3 bytes, or 24 bits, for the host part. There are 224 different possible values in the host part of a Class A IP address. So, each Class A network can have 224 IP addresses—except for two reserved host addresses in each network, as shown in the last column of Table 5-3. The table summarizes the characteristics of Class A, B, and C networks.
Table 5-3 Sizes of Network and Host Parts of IP Addresses with No Subnetting
Any Network of This Class
Number of Network Bytes (Bits)
Number of Host Bytes (Bits)
Number of Addresses per Network*
A
1 (8)
3 (24)
224 – 2
B
2 (16)
2 (16)
216 – 2
C
3 (24)
1 (8)
28 – 2
*There are two reserved host addresses per network.
*There are two reserved host addresses per network.
Network numbers look like actual addresses because they are in dotted-decimal format. However, network numbers are not actually IP addresses because they cannot be assigned to an interface as an IP address. Conceptually, network numbers represent the group of all IP addresses in the network, much like a ZIP code represents the group of all addresses in a community. Based on the three examples from Figure 5-3, Table 5-4 provides a closer look at the numerical version of the three network numbers: 8.0.0.0, 130.4.0.0, and 199.1.1.0.
Table 5-4 Example Network Numbers, Decimal and Binary
Network Number
Binary Representation, with Host Part Bold
8.0.0.0
00001000 00000000 00000000 00000000
130.4.0.0
10000010 00000100 00000000 00000000
199.1.1.0
11000111 00000001 00000001 00000000
Two numbers inside each Class A, B, or C network are reserved, as mentioned at Table 5-3. One of the two reserved values is the network number itself. For instance, each of the numbers in Table 5-4 is reserved. The other reserved value is the one with all binary 1s in the host part of the address—this number is called the network broadcast or directed broadcast address. Also, because the network number is the lowest numerical value inside that network and the broadcast address is the largest, all the numbers between the network number and the broadcast address are the valid, useful IP addresses that can be used to address interfaces in the network.
The Actual Class A, B, and C Network Numbers
Many different Class A, B, and C networks exist. If your firm connects to the Internet, it must use registered, unique network numbers. To that end, the Network Information Center (NIC) assigns network numbers so that all IP address are unique. By assigning one company a particular network number, and not assigning that same network number to any other company, all IP addresses can be unique throughout the Internet. Table 5-5 summarizes the possible network numbers, the total number of each type, and the number of hosts in each Class A, B, and C network.
Table 5-5 List of All Possible Valid Network Numbers*
Class
First Octet Range
Valid Network Numbers
Total Number of This Class of Network
Number of Hosts per Network
A
1 to 126
1.0.0.0 to 126.0.0.0
27 – 2
224 – 2
B
191.254.0.0
214 – 2
216 – 2
C
192 to 223
192.0.1.0 to 223.255.254.0
221 – 2
28 – 2
*The Valid Network Numbers column shows actual network numbers. There are several reserved cases. For example, networks 0.0.0.0 (originally defined for use as a broadcast address) and 127.0.0.0 (still available for use as the loopback address) are reserved. Networks 128.0.0.0, 191.255.0.0, 192.0.0.0, and 223.255.255.0 also are reserved.
*The Valid Network Numbers column shows actual network numbers. There are several reserved cases. For example, networks 0.0.0.0 (originally defined for use as a broadcast address) and 127.0.0.0 (still available for use as the loopback address) are reserved. Networks 128.0.0.0, 191.255.0.0, 192.0.0.0, and 223.255.255.0 also are reserved.
Memorizing the contents of Table 5-5 should be one of the first things you do in preparation for the CCNA exam(s). Engineers should be able to categorize a network as Class A, B, or C with ease. Also memorize the number of octets in the network part of Class A, B, and C addresses, as shown in Table 5-4.
IP Subnetting
One of the most important topics on both the INTRO and ICND exams is the topic of subnetting. You need to know how it works and how to “do the math” to figure out issues when subnetting is in use, both in real life and on the exam.
Chapter 12 covers the details of subnetting concepts, motivation, and math, but you should have a basic understanding of the concepts before covering the topics between here and Chapter 12. So, this section describes the basics.
IP subnetting creates vastly larger numbers of smaller groups of IP addresses, compared with simply using Class A, B, and C conventions. The Class A, B, and C rules still exist—but now, a single Class A, B, or C network can be subdivided into many smaller groups. Subnetting treats a subdivision of a single Class A, B, or C network as if it were a network itself. By doing so, a single Class A, B, or C network can be subdivided into many nonoverlapping subnets.
Comparing a single network topology using subnetting with the same topology without subnetting drives home the basic concept. Figure 5-4 shows such a network, without subnetting.
Figure 5-4 Backdrop for Discussing Numbers of Different Networks/Subnetworks
Ray 150.1.0.0 150.2.0.0 Hannah
Figure 5-4 Backdrop for Discussing Numbers of Different Networks/Subnetworks
Ray 150.1.0.0 150.2.0.0 Hannah
The design in Figure 5-4 requires six groups, each of which is a Class B network in this example. The four LANs each use a single Class B network. In other words, each of the LANs attached to routers A, B, C, and D is in a separate network. Additionally, the two serial interfaces composing the point-to-point serial link between routers C and D use the same network because these two interfaces are not separated by a router. Finally, the three router interfaces composing the Frame Relay network with routers A, B, and C are not separated by an IP router and would compose the sixth network.
Each Class B network has 216 – 2 hosts addresses in it—far more than you will ever need for each LAN and WAN link. In fact, this design would not be allowed if it were connected to the Internet. The NIC would not assign six separate registered Class B network numbers—
in fact, you probably would not even get one Class B network because most of the Class B addresses already are assigned. You more likely would get a couple of Class C networks, and the NIC would expect you to use subnetting.
Figure 5-5 illustrates a more realistic example that uses basic subnetting.
Figure 5-5 Using Subnets
Ray 150.150.1.0 15ai5°.2.° Hannah
Figure 5-5 Using Subnets
Ray 150.150.1.0 15ai5°.2.° Hannah
As in Figure 5-4, the design in Figure 5-5 requires six groups. Unlike Figure 5-5, this figure uses six subnets, each of which is a subnet of a single Class B network. This design subnets Class B network 150.150.0.0, which has been assigned by the NIC. To perform subnetting,the third octet (in this example) is used to identify unique subnets of network 150.150.0.0. Notice that each subnet number in the figure shows a different value in the third octet, representing each different subnet number. In other words, this design numbers or identifies each different subnet using the third octet.
When subnetting, a third part of an IP address appears between the network and host parts of the address—namely, the subnet part of the address. This field is created by “stealing” or “borrowing” bits from the host part of the address. The size of the network part of the address never shrinks—in other words, Class A, B, and C rules still apply when defining the size of the network part of an address. The host part of the address shrinks to make room for the subnet part of the address. Figure 5-6 shows the format of addresses when subnetting.
Figure 5-6 Address Formats When Subnetting Is Used
8 24 – x x
Network
Subnet
Host
Class A
16
16-x
X
Network
Subnet
Host
Class B
24
8 – x x
Network
Subnet Host
Class C
Now, instead of routing based on the network part of an address, routers can route based on the combined network and subnet parts. In fact, most people do not even bother distinguishing between the network part and the subnet part—they just call both fields together the subnet part of an address.
Finally, IP addressing with subnetting uses a concept called a subnet mask. A subnet mask helps define the structure of an IP address, as shown in Figure 5-6. Chapter 12 explains the details.
Continue reading here: Boot Protocol BOOTP
Was this article helpful?
0
0