A routing table has information usually viewed in table format, decide where to send data packets. All IP-enabled devices including routers use routing tables to direct a packet to the destination.
The router gets route information from the routing table and selects the best path for the destination. Each packet has information about its source and destination. The router examines the packet and matches it to the routing table entry providing the best match for its destination and sends the packet to the next hop on its route across the network.
We can configure routes manually or dynamically. The static routes do not change unless a network administrator manually changes them but the dynamic routes automatically update and change by routing protocols. The routing protocols exchange information about the network topology and network changes and update the routing table. Dynamic routing protocols also allow devices to listen to the network and react to occurrences like device failures and network congestion. The routing table is data file store route information about directly connected and remote networks.
- Directly connected routes– When we configure and activate the interface, the router adds directly connected route against the interface.
- Remote routes– This is the route to remote networks to other routers. We can configure these routes statically or dynamically.
Routing Table Sources
We can check the routing information on a Cisco router using the show ip route command. The router also provides additional route information, including the source of the route with this command. Following are the different sources of the routing entries.
- Local Route interfaces– The router adds the route when we configure and activate router interface. This entry is available in all IOS for IPv6 and for IPv4 the option is available only in IOS 15 or newer versions.
- Directly connected interfaces– The directly connected routes added to the routing table when we activate and configured the interface.
- Static routes– The static route is added to the routing table when a route is manually configured and the exit interface is active.
- Dynamic routing protocol– The routing protocols that dynamically learn the network networks information and add the information to the routing table, such as RIP, EIGRP, and OSPF.
We can find the routing entry sources with a code. The code tells us the source of the route information. The figure below illustrates the codes of the route sources:
Some common codes are:
- C–This code for is for the directly connected network.
- S– We can find a static route with this code.
- D– This is the identification code for dynamically learned network from another router using EIGRP.
- O– This code Identify a dynamically learned network from another router using the OSPF.
- R– This code Identify a dynamically learned network from another router using the RIP.
Remote Network Routing Entries
To understand the content of an IPv4 and IPv6 routing table is most important. We have marked the route to destination network 172.16.200.0 in the above figure. The marked entry for 172.16.200.0 identifies the following information:
- Route source– This entry identifies how the router adds this route. In this example, the entry is “D” which means that the router learns this route from dynamic routing protocol RIP.
- Destination network– This is the entry for remote network Identification. In this example, the remote network is 172.16.200.0.
- Administrative distance– This is the trustworthiness of the route source. Lower values indicate more trustworthiness route to the destination network.
- Metric– The metric the cost to each available route so that the router select the most cost-effective path. The Lower values indicate preferred routes to the destination.
- Next-hop– This is the IPv4 address of the next connected router to send the packet.
- Route timestamp– This entry shows the timing since the route added.
- Outgoing interface–This entry Identifies the exit interface of the router to send a packet toward the destination.
Directly Connected Interfaces
A newly Installed router, without any configured and active interface, has an empty routing table, as shown in the figure below.
Before the interface state is up/up and adds it to the routing table, the interface must be assigned a valid IPv4 or IPv6 address. The interface must be in no shutdown state. It should also be in a position to receive the carrier signals from another device e.g. router, switch, host etc. When the interface is up, the network of that interface is added automatically to the routing table as directly connected network. For example, when we configured the interfaces of the Router5 with IPv4 addresses and issue the no shutdown command and it receives the carrier signals from the router and hosts. It updates the routing table from an empty routing table as shown in the figure below.
Directly Connected Routing Table Entries
The properly configured connected interface actually creates two routing table entries. The figure below displays the IPv4 routing table entries on Router5 for the directly connected network 192.168.11.0. The directly connected router interfaces routing entries contain the following information:
- Route source– This entry identifies the route source. Directly connected interfaces have two route source codes. “C” and “L”. The “C” is for directly connected network and “L” is for IPv4 address assigned to the router interface.
- Destination network– The address of the remote network.
- Outgoing interface–This is the router outgoing interface for the destination network.
Administrative distance is the router feature that selects the best path when there are more than one different routes to the same destination with different routing protocols and static routes. If the routing table has more than one route source for the same destination network. For example, if both Enhance Interior Routing Gateway Protocol (EIGRP); and […]
Routers preferably select routes with lower administrative distance when multiple paths available to the destination. When a router has two or more paths to a destination with equal cost metrics, then the router forwards the packets using all paths equally called equal cost load balancing. So, for balance the load multiple routes needed through a […]
The path choice for the packet is the basic function of the router. The router ever selects the best path for packet sending. For selecting the best path router searches its routing table information for a network address that matches the packet destination IP address. The router selects the best route with the following three […]
To send a packet over the routed network the IP address of destination network required. If the destination address belongs to the same network, and then the source does not use the default gateway. The host applies AND operation for determining the network address. I have already discussed the AND operation in my earlier article […]
The router is a device which received a packet from the source on any interface and forwards to their destination on another interface. This is a switching function of the router. The switching function encapsulates packets in the data link frame type for the outgoing data link. The router routing function selects the best path […]
CHAPTER 1 – NETWORK AND THEIR BUILDING BLOCKS Introduction to network Types of network Network component Internetworking Mode OSI Reference Model and TCP/IP Model Common protocol in networking Well-known port numbers Network devises – Hub, Switch, and Router Switch vs Hub Switch vs Router Transmission control protocol (TCP) Internet Protocol(IP) CHAPTER 2 – NETWORK PROTOCOL AND COMMUNICATION OSI and […]
There are numerous show commands using Cisco IOs to verify interface settings, operation, and configuration. The following three commands are very useful to identify an interface status especially when we are using the IPv4 address: Verify IPv4 Interface settings show ip interface brief – The show ip interface brief is one of the most frequently used commands in the Cisco devices. This command […]
The IPv4 loopback interface is logical interface configure internally in the router. In this lesson, we should discuss the IPv4 loopback interface configuration but at this stage, it is necessary to know the Pv4 interface configuration before the IPv4 loopback interface configuration. I have already discussed the IPv4 interface configuration in one of my previous […]