Home > Sample chapters

CompTIA A+ Rapid Review: Networking

Objective 2.3: Explain properties and characteristics of TCP/IP

The primary protocol suite used on networks is Transmission Control Protocol/Internet Protocol (TCP/IP), and it includes several underlying protocols. You aren’t expected to be an expert on everything related to TCP/IP, but you do need to be able to identify and explain many basic characteristics. This includes the class of an IP address, differences between IPv4 and IPv6, differences between private and public addresses, and differences between statically and dynamically assigned IP addresses. You should also know about basic services provided on a network.

Exam need to know...

  • IP class

    For example: What class is 192.168.1.6? What class is 172.16.6.3?

  • IPv4 vs. IPv6

    For example: How many bits does an IPv6 address use? How are IPv6 addresses displayed?

  • Public vs. private vs. APIPA

    For example: What are the ranges of private IP addresses? When is an APIPA address used?

  • Static vs. dynamic

    For example: Which method (static or dynamic) results in more IP address conflicts?

  • Client-side DNS

    For example: What does DNS provide for a client?

  • DHCP

    For example: What does DHCP provide for a client?

  • Subnet mask

    For example: How is the subnet mask used with an IP address?

  • Gateway

    For example: What is the difference between a gateway and a router?

IP class

Classful IP addresses are in certain predefined ranges. When you know the class of an IP address, you automatically know its subnet mask.

True or false? An address of 10.20.30.88 is a Class C address.

Answer: False. This address is a Class A address.

The class of an address is identified by the first number in the address. For example, in the 10.20.30.88 address, the first number is 10, which indicates that it is a Class A address. This also tells you that it has a subnet mask of 255.0.0.0. The ranges of each type of address are as follows:

  • Class A—1 to 126 (subnet mask 255.0.0.0)

  • Class B—128 to 191 (subnet mask 255.255.0.0)

  • Class C—192 to 223 (subnet mask 255.255.255.0)

IPv4 vs. IPv6

IPv4 addresses use 32 bits and are displayed in dotted decimal format, such as 192.168.1.1. IPv6 addresses use 128 bits and are displayed in hexadecimal format separated by colons, like this: FC00:0000:0000:0000:042A:0000:0000:07F5.

True or false? The following two IPv6 addresses are identical: FC00::42A:0:0:7F5 and FC00:0000:0000:0000:042A:0000:0000:07F5.

Answer: True. IPv6 addresses can omit leading zeroes and use zero compression to shorten the way the address is displayed without changing the actual address.

IPv6 addresses use 32 hexadecimal characters. Each hexadecimal character represents four bits for a total of 128 bits (4 × 128).

The IPv6 address is often represented as eight groups of four hexadecimal characters separated by colons. For example, in the IPv6 address of FC00:0000:0000:0000:042A:0000:0000:07F5, FC00 is one group of four hexadecimal characters, and the next group is 0000.

To understand how leading zeros are omitted, imagine you have 120 dollars. It could be represented as 0120 dollars, and it’s still the same amount of money. However, we typically omit the leading zeros with money, and you can do the same thing with IPv6 addresses. The following example address is shown with leading zeros omitted: FC00:0:0:0:42A:0:0:7F5.

Trailing zeros are never omitted. For example, 120 dollars and 12 dollars are not the same amount of money. Similarly, FC00 is the not the same hexadecimal number as FC.

Zero compression is also used with IPv6 addresses. Instead of displaying groups of zeros, you can use a double colon to replace one or more such zero-value groups. For example, either of the following two IPv6 addresses represents the same address:

  • FC00::042A:0000:0000:07F5

  • FC00:0000:0000:0000:042A::07F5

An IPv6 address has eight groups of four hexadecimal characters. When you see a double colon, you can replace it with enough missing groups to get eight groups.

For example, in the first address, FC00::042A:0000:0000:07F5, five groups are showing (FC00, 042A, 0000, 0000, and 07F5), so you know that the double colon represents three groups of zeros (0000, 0000, and 0000).

In the second address, FC00:0000:0000:0000:042A::07F5, you can see six groups (FC00, 0000, 0000, 0000, 042A, and 07F5), so you know that the double colon represents two groups of zeros (0000 and 0000).

You cannot use two double colons in any IPv6 address. For example, if you did this FC00::042A::07F5, you would see that three groups are showing (FC00, 042A, and 07F5), indicating that five groups are missing. However, there’s no way to tell how many groups should be used for each double colon. It could be FC00:0000:0000:042A:0000:0000:0000:07F5 or FC00:0000:0000:0000:042A:0000:0000:07F5.

Both methods of omitting leading zeros and zero compression can be combined. For example, FC00:0000:0000:0000:042A:0000:0000:07F5 can be shortened to FC00::42A:0:0:7F5.

Public vs. private vs. APIPA

IP addresses used on the Internet are public IP addresses. IP addresses used on internal networks are private IP addresses. Automatic Private IP Addressing (APIPA) addresses are randomly selected private addresses that always start with 169.254.

True or false? An IP address of 172.16.10.5 is a public address.

Answer: False. This is a private IP address.

Private IP addresses are formally defined in Request for Comments (RFC) 1918, with the following ranges:

  • 10.0.0.0 through 10.255.255.255 (Class A private IP addresses)

  • 172.16.0.0 through 172.31.255.255 (Class B private IP addresses)

  • 192.168.0.0 through 192.168.255.255 (Class C private IP addresses)

True or false? If you see a computer with an IP address of 169.254.6.3, you know that it was unable to get an IP address from a DHCP server.

Answer: True. An address starting with 169.254 is an APIPA address, and Dynamic Host Configuration Protocol (DHCP) clients can assign themselves an APIPA address if a DHCP server isn’t available.

