Rabu, 25 Oktober 2017

176

A 0 in each position indicates that the value for that position is not added to the total. A 0 in every position yields a total of 0, as follows in Table 6-3.

Table 6-3
Binary Positional Notation with Digit of 0




Decimal Value
128
64
32
16
8
4
2
1










Binary Digit

0
0
0
0
0
0
0
0









Position Value
0
0
0
0
0
0
0
0











For the conversion of a 32-bit IPv4 address, you identify the 4 bytes or octets that make up this address. You then convert each of these four octets to decimal. As an example, convert the IPv4 address 10101100000100000000010000010100 to the bytes of a dotted decimal address. The conversion starts with the low-order bits, in this case byte 00010100, and con-tinues up to the high-order byte.



How To



Step 1.      Divide the 32 bits into 4 octets, as follows:

10101100.00010000.00000100.00010100

Step 2.      Convert the low-order byte 00010100 first, as seen in Table 6-4.

Step 3.      Convert the next-highest byte, which is 00000100, as seen in Table 6-5.

Step 4.      Continue converting with the next byte, 00010000, as seen in Table 6-6.

Step 5.      Convert the highest byte, 10101100, as seen in Table 6-7.

Step 6.      Write down the four numbers with dots separating the octets, such as 172.16.4.20.




Table 6-4
Conversion of Binary Number 00010100




Decimal Value
128
64
32
16
8
4
2
1










Binary Digit

0
0
0
1
0
1
0
0









Position Value
0
0
0
16
0
4
0
0







Total Value



0 + 0 + 0 + 16 + 0 + 4 + 0 + 0 = 20








Table 6-5
Conversion of Binary Number 00000100




Decimal Value
128
64
32
16
8
4
2
1










Binary Digit

0
0
0
0
0
1
0
0









Position Value
0
0
0
0
0
4
0
0







Total Value


0 + 0 + 0 + 0 + 0 + 4 + 0 + 0 = 4














175

Binary Numbering System

In the binary numbering system, the radix is 2. Therefore, each position represents increas-ing powers of 2. In 8-bit binary numbers, the positions represent the quantities shown in Table 6-1.

Table 6-1
Binary Positional Values





Powers of 2
27
26
25
24
23
22
21
20









Decimal Value
128
64
32
16
8
4
2
1










The base 2 numbering system has only two digits: 0 and 1. When a byte is interpreted as a decimal number, the quantity that position represents is added to the total if the digit is a 1, and 0 is added if the digit is a 0.

A 1 in each position means that the value for that position is added to the total. Table 6-2 shows the values of each position with a 1 in the position.

Table 6-2
Binary Positional Notation with Digit of 1













Decimal Value
128
64
32
16
8
4
2
1




















Binary Digit

1
1
1
1
1
1
1
1









Position Value
128
64
32
16
8
4
2
1











The value of each position is added to determine the total value of the number. As in Table 6-1, when there is a 1 in each position of an octet, the total is 255, as follows:

128 + 64 + 32 + 16 + 8 + 4 + 2 + 1 = 255

174 - 2

Binary-to-Decimal Conversion

To understand the operation of a device in a network, you need to look at addresses and other data the way a network device does: in binary notation. This means that you need to have some skill in binary-to-decimal conversion.

Data represented in binary can represent many different forms of data to the human net-work. In this discussion, binary is discussed as it relates to IPv4 addressing. This means that each byte (octet) is interpreted as a decimal number in the range of 0 to 255.

Positional Notation



Learning to convert binary to decimal requires an understanding of the mathematical basis of a numbering system called positional notation. Positional notation means that a digit
represents different values depending on the position it occupies. More specifically, the value that a digit represents is the value of the digit multiplied by the power of the base, or radix, represented by the position the digit occupies. Some examples will help to clarify how this system works.

For the decimal number 245, the 2 is in the 100s, or 102, position. Therefore, this 2 repre-sents 2*102 (2 times 10 to the power of 2). Positional notation refers to this position as the base2 position because the base, or radix, is 10 and the power is 2.

Using positional notation in the base 10 number system, 245 represents the following:

245 = (2 * 102) + (4 * 101) + (5 * 100)

or

245 = (2 * 100) + (4 * 10) + (5 * 1)

CCNA CHAPTER 6 - HAL 174

Network and Host Portions

IPv4 addresses have two parts: the network portion and the host portion. For each IPv4 address, some portion of the most significant bits, or high-order bits, represents the net-work address. At Layer 3, a network is defined as a group of hosts that have identical bit patterns in the network address portion of their addresses. That is, all the bits in the network portion of their addresses are identical.

In the following example, the two addresses have identical network portions. Therefore, hosts assigned these two addresses would be on the same logical network:

172.16.4.20                    172.16.4.32

network host                   network host

portion   portion             portion    portion

Although all 32 bits define the IPv4 host address, a variable number of bits represent the host portion of the address. The number of bits used in this host portion determines the number of hosts within the network. In the previous example, the last octet, the lowest 8 bits, are the host portion. This means that the bits for the upper three octets represent the network portion.


You determine how many bits are required for the host portion based on the number of hosts that a network requires. If a particular network requires at least 200 hosts, you would need to use enough bits in the host portion to be able to represent at least 200 different bit patterns. To assign a unique address to 200 hosts, you would use the entire last octet. With 8 bits, a total of 256 different bit patterns can be achieved. As with the previous example, this means that the bits for the upper three octets represent the network portion. Calculating the number of hosts and determining which portion of the 32 bits of an IPv4 address refers to the network portion will be covered in the section “Calculating Network, Hosts, and Broadcast Addresses,” later in this chapter.

CCNA CHAPTER 6 - HAL 173

Addressing is a key function of network layer protocols. Addressing enables data communi-cation between hosts on the same network or on different networks. Internet Protocol ver-sion 4 (IPv4) provides hierarchical addressing for packets that carry your data.

Designing, implementing, and managing an effective IPv4 addressing plan ensures that net-works can operate effectively and efficiently. This chapter examines in detail the structure of IPv4 addresses and their application to the construction and testing of IP networks and subnetworks.


IPv4 Addresses

For communication to take place between hosts, the appropriate addresses must be applied to these devices. Managing the addressing of the devices and understanding the IPv4 address structure and its representation are essential.

Anatomy of an IPv4 Address

Each device on a network must be uniquely defined by a network layer address. At this layer, the packets of the communication are also identified with the source and destination addresses of the two end systems. With IPv4, each packet uses a 32-bit source address and a 32-bit destination address in the Layer 3 header.

These addresses are represented in the data network as binary patterns. Inside the devices, digital logic is applied for the interpretation of these addresses. For the human network, a string of 32 bits is difficult to interpret and even more difficult to remember. For this reason, IPv4 addresses are represented using dotted decimal format.

Dotted Decimal

IPv4 addresses are easier to remember, write, and verbally communicate than strings of 32 bits. Representing IPv4 addresses as dotted decimals begins by separating the 32 bits of the address into bytes. Each byte of the binary pattern, called an octet, is separated with a dot. The bytes are called an octet, because each of the decimal numbers represents 1 byte, or 8 bits.

For example, the following address:

10101100000100000000010000010100

is expressed in dotted decimal as

172.16.4.20

Keep in mind that devices use binary logic. The dotted decimal format makes it easier for people to use and remember addresses.