Day 23. IP Addressing

CompTIA A+ 220-901 Exam Topics

Image Objective 2.3: Explain the properties and characteristics of TCP/IP.

Key Topics

Today we cover the Transmission Control Protocol and Internet Protocol (TCP/IP) version IPv4. We also will be covering the rules and configuration that must be followed to use it. Then, we will talk about the subnet mask and how using it differs from using Classless Inter-domain Routing (CIDR). Finally, we will cover IPv6.

IP Version 4

Every computer or device on a network that intends to access the Internet or is using TCP/IP as the communication protocol needs a unique IP address. An IP address consists of four numbers, each separated by a single dot (.). Each number is 8 bits, or an octet. The four of them collectively make up a 32-bit number written in what is called dotted-decimal notation. Each number can range from 0 to 255. For example, 192.168.1.152 is a valid IP address.

Notation Example: xxx.xxx.xxx.xxx

IP Address Example: 0-255.0-255.0-255.0-255

One of the reasons TCP/IP is used so prevalently is its capability to identify both the network and the host. Because an IP address does not always show which portion is the network and which is the host, a subnet mask is used to determine each. We cover subnet masks later. Every computer on a single LAN must have the same network address, and it also must have a unique host address. If two computers have the same host address, both will indicate an error message.

IPv4 uses 32-bit (4-byte) binary addresses, which limits the total number of possible IP addresses (or hosts) to 4,294,967,296. There are five classes of IP addresses: A–E. Classes A–C are used in networks, and Class D and E are reserved for multicast and research. Each class of addresses uses more of the address to determine the network portion and less to determine the host. Class A, for example, uses only the first 8 bits, or the first octet, for the network and the last three octets for the hosts. This gives a Class A network only 126 possible networks and 16,777,214 hosts. Table 23-1 provides a list of each address range and the possible number of networks and hosts.

Image

Table 23-1 TCP/IP Address Ranges

To configure the IP address in Windows, go to the Control Panel and then the Network and Sharing Center; then select the link to the Local Area Connection. (In Vista, select the Manage My Network Connections link.) Under Properties, select IPv4 and then select its Properties option. The General tab contains both a method to set a static IP address and a method to obtain an IP address automatically using DHCP. See Figure 23-1 for an example of the Windows IPv4 configuration applet.

Image

Figure 23-1 IPv4 Windows Configuration

The Default Subnet Mask

Subnet masks are made up of only 1s and 0s if you look at it in binary format. A subnet mask uses the 1 bits to mark the network address and the 0 bits to determine the host portion of the address. When the subnet mask is used to determine which portion of the IP address belongs to the network, it sees the 255 decimal number, which is a binary format of eight (1)s. Anything that is a 0 is assumed to be the host portion of the IP address. Each class of addresses has been given a default subnet mask, as shown in Table 23-2.

Image

Table 23-2 Default Subnet Masks

Another way to determine to which class an address belongs is to look at the first octet. The range column in Table 23-3 provides a breakdown for each class. For example, any address that starts with a 193.xxx.xxx.xxx will be a Class C address. Any address that starts with a 104 will be a Class A address and so on.

Image

Table 23-3 IP Class Ranges and Usage

Special Addresses

Two sets of addresses are reserved for special purposes. The first is for testing the IP stack by looping the address back to itself. The second one is an Automatic Private IP Addressing (APIPA) address, which is used when a DHCP address, received from a DHCP server, is not available. The computer is configured to automatically assign an address within the 169.254 range. Although it allows local networking traffic, APIPA will not provide Internet or intranet traffic. See Table 23-4 for these special addresses, their purposes, and their ranges.

Image

Table 23-4 Special IP Address Ranges

Private Addresses

To deal with the lack of IPv4 addresses, the ranges listed in Table 23-5 have been set aside for private use. These addresses are not used on the Internet, but are meant to remain behind firewalls for private use. Any address that does not fall within these ranges would be considered a public address.

Image

Table 23-5 Private IP Addresses

Image Activity 23-1: Match the IPv4 Address to Its Description

Refer to the Digital Study Guide to complete this activity.

Addressing Guidelines

