Upon completion of this chapter, you will be able to answer the following questions:
• How do network devices use routing tables to direct packets to a destination network?
• What is the function of fields in the routing table of a router?
This chapter uses the following key terms. You can find the definitions in the Glossary.
loopback interface
default gateway
directly-connected networks
remote networks
default route
static route
dynamic routing protocol
Introduction (32.0)
Halimah is getting a good picture of the network at headquarters and at the other branches. She understands better how these networks are, in fact, just one connected network.
The network layer is where end-to-end connectivity occurs. Connectivity is what lets you send an email to a friend, access a website, stream a podcast, and retrieve a document from a central location. Like so much about networking, protocols and services are involved.
Are you intrigued? I know I am!
Hosts need to communicate with hosts that might be on networks other than the local network. This topic examines how communication from hosts is able to reach hosts on remote networks
Host Forwarding Decision (32.1.1)
With both IPv4 and IPv6, packets are always created at the source host. The source host must be able to direct the packet to the destination host. To do this, host end devices create their own routing table. This topic discusses how end devices use routing tables.
Another role of the network layer is to direct packets between hosts. A host can send a packet to the following:
• Itself — A host can ping itself by sending a packet to a special IPv4 address of 127.0.0.1 or an IPv6 address ::/1, which is referred to as the loopback interface. Pinging the loopback interface tests the TCP/IP protocol stack on the host.
• Local host — This is a destination host that is on the same local network as the sending host. The source and destination hosts share the same network address.
• Remote host — This is a destination host on a remote network. The source and destination hosts do not share the same network address.
Figure 32-1 illustrates PC1 connecting to a local host on the same network, and to a remote host located on another network.
Figure 32-1 Hosts Can Connect to Local and Remote Networks
Whether a packet is destined for a local host or a remote host is determined by the source end device. The source end device determines whether the destination IP address is on the same network that the source device itself is on. The method of determination varies by IP version:
• In IPv4 — The source device uses its own subnet mask along with its own IPv4 address and the destination IPv4 address to make this determination.
• In IPv6 — The local router advertises the local network address (prefix) to all devices on the network.
In a home or business network, you may have several wired and wireless devices interconnected together using an intermediary device, such as a LAN switch or a wireless access point (WAP). This intermediary device provides interconnections between local hosts on the local network. Local hosts can reach each other and share information without the need for any additional devices. If a host is sending a packet to a device that is configured with the same IP network as the host device, the packet is simply forwarded out of the host interface, through the intermediary device, and to the destination device directly.
Of course, in most situations we want our devices to be able to connect beyond the local network segment, such as out to other homes, businesses, and the internet. Devices that are beyond the local network segment are known as remote hosts. When a source device sends a packet to a remote destination device, then the help of routers and routing is needed. Routing is the process of identifying the best path to a destination. The router connected to the local network segment is referred to as the default gateway.