Curs PC si internet cap 10.4 IP Address Classes
10.4 IP Address Classes 10.4.1 IP address classes Instructor Note The purpose of this target indicator is that the students recognize class A, B, and C IP addresses. Students should be able to classify IP addresses as A, B, or C. They should also be able to label the octets "network" and "host" as appropriate for that address class. Emphasize that the network numbers are assigned by an external agency; only the host numbers can be assigned locally. While you may have heard of other class-less IP addressing schemes (such as CIDR, classless interdomain routing), the concepts of A, B, and C addresses are still widely used. And many questions on the CCNA exam assume classful addressing. There are three classes of IP addresses that an organization can receive from the American Registry for Internet Numbers (ARIN) (or the organization's ISP). They are Class A, B, and C. ARIN now reserves Class A addresses for governments throughout the world (although a few large companies, such as Hewlett Packard, have received one in the past) and Class B addresses for medium-sized companies. All other requestors are issued Class C addresses. Lab Activity In this lab, you will learn different classes of IP addresses and how TCP/IP networks operate. Class A When written in a binary format, the first (leftmost) bit of a Class A address is always 0. An example of a Class A IP address is 124.95.44.15. The first octet, 124, identifies the network number assigned by ARIN. The internal administrators of the network assign the remaining 24 bits. An easy way to recognize whether a device is part of a Class A network is to look at the first octet of its IP address, which will range from 0-126. (127 does start with a 0 bit, but has been reserved for special purposes.)All Class A IP addresses use only the first 8 bits to identify the network part of the address. The remaining three octets can be used for the host portion of the address. Every network that uses a Class A IP address can have assigned up to 2 to-the-power of 24 (224) (minus 2), or 16,777,214, possible IP addresses to devices that are attached to its network. Class BThe first 2 bits of a Class B address are always 10 (one and zero). An example of a Class B IP address is 151.10.13.28. The first two octets identify the network number assigned by ARIN. The internal administrators of the network assign the remaining 16 bits. An easy way to recognize whether a device is part of a Class B network is to look at the first octet of its IP address. Class B IP addresses always have values ranging from 128 to 191 in their first octet.All Class B IP addresses use the first 16 bits to identify the network part of the address. The two remaining octets of the IP address can be used for the host portion of the address. Every network that uses a Class B IP address can have assigned up to 2 to-the-power of 16 (216) (minus 2 again!), or 65,534, possible IP addresses to devices that are attached to its network. Class CThe first 3 bits of a Class C address are always 110 (one, one and zero). An example of a Class C IP address is 201.110.213.28. The first three octets identify the network number assigned by ARIN. The internal administrators of the network assign the remaining 8 bits . An easy way to recognize whether a device is part of a Class C network is to look at the first octet of its IP address. Class C IP addresses always have values ranging from 192 to 223 in their first octet.All Class C IP addresses use the first 24 bits to identify the network part of the address. Only the last octet of a Class C IP address can be used for the host portion of the address. Every network that uses a Class C IP address can have assigned up to 28 (minus 2), or 254, possible IP addresses to devices that are attached to its network. 10.4 IP Address Classes 10.4.2 IP addresses as decimal numbers Instructor Note The graphic summarizes the first octet rule, which allows quick identification of class A, B, and C addresses, written in binary, based on the first bits in the first octet. IP addresses identify a device on a network and the network to which it is attached. To make them easy to remember, IP addresses are usually written in dotted decimal notation (4 decimal numbers separated by dots; for example, 166.122.23.130 - keep in mind that a decimal number is a base 10 number, the type we use in everyday life). 10.4 IP Address Classes 10.4.3 Binary and decimal conversion review Instructor Note In chapter 1, students were taught the binary number system. Review the techniques for converting between the two systems. Use of calculators is discouraged for two reasons. First, practitioners of networking often need to make quick, "back-of-the-envelope" conversions between decimal and binary numbers. Second, no calculators are allowed on the CCNA exam. Each place in an octet represents a different power of 2. As in the Base 10 number system, the powers increase from right to left. Figure illustrates a method for converting binary numbers to decimal numbers. Figure allows you to practice your conversion skills.Figure illustrates a method for converting decimal numbers to binary numbers. Figure allows you to practice your conversion skills.Example:10010000 (Work from right to left).0 x 20 = 0 0 x 21 = 0 0 x 22 = 0 0 x 23 = 0 1 x 24 = 16 0 x 25 = 0 0 x 26 = 0 1 x 27 = 128 __________ Total = 144 In this example, there are 0 values of 20; 0 values of 21; 0 values of 22; 0 values of 23; 1 value of 24; 0 values of 25; 0 values of 26; and 1 value of 27. There are no 1s, no 2s, no 4s, no 8s, one 16s, no 32s, no 64, and one 128. Added together, the values total 144, therefore, the binary number 10010000 equals the decimal number 144. 10.4 IP Address Classes 10.4.4 Converting decimal IP addresses to binary equivalents. Instructor Note The purpose of this target indicator is practice of decimal to binary conversions in the context of IP addressing. In order to convert decimal IP addresses to binary numbers you must know the decimal values of each of the 8 bits in each octet. Starting with the bit that is on the left side of the octet, the values start at 128 and are reduced by half each time you move 1 bit to the right, continuing to a value of 1 on the right side of the octet.. The conversion below illustrates the first octet only. Example:Convert the first octet of 192.57.30.224 to a binary format.128 +64 +0 +0 +0 +0 +0 +0 = 192 27 26 25 24 23 22 21 20 1 1 0 0 0 0 0 0 = 11000000 The first step is to select the octet on the far left and determine whether the value is greater than 128. In this instance (192), it is. Then place a 1 in the first bit and subtract 128 from 192. The remainder is 64. The value of the next bit is 64, which is equal to the value of the remainder, so that bit would be 1 as well. Subtract 64 from 64. The remainder is 0, therefore the remaining bits would all be 0. The binary number for the first octet would be 11000000.Exercise:Convert the remaining octets (57, 30, 224), in the IP address, to binary format. 10.4 IP Address Classes 10.4.5 Converting binary IP addresses to decimal equivalents Instructor Note The purpose of this target indicator is practice of binary to decimal conversions in the context of IP addressing. To convert binary IP addresses to decimal numbers, use the opposite approach you used to convert decimal numbers to binary numbers. Example:Convert the first octet of the binary IP address 10101010.11111111.00000000.11001101 to a dotted decimal number.1 0 1 0 1 0 1 0 27 26 25 24 23 22 21 20 128 0 32 0 8 0 2 0 = 128 + 32 + 8 + 2 = 170 To convert this IP address, start with the bit that is on the far left side in the first octet. It is 1. You know that the value of a bit in that position is 128, therefore the decimal number starts with a value of 128. The next value is 0, so skip it. The third value is 1; any bit in that position has a value of 32; therefore, you add 32 to 128 to get 160. The fourth bit is 0, so skip it. The fifth bit is 1, which means that you add 8 to the current total of 160, giving you a new total of 168. The sixth bit is also 0, so skip it and the seventh bit is 1, which means add 2 to the current total of 168. The last bit is 0, so you can skip it.