When configuring IP addresses in a network, remember the following rules to avoid making mistakes when addressing a host. Figure 23-2 provides an example of how a simple network might be configured.

Image

Figure 23-2 Host Addressing Guidelines Example

Host addressing guidelines:

Image The host portion identifies the device connecting to the network, and it must be unique to the network.

Image No address can be set to all 1s because this is a broadcast address (255).

Image No address can be set to 0 because this is reserved to identify the IP network ID.

When applying IP addresses in a network, remember the following rules about addressing in order to prevent making mistakes when addressing multiple networks. Figure 23-3 provides an example of three networks connecting back to a single network. Note how each WAN connection has its own unique network address and each LAN has its own unique network address.

Image

Figure 23-3 Network Addressing Guidelines Example

Network addressing guidelines:

Image The network ID must be unique to the internetwork. All networks that connect to each other must be unique.

Image If an address is accessing the Internet, it must be unique from every other address. (In other words, it must be a public address controlled by IANA.)

Windows addressing guidelines:

Image Addressing a host can be done automatically through DHCP, which is called dynamic addressing. It also can be manually configured, which is called static addressing.

To prepare a computer for addressing, start by going to the Network and Sharing Center, then go to Properties, and select IPv4. Finally, look at the properties of the IPv4 selection. To access the local network, the IP address, and a subnet mask are the only items that need to be configured. If accessing the Internet, several pieces of information are needed besides the IP address: the subnet mask, a gateway address, and at least one DNS server address.

The Gateway Address

A gateway address is usually the IP address of the Ethernet port on a router that is connected to the Internet or other networks. The network portion of the IP address on that port should match the same network as the computers that connect to it. The network portion of the IP address on all other ports on the router should be unique.

A router is used to connect one network with another network. Its job is to read the IP network address and determine whether traffic is meant to stay on the local network or needs to be forwarded to a port on the router so it can be sent to another port and out to another network. It uses tables to keep track of routes and network addresses.

Routers have a unique network address on each port. One port is usually an RJ-45 connection and faces the local network, while the other side can be a serial port that connects to the telecommunications company. The RJ-45 port on the router is usually considered the default gateway for computers on the inside network. Figure 23-4 provides an example of a router with both an Ethernet port and a serial port.

Image

Figure 23-4 Router with Gateway Address

Client-side DHCP

DHCP is used to create a pool of IP addresses that are temporarily assigned to machines. It is usually the default configuration. When a Windows machine is set to obtain an IP address automatically, it is being told to find and use an IP address from the DHCP server’s pool of addresses. A router also can be configured to hand out DHCP addresses.

If a computer cannot obtain an IP address from a DHCP server, it will use an APIPA address. Although it can access the local network with this address, it cannot get to the Internet.

Client-side DNS

DNS provides translation between hostnames and IP addresses. Many times an ISP will host the DNS servers and provide the DNS address information. An ISP might provide two addresses in case one goes down. There is room in the configuration in Windows for more than one. Reference Figure 23-1 for the location of the DNS server configuration settings.

Classless Inter-domain Routing

Classless Inter-domain Routing (CIDR) is a way to break down an IP address to make address allocation more efficient. In other words, it reduces wasted address space by adding a subnetwork between the network and the host portion of the address. Because we use the subnet mask to determine the network portion of the IP address, when we change the rules, it is the mask that must be used to create the new subnet. We do this by changing the entire subnet mask to 255.255.255.255 and then borrowing portions of the host side to create a new subnet portion of the address.

In CIDR, the idea is that any network address can use any subnet mask. For example, instead of a 10.0.0.1 address using a subnet mask of 255.0.0.0, which makes the 10 the network portion of the address and the 0.0.1 the host, using a Class C subnet mask of 255.255.255.0 changes the network and host separation. It means the 10.0.0 is the network and just the .1 is the host.

CIDR is written as a /nn with the number of bits borrowed from the host side of the address as the nn. For example, 192.168.1.1/24 refers to the fact that this is a Class C address and the first 24 bits represent the network (the 255.255.255 portion).