In many networks, administrators configure a DHCP server to provide clients with an IP address and other TCP/IP configuration information such as a subnet mask, a default gateway, and the address of a DNS server. If the DHCP server doesn’t respond to the request for this information, the DHCP client assigns itself an APIPA address.

Static vs. dynamic

IP addresses can be statically assigned or dynamically assigned. A statically assigned address has been manually entered by a person, and a dynamically assigned address has been assigned through a service on the network or on the computer.

True or false? Statically assigned IP addresses often result in IP address conflicts.

Answer: True. When IP addresses are manually assigned, it’s easy to assign the same IP address to two or more systems on the network, resulting in an IP address conflict.

IP address conflicts adversely affect the network communication of at least one client on the network and sometimes both. If you statically assign an IP address to one Windows-based computer named Win7 on a network and then later assign the same IP address to another Windows-based computer, the second computer recognizes the conflict and won’t use the IP address. The Win7 computer continues to operate without problems, but the second computer can’t communicate on the network.

However, printers aren’t that smart. If you statically assign an IP address to a printer that was previously assigned to the Win7 computer, it adversely affects both the printer and the computer. Both will have network connectivity problems.

Client-side DNS

The primary purpose of a Domain Name System (DNS) server is to resolve computer and host names to IP addresses. DNS is used on the Internet and on internal networks.

True or false? DNS maps user-friendly names to network resources.

Answer: True. A DNS server stores computer names and their assigned IP address on a network.

Clients are configured with the IP address of a DNS server for name resolution purposes. Clients can query the DNS server by sending the user-friendly name of any host on the network (also called a host name), and the DNS server responds with the IP address. For example, when a user enters the user-friendly name of www.bing.com in the URL for a web browser, the user’s computer queries DNS for the IP address of www.bing.com without any additional user intervention. Users don’t need to memorize IP addresses but instead need only to remember names.

DHCP

Dynamic Host Configuration Protocol (DHCP) is a protocol that often runs on a DHCP server in a network. In small networks, routers often include DHCP, eliminating the need for a server to run DHCP.

True or false? DHCP assigns IP addresses to hosts on a network.

Answer: True. DHCP dynamically assigns IP addresses and other TCP/IP configuration to hosts within a network.

DHCP can assign much more than just the IP address, but assigning the IP address is a primary purpose. Other information commonly assigned by DHCP includes the following:

  • Subnet mask

  • Default gateway

  • DNS server address

Subnet mask

IPv4 addresses are matched with a subnet mask. For example, a Class C address of 192.168.1.5 has a subnet mask of 255.255.255.0. You don’t always see the subnet mask, but it is being used.

True or false? The subnet mask defines what portion of an IP address is the network ID and what portion is the host ID.

Answer: True. IP addresses have two parts (the network ID and the host ID), and the subnet mask is used to differentiate the two.

Both IP addresses and subnet masks are composed of 32 bits. They are typically presented as four decimal numbers divided by dots (also known as dotted decimal notation), but they can also be represented in binary. For example, consider the IP address of 192.168.1.5 with a subnet mask of 255.255.255.0. Both can be represented in binary as follows:

  • 192.168.1.5 = 1100 0000.1010 1000.0000 0001.0000 0101
  • 255.255.255.0 = 1111 1111.1111 1111.1111 1111.0000 0000

The subnet mask is used to determine which portion of the IP address is the network ID. When the subnet mask is a 1, that portion of the IP address is the network ID. In the following example, notice that the 1s in the subnet mask match up to only the first 24 bits in the IP address:

  • 192.168.1.5 = 1100 0000.1010 1000.0000 0001.---- ----
  • 255.255.255.0 = 1111 1111.1111 1111.1111 1111.0000 0000

If you convert these bits back to decimal, you have 192.168.1. However, you always add trailing zeros for the network ID, so the network ID is 192.168.1.0.

The host ID is whatever is left over. Because the first three decimal numbers are used for the network ID, the last number (5) is the host ID.

  • 192.168.1.5 = ---- ----.---- ----.---- ----.0000 0101
  • 255.255.255.0 = 1111 1111.1111 1111.1111 1111.0000 0000

Gateway

The gateway (or default gateway) is an IP address on a router, and it provides a path out of the network. A router will have more than one network interface, and each is assigned an IP address.

True or false? If a client is assigned an incorrect default gateway address, it will not be able to communicate with any systems on the network.

Answer: False. The gateway provides a path to other networks through a router, but even if it is configured incorrectly, clients on the network will still be able to communicate with clients on the same subnet.

Figure 2-1 shows a diagram of a network with a router. All clients in Network 1 use a network ID of 192.168.1.0 and a default gateway of 192.168.1.1 (label 1). If clients in Network 1 need to communicate with clients in Network 2 or the Internet, they send the traffic to the default gateway and the router sends the traffic to the correct path.

Figure 2-1

Figure 2-1 Router with two default gateways.

If the default gateway for any client on Network 1 is incorrect, this client will not be able to reach Network 2 or the Internet. However, it will still be able to communicate with other clients on Network 1.

In the diagram, you can see that the default gateway for Network 2 is 192.168.7.1 (label 2). All clients in Network 2 are assigned this address. Label 3 shows the interface card going to the Internet.

Can you answer these questions?

You can find the answers to these questions at the end of this chapter.

  1. What class is this IP address: 192.168.15.7?

  2. What type of address is this: FC00::42A:0:0:7F5?

  3. What type of address is this: 169.254.63.87?

  4. What is the primary purpose of DNS?

  5. What is the primary purpose of DHCP?