A router is a Layer 3 intermediary device that performs the packet forwarding or routing. Routers have routing tables that contain the information the router needs to forward the packet.
Video – Router Packet Forwarding (14.2.1)
Refer to the online course to view this video.
Video – Messages Within and Between Networks – Part 1 (14.2.2)
Refer to the online course to view this video.
Video – Messages Within and Between Networks – Part 2 (14.2.3)
Refer to the online course to view this video.
Routing Table Entries (14.2.4)
Routers move information between local and remote networks. To do this, routers must use routing tables to store information. Routing tables are not concerned with the addresses of individual hosts. Routing tables contain the addresses of networks, and the best path to reach those networks. Entries can be made to the routing table in two ways: dynamically updated by information received from other routers in the network, or manually entered by a network administrator. Routers use the routing tables to determine which interface to use to forward a message to its intended destination. In Figure 14-2 and Table 14-1, the router has a routing table with two entries to directly connected networks: 10.0.0.0/8 and 172.16.0.0/16.
Figure 14-2 Example of a Router’s Directly Connected Networks
Table 14-1 Routing Table with Directly Connected Routes
• Type – The connection type. C stands for directly connected.
• Network – The network address.
• Port – The interface used to forward packets to the network.
If the router cannot determine where to forward a message, it will drop it. Network administrators configure a static default route that is placed into the routing table so that a packet will not be dropped due to the destination network not being in the routing table. A default route is the interface through which the router forwards a packet containing an unknown destination IP network address. This default route usually connects to another router that can forward the packet towards its final destination network.
The method that a host uses to send messages to a destination on a remote network differs from the way a host sends messages on the same local network. When a host needs to send a message to another host located on the same network, it will forward the message directly. A host will use ARP to discover the MAC address of the destination host. The IPv4 packet contains the destination IPv4 address and encapsulates the packet into a frame containing the MAC address of the destination and forwards it out.
When a host needs to send a message to a remote network, it must use the router. The host includes the IP address of the destination host within the packet just like before. However, when it encapsulates the packet into a frame, it uses the MAC address of the router as the destination for the frame. In this way, the router will receive and accept the frame based on the MAC address.
How does the source host determine the MAC address of the router? A host is given the IPv4 address of the router through the default gateway address configured in its TCP/IP settings. The default gateway address is the address of the router interface connected to the same local network as the source host. All hosts on the local network use the default gateway address to send messages to the router. When the host knows the default gateway IPv4 address, it can use ARP to determine the MAC address. The MAC address of the router is then placed in the frame, destined for another network.
It is important that the correct default gateway be configured on each host on the local network, as shown in Figure 14-3 and Table 14-2. If no default gateway is configured in the host TCP/IP settings, or if the wrong default gateway is specified, messages addressed to hosts on remote networks cannot be delivered.
Figure 14-3 A Router as the Default Gateway
Table 14-2 Addressing Table for Hosts including Default Gateway
Check Your Understanding – Select the Default Gateway (14.2.6)
Refer to the online course to complete this activity.
Check Your Understanding – The Routing Table (14.2.7)
Refer to the online course to complete this activity.