The Routing Table (7.2)–Cisco Routing Between Networks Layer

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 (7.2.1)

Refer to the online course to view this video.

Path Selection (7.2.2)

How does the router determine which interface to use to send the message on a path to get to the destination network? Each port, or interface, on a router connects to a different local network. Every router contains a table of all locally connected networks and the interfaces that connect to them. These routing tables can also contain information about the routes, or paths, that the router uses to reach other remote networks that are not locally attached.

When a router receives a frame, it de-encapsulates the frame to get to the packet containing the destination IP address. It matches the network portion of the destination IP address to the networks that are listed in the routing table. If the destination network address is in the table, the router encapsulates the packet into a new frame to send it out. (Note that it also inserts a new destination MAC address and recalculates the FCS field in the new frame.) It forwards the new frame out of the interface associated with the path to the destination network, as shown in Figure 7-6. The process of forwarding the packets toward their destination network is called routing.

   

Figure 7-6 A Router Selecting the Path to the Destination

Router interfaces do not forward messages that are addressed to the local network broadcast IP address. As a result, local network broadcasts are not sent across routers to other local networks.

Video—Messages Within and Between Networks—Part 1 (7.2.3)

Refer to the online course to view this video.

Video—Messages Within and Between Networks—Part 2 (7.2.4)

Refer to the online course to view this video.

Packet Forwarding (7.2.5)

A router forwards a packet to one of two places: a directly connected network containing the destination host or to another router on the path to reach the destination host. When a router encapsulates the frame to forward it out an Ethernet interface, it must include a destination MAC address. This is the MAC address of the destination host, if the destination host is part of a network that is locally connected to the router. Figure 7-7 shows a host sending a packet to a host on the same network.

   

Figure 7-7 Destination Host Is on the Same Local Network

If the router must forward the packet to another router through an Ethernet interface, it uses the MAC address of the connected router. Routers obtain these MAC addresses from ARP tables.

Each router interface is part of the local network to which it is attached and maintains its own ARP table for that network, as shown in Figure 7-8. The ARP tables contain the MAC addresses and IPv4 addresses of all the individual hosts on that network.

   

Figure 7-8 Destination Host Is on a Remote Network   

Video—Messages Sent to Remote Networks (7.2.6)

Refer to the online course to view this video.