Objectives–Cisco The Internet Protocol
Upon completion of this chapter, you will be able to answer the following questions:
- What is the purpose of an IPv4 address?
- How do you convert between decimal and binary systems?
- How are IPv4 addresses and subnets used together?
- What are the different IPv4 address classes?
- What is the difference between the public and private IPv4 address ranges?
- What are unicast, multicast, and broadcast addresses?
Key Terms
This chapter uses the following key terms. You can find the definitions in the Glossary.
classless interdomain routing (CIDR) page 167
Network Address Translation (NAT) page 169
Introduction (8.0.1)
You know that you need a router to get outside of your local network. Routers alone can‛t do the job. You also need a proper IP address for the source and the destination addresses. There is a lot to know about IP addresses, including that each one has a network portion and a host portion. But, of course, there is more to IP addresses than that. This chapter explains the Internet Protocol, the structure of an IPv4 address, as well as how and when it is used.
You also learn how to convert a binary IPv4 address to decimal and vice versa. Believe me, it‛s more fun than it sounds, and knowing how to do this will put you ahead of the pack.
Purpose of the IPv4 Address (8.1)
Devices on the same network or different networks use IPv4 addresses to communicate. Messages are sent from the IPv4 address of the source to the IPv4 address of the destination.
The IPv4 Address (8.1.1)
A host needs an IPv4 address to participate on the Internet and almost all LANs today. The IPv4 address is a logical network address that identifies a particular host. It must be properly configured and unique within the LAN, for local communication. It must also be properly configured and unique in the world, for remote communication. This is how a host is able to communicate with other devices on the Internet.
An IPv4 address is assigned to the network interface connection for a host. This connection is usually a network interface card (NIC) installed in the device. Examples of end-user devices with network interfaces include workstations, servers, network printers, and IP phones. Some servers can have more than one NIC, and each of these has its own IPv4 address. Router interfaces that provide connections to an IP network also have an IPv4 address.
Every packet sent across the Internet has a source and destination IPv4 address. This information is required by networking devices to ensure the information gets to the destination and any replies are returned to the source.
Packet Tracer—Connect to a Web Server (8.1.2)
In this activity, you will observe how packets are sent across the Internet using IP addresses.
Binary Conversion of an IPv4 Address (8.2)
IPv4 addresses are 32-bit values written in base 10, or the decimal number system. To understand IPv4 addressing, you need to understand how to convert between the binary and decimal number system.
IPv4 Addressing (8.2.1)
An IPv4 address is simply a series of 32 binary bits (ones [1s] and zeros [0s]). There are over 4 billion possible IPv4 addresses using a 32-bit addressing scheme.
Humans find it very difficult to read a binary IPv4 address. For this reason, the 32 bits are grouped into four 8-bit bytes called octets. An IPv4 address in this format is hard for humans to read, write, and remember. To make the IPv4 address easier to understand, each octet is presented as its decimal value, separated by a decimal point, or period. This is referred to as dotted-decimal notation.
When a host is configured with an IPv4 address, it is entered as a dotted-decimal number such as 192.168.1.5, as shown in Figure 8-1. The 32-bit binary equivalent is 11000000101010000000000100000101. If you mistyped just one bit, the address would be different, and the host would not be able to communicate on the network.
Figure 8-1 Windows IPv4 Addressing
Video—Binary to Decimal Conversion (8.2.2)
Refer to the online course to view this video.
Binary to Decimal (8.2.3)
When a host receives an IPv4 address, it looks at all 32 bits as they are received by the NIC. Humans, on the other hand, need to convert those 32 bits into their four-octet decimal equivalent. Each octet is made up of 8 bits, and each bit has a value. The four groups of 8 bits have the same set of values. The rightmost bit in an octet has a value of 1, and the values of the remaining bits, from right to left, are 2, 4, 8, 16, 32, 64, and 128.
As in Figure 8-2, you can determine the value of the octet by adding the values of positions wherever a binary 1 is present:
Figure 8-2 Calculating Binary Octets to Dotted-Decimal
- If there is a zero in a position, do not add the value.
- If all 8 bits are zeros, 00000000, the value of the octet is 0.
- If all 8 bits are ones, 11111111, the value of the octet is 255 (128+64+32+16+8+4+2+1).
- If the 8 bits are mixed, such as the example 00100111, the value of the octet is 39 (32+4+2+1).
So the value of each of the four octets can range from 0 to a maximum of 255.
Activity—Binary to Decimal Conversions (8.2.4)
Refer to the online course to complete this activity.
Activity—Decimal to Binary Conversions (8.2.5)
Refer to the online course to complete this activity.
Activity—Binary Game (8.2.6)
This is a fun way to learn binary numbers for networking.
Game Link: https://learningnetwork.cisco.com/docs/DOC-1803
You need to log in to cisco.com to use this link. You also need to create an account if you do not already have one.
The Binary Game presents problems that you must solve to gain points. When presented with a number on the right, click the appropriate squares to the left to represent that number. Yellow squares are counted, whereas red squares are not. Sometimes yellow squares are incorrect. Click them to turn them to red. When there is no number present to the right, click the empty box to bring up a number pad. Click the numbers to enter the correct answer represented by the yellow squares to the left. Click the Enter arrow at the bottom-right corner to enter the answer.
The first two problems have unlimited time. After you solve those two problems, the rest of the problems get harder and appear faster. When the screen fills up with unsolved problems, the game is over.
There are also various free mobile binary games. Search for “Binary Game” in your app store.
Lab—Use a Calculator for Binary Conversions (8.2.7)
In this lab, you will complete the following objectives:
- Switch between Windows Calculator modes.
- Use Windows Calculator to convert between decimal and binary.
- Use Windows Calculator to determine the number of hosts in a network with powers of 2.