• Aucun résultat trouvé

IP Address Classes and Classful IP Routing

Dans le document IP NETWORKS CISCOQoS (Page 27-30)

Much like a street address within a city, the TCP/IP address defines the location of a participating node within the network. Each node in a TCP/IP network must possess an address to be able to participate within the network. As with street addresses,TCP/IP addresses must be unique. Consider what would happen if two different houses had the same street address.This situation would make the mail carrier’s job very difficult, and it would be unlikely that you would get your mail.This basic concept applies to networks varying from the simplest to the most complex internetworks, such as the Internet.

To understand TCP/IP addressing, you must first understand the binary con-cept. A data bit can have only one of two values, one or zero. One and zero (on and off, respectively) are the only two acceptable values in the binary system. It takes eight bits to make up a byte or octet. An octet may look similar to the fol-lowing: 10111011. Notice that the octet consists of eight bits or positions.

Each bit or position within an octet has a specific value.To determine the total decimal value of an octet, you must first build a binary map.To do this, start

www.syngress.com

with the left most bit, which has a value of 128. Moving to the right, each number is exactly half of the number to its left (See Table 1.1). Once you have completed this task of dividing each number in half to finish at one, you will notice that you have eight separate values. Each of these values is given to the bit in that respective position in the octet. For example, if an octet starts with a one and the rest of the values are zeros, then the value of that octet is 128. If the octet consists of all zeros except for the right most position, then that octet has a value of one.

Table 1.1The Binary Conversion Map

128 64 32 16 8 4 2 1

To calculate the decimal value of an octet, you must add all the values together that have a binary position value of one. For example, if the two left-most bits have a value of one and the rest of the positions are zero, 11000000, then the value of that octet is 192 (128+64). If the octet in binary looked like 10101010, then the decimal value would be 170 (128+32+8+2).Table 1.2 gives several examples of binary to decimal conversion.

When learning the concept of binary to decimal conversion, it is best to practice the conversion until you feel thoroughly comfortable with it. Most sci-entific calculators have binary to decimal conversion capability, which will ensure your practice calculations are correct.This fundamental task must be mastered before you move on to more complex TCP/IP concepts.

Table 1.2Binary to Decimal Conversion Examples Binary Value Decimal Value 11101010 234

00010010 18 00000101 5

01101001 105 11111111 255

00000000 0

The TCP/IP addressing scheme uses a four-octet value, represented in dec-imal format, to identify a host or network address. Each octet within this address has a binary value between 0 and 255 (See Table 1.3). Considering the address 120.89.234.23 for example, the following is what it would look like in binary:

01111000.01011001.11101010.00010111

The ability to convert TCP/IP addresses back and forth between decimal and binary is a critical skill. For instance, many subnetting problems may not be as obvious in decimal format, and observing the addresses in binary can make the solution clearer.

Table 1.3Binary to TCP/IP Address Conversion Examples

Binary Value TCP/IP Address

00000101.10100100.11110000.01010010 5.164.240.82 01010010.01000100.01000100.01101001 82.68.68.105 11101010.01000100.01010010.11111111 234.68.82.255 00000000.00000000.11111111.11111111 0.0.255.255

Two distinct portions make up TCP/IP addresses.The first portion defines the network in which the sought after host resides, whereas the second portion of the address defines the host.The subnet mask defines which portion of the address is for network identification and which portion is for host identification.

The process that defines whether an address resides on the local subnet or a remote network is known as ANDing. In binary, a logical ANDing relates the TCP/IP address with the subnet mask to determine the network identification. If both the TCP/IP address and the subnet mask have a value of one, then the subnet value is one. If the address, subnet mask, or both contain a value of zero, then the value is zero (See Table 1.4).

Table 1.4ANDing Conversion Examples

Variable Binary Value Decimal Value

IP Address 00000101.10100100.11110100.01010010 5.164.244.82 Subnet Mask 11111111.11111111.11111100.00000000 255.255.252.0 Subnet 00000101.10100100.11110100.00000000 5.164.244.0 IP Address 11001000.10011110.00010000.00100011 200.158.16.35 Subnet Mask 11111111.11111111.11111111.00000000 255.255.255.0 Subnet 11001000.10011110.00010000.00000000 200.158.16.0

TCP/IP addressing is implemented by using either a classful or a classless scheme. Both methods have a purpose, and it is important that you understand the differences between them. Classful addressing consists of three different

www.syngress.com

default classes of network addresses ranging from Class A to Class C. It also uses a default subnet mask related to each class of address (See Table 1.5).There are two other classes of addresses that are not used for normal traffic, Classes D and E.

The Class D address range is reserved for multicasting, which will be discussed later in this chapter.The Class E address range is reserved for development and experimental use.

Classful addressing is a legacy implementation of IP addressing. In classful routing, routers do not advertise the mask with the network updates.This means that each router assumes the mask is the same as the ones assigned to their inter-faces (see Table 1.5). In addition when advertising about one network address into another network address, the routers will automatically summarize on the class network boundary, not the subnet field.

Classful routing requires the same subnet mask be used throughout all sub-networks under the same network.This is a serious limitation to the flexibility of the network.

Classless addressing remedies this issue by including the subnet masks with routing advertisements. In classless addressing, no default subnet mask is assumed.

Another benefit of classless addressing is that it supports Variable Length Subnet Masking (VLSM).

InVLSM, the subnet mask is manipulated so as to provide either more hosts or more networks for your network. Classless addressing gives you more flexi-bility to conform your network’s addressing scheme to the logical or physical layout of your network.We discuss this further in the VLSM portion of this chapter.

Dans le document IP NETWORKS CISCOQoS (Page 27-30)