McAfee Secure

Predict the data flow between two hosts across a network

Exam: Cisco 200-120 - Interconnecting Cisco Networking Devices: Accelerated (CCNAX)

It is the responsibility of a router to determine the best path across a network to send packets from the source device to the destination device on a different network. The basic information that routers need to route a packet is: destination address, the best route to each remote network, possible routes to all remote networks, neighbor routers that can inform about other networks, and a way to maintain and verify information.

The routers use routing tables to determine the best path to the destination device. The routing table is a map of internetwork that describes how to find a remote network. A network directly connected to a router can be easily used by the router to send information. However, if a network is not connected to a router directly then router uses neighboring routers to get information about remote networks.

The routing tables can be created through static routing or dynamic routing.

In static routing, the network administrator types information about all the remote networks in the routing table manually. Each time the network information changes for a network, the network administrator must update the routing table to ensure that the router gets the correct information.

In dynamic routing, the routers access neighboring routers and update each other’s routing table’s information using a common protocol. This way all the routers on a network update their routing tables with all the remote networks. Whenever a change occurs, the routers dynamically update their routing tables and inform other routers about the change in the information with the use of dynamic routing protocols.

How do routers determine the best path to the destination

As soon as a packet is received by a router, the router compares the destination ip address of the packet with each entry in the routing table to find the best match. Once the best match is found by the router, the router picks up the interface to be used to forward the packet and then encapsulates the packet into the data link frame and forwards the packet to the destination network interface.

We know that routers operate on OSI network layers 1, 2, and 3. However, they are called Layer 3 device because they take their main packet forwarding decision based on the information available in Layer 3 IP packet. The routers encapsulate the layer 3 IP packets into the data portion of Layer 2 data link frame and forward them to the appropriate exit interface.

The encapsulation is required because the entry and exit types of the data link frames may be different. The frames may be received in one type and sent in other type. For example, a router may receive a data packet encapsulated in an Ethernet frame and may encapsulate it into PPP (Point-to-Point protocol) frame when it forwards it.

The encapsulation of packets get different in the Data link layer because the encapsulation depends on the interface type of the router and the interface type of the transportation medium it is sent on. The examples of different data link technologies connected by the router are: Ethernet, HDLC, ATM (Asynchronous Transfer Mode), WAN serial connections such as T1 connection using PPP, and Frame Relay.

The packet sent may be received by another router. The other router also repeats the same process of de-capsulation, examining the destination IP address of the IP packet, matching the IP address with its routing table and then forwards the packet to the exit interface after re-encapsulating it.

Some facts about router

The routers on a network may contain different routing information on their routing tables. The network administrator has to ensure that the information contained in the routing tables is correct. There are three processes that are used by the routers to create and maintain a routing table. These processes are:

  • Routing processes that run the routing protocols such asOSPF (Open Shortest Path First), EIRGP (Enhanced Interior Gateway Routing Protocol), BGP (Border Gateway Protocol (BGP), and IS-IS (Intermediate System-to-Intermediate System). The routing protocols configure routes in the routing table for the destination and assign administrative distances.
  • The accepting and replying process of routing table. The routing table accepts the information from the routing process and forwards the information to the forwarding process.
  • The forwarding process. The forwarding process accepts the information from the routing table and then makes a decision to forward the packet to its destination.

While building a routing table a router considers the administrative distance. The shortest administrative distance is given a preference while deciding a route.

If you type the command Show Ip route on a router then you can see the routes configured in the routing table somewhat similar to the route shown in the table given below:

router# show ip route

Codes: C - connected O - OSPF i - IS-IS

S - static UD - Up/Down bit 1 L1 - level-1

B - BGP E1 - external type 1 L2 - level-2

M - MPLS E2 - external type 2

* - candidate default

m - route's metric

d - administrative distance

C 55.55.55.0/24 directly connected to GBE 1/19/2

C 55.55.55.3/32 directly connected to Null 0

S 127.0.0.0/8 via 127.0.0.1

C 127.0.0.1/32 directly connected to Null 0


The C in the show IP route command means the directly connected networks. The command displays only the directly connected networks if the routing protocols such as RIP, EIGRP are not used by the router.

Example Question

Consider you have a network that connects many other remote networks. On using the show ip route command on a router, you could view only the directly connected networks. Which of the following would you choose to ensure that the command displays all the directly as well as indirectly connected networks?

  • Configure static routing on the router.
  • Configure dynamic routing on the network.
  • Install routing protocols such as RIP and EIGRP on the router.
  • Do nothing because the command can only display directly connected network.

Correct Answer: C

The C in the show IP route command means the directly connected networks. The command displays only the directly connected networks if the routing protocols such as RIP, EIGRP are not used by the router.