This isn’t the best example because a 192.168.1.1 with a subnet mask of 255.255.255.0 is still a classful address. So, let’s change our example to a Class A address of 10.10.1.1/16. Now we have a Class A address using a 16-bit subnet mask. Remember that each octet contains 8 bits, so 16 bits means we will be using only two sets of 255s. We have a Class B subnet mask of 255.255.0.0. Our Class A network address is now being treated as though it were a Class B address. Therefore, the new network portion of this address is 10.10 and the new host portion of the address would be 1.1.

IP Version 6

IPv6 was developed by the Internet Engineering Task Force (IETF) as the next generation of IP addressing and was designed to solve problems created by IPv4. With IPv4, we were running out of addresses because it is only 32 bits long and offers just millions of addresses. IPv6 is 128 bits with 79 trillion, trillion possible addresses.

The addressing format for IPv6 uses eight sets of 16-bit hexadecimal numbers separated by a colon (:). Because it is a hexadecimal number, letters A–F are used within the address. They are not case sensitive. Here’s an IPv6 IP address example:

2001:0db8:0000:5784:8af3:0000:0548:6354

A full IPv6 address comes in three parts: the global routing prefix, a subnet, and then the interface ID. For the address shown previously, the 2001:0db8:0000 is the global portion, 5784 is the subnet, and the rest is for the individual interface ID.

An IPv6 address can be written using an abbreviated method in the following way:

Image Leading zeroes can be omitted (this includes a set of four 0s being truncated to a single 0).

Image Consecutive zeros in a contiguous block can be represented by a double colon once in a single address.

For example:

2001:0db8:0000:0000::8af3:0000:0000:004b

Can be written as

2001:db8::8af3:0:0:4b

Types of IPv6 Traffic

Unicast addresses are local to the device. Operating systems such as Windows will automatically configure a unicast address when IPv6 is installed. Look for the start of the address to begin with FE. The full range is FE80::/10, and it encompasses all the link-local addresses for IPv6. A link-local address is a network address that communicates only with the local network. Routers do not forward them across networks.

Unicast addressing refers to the method of sending messages between a single sender and a single receiver over a network. It must be unique on a network segment. To communicate, a Unicast message is sent to the nearest host closest to the sender. In other words, it works by sending packets to the nearest device in a group of previously configured receivers instead of a one-to-one, a one-to-many, or a one-to-all.

Anycast addresses are a type of addressing method that can be assigned to more than one device. Multiple hosts can be assigned the same Anycast address. This is unique to IPv6.

Multicast refers to the method of sending messages from one or more senders to a group of other specific receivers. All hosts must join the multicast group before receiving traffic.

IPv6 multicast addresses have an 8-bit prefix of FF00 with the second octet defining the lifetime and scope of the address. IPv6 has the capability to autoconfigure itself without the need for a DHCP server. With that being said, multicast addresses can be used for devices to acquire an IP addresses from a DHCPv6 server.

Use Table 23-6 to help memorize the IPv6 address types.

Image

Table 23-6 IPv6 Address Types and Descriptions

Broadcast refers to the method of sending messages between a single sender and multiple receivers over an entire network segment. In IPv6, broadcasts are no longer used because they use so much bandwidth and are unnecessary.

Loopback addresses in IPv4 are represented by 127.0.0.1. In IPv6, the loopback address is 0:0:0:0:0:0:0:1. It can be written as ::1. A loopback address is used to test the local connection and cannot be assigned to a device or used to transmit data.

Types of IPv6 Unicast Addresses

IPv6 has three types of Unicast addressing schemes:

Image Link-Local addresses—Automatically assigned as soon as IPv6 is enabled, these are confined to a single link. They are identified by the first 10 bits (FE80::/10) and are not routable. Similar to a private IPv4 address.

Image Unique-Local addresses—Globally unique, but are used for local communication and always start with FD (FDE4:8db0:92e1::be).

Image Global Unicast addresses—Globally unique, which means they can be routed across the entire Internet. They are similar to an IPv4 public address. The prefix for a Global Unicast address is currently 2000::/3.

Image Activity 23-2: Match the IPv6 Address to Its Description

Refer to the Digital Study Guide to complete this activity.

Study Resources

For today’s exam topics, refer to the following resources for more study.

Image

Image Check Your Understanding

Refer to the Digital Study Guide to take a quiz covering the content of this day.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset