IP Addressing Review

Chapter 5 explained the concepts behind IP addressing; Class A, B, and C networks; and subnetting. Before looking at the math behind IP addressing, a quick review will be helpful.

Many different Class A, B, and C networks exist. Table 12-2 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 12-2 List of All Possible Valid Network Numbers*

Class A

Class B

Class C

First Octet Range

1 to 126

128 to 191

192 to 223

Valid Network Numbers

1.0.0.0 to 126.0.0.0

128.1.0.0 to 191.254.0.0

192.0.1.0 to 223.255.254.0

Number of Networks of This Class

27 - 2

214 - 2

221 - 2

Number of Hosts per Network

224 - 2

216 - 2

28 - 2

Size of Network Part of Address (bytes)

1

2

3

Size of Host Part of Address (bytes)

3

2

1

*The "Valid Network Numbers" row 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" row 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.

Without subnetting, a different IP network must be used for each physical network. For example, Figure 12-1 shows three example IP addresses, each from a different network. One address is in a Class A network, one is in a Class B network, and one is in a Class C network.

Figure 12-1 Example Class A, B, and C IP Addresses and Their Formats

Class A

Network (8)

Host (24)

8

1

4

5

Class B

Network (16)

Host (16)

130

4

100

1

Class C

Network (24)

Host (8)

199

1

1

. 1

By definition, an IP address that begins with 8 in the first octet is in a Class A network, so the network part of the address is the first byte, or first octet. An address that begins with 130 is in a Class B network; by definition, Class B addresses have a 2-byte network part, as shown. Finally, any address that begins with 199 is in a Class C network, which has a 3-byte network part. Also by definition, a Class A address has a 1-byte host part, Class B has a 2-byte host part, and Class C has a 1-byte host part.

Humans simply can remember the numbers in Table 12-2 and the concepts in Figure 12-1 and then quickly determine the network and host part of an IP address. Computers, however, use a mask to define the size of the network and host parts of an address. The logic behind the mask results in the same conventions of Class A, B, and C networks that you already know, but the computer can deal with it better as a binary math problem. The mask is a 32-bit binary number, usually written in dotted-decimal format. The purpose of the mask is to define the structure of an IP address. In short, the mask defines the size of the host parts of an IP address, representing the host part of the IP address with binary 0s in the mask. Class A mask has its last 24 bits as binary 0, which means that the last three octets of the mask are 0s. Table 12-3 summarizes the default masks and reflects the sizes of the two parts of an IP address.

Table 12-3 Class A, B, and C Networks—Network and Host Parts and Default Masks

Class of Address

Size of Network Part of Address, in Bits

Size of Host Part of Address, in Bits

Default Mask for Each Class of Network

A

8

24

255.0.0.0

B

16

16

255.255.0.0

C

24

8

255.255.255.0

0 0

Post a comment