The process of delivering packets from a host on one network to a host on a separate remote network is known as IP routing. Routers are typically used for this task. Routers look at a packet’s destination IP address, find the next-hop address, and forward it. Routers use routing tables to figure out where the package should be sent next.

Consider the following IP routing scenario:

Host A desires communication with host B. However, host B is connected to a different network. All packets destined for external networks are routed through Host A to Router R1. Router R1 receives the packets, checks the destination IP address, and passes the packet to the destination network’s outgoing interface.

Default Gateway

A default gateway is a router that allows hosts to communicate with hosts on different networks. A default gateway is utilized when a host doesn’t have a route entry for a specific distant network and doesn’t know how to reach it. All packets bound for remote networks can be routed through the default gateway, a route to that network.

The following example delves more into the concept of a default gateway.

Default Gateway

The default gateway address on Host A is the IP address of the router R1. Host A is attempting to communicate with host B, which is located on a different network. Host A looks in its routing database to see if that target network has an entry. The host delivers all data to the router R1 if the entry is not detected. The packets are received by router R1 and forwarded to host B.

Routing Table

A routing table is maintained and stored in RAM by each router. Routers employ a routing table to figure out how to get to the destination network. The following entries make up each routing table:

  • Subnet mask and network destination – provides a range of IP addresses.
  • Remote router – the IP address of the router that was used to connect to that network.
  • Outgoing interface – this is the interface through which the packet should be sent to the destination network.

 

To populate a routing table, you can use one of three methods:

  • subnets that are immediately related
  • making use of static routing
  • making use of dynamic routing

The following chapters will go over each of these methods in detail.

Consider the following illustration. Host A desires communication with host B. However, host B is connected to a different network. All packets destined for remote networks are sent to the router by Host A. The router receives the packets and checks the routing table to determine if the destination address is listed. If it does, the packet is forwarded to the proper interface port by the router. If the router cannot locate the entry, the packet is discarded.

connected routes

The show ip route command in enabled mode can be used to display the router’s routing table.

Router#show ip route
Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP
       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
       E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP
       i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area
       * - candidate default, U - per-user static route, o - ODR
       P - periodic downloaded static route

Gateway of last resort is not set

     10.0.0.0/24 is subnetted, 1 subnets
C       10.0.0.0 is directly connected, FastEthernet0/1
C    192.168.0.0/24 is directly connected, FastEthernet0/0

This router has two directly connected routes to the subnets 10.0.0.0/8 and 192.168.0.0/24, as shown in the output above. A route marked with the letter C in the routing table is a directly connected route. When host A transmits a packet to host B, the router will seek the route to the 10.0.0.0/8 network where host B is located in its routing table. After that, the router will utilize that route to send packets from host A to host B.

Final Thoughts

SPOTO has over 18 years of experience specializing in Cisco Certification training and is committed to providing candidates with the most up-to-date knowledge. We provide 100% authentic CCNA, CCNP, and CCIE test dumps with genuine questions and answers for the written exam and CCIE lab training courses to assist you in earning your certification on your first attempt!

Last modified: 2021-07-28

Author

Comments

Write a Reply or Comment

Your email address will not be published.