What information does the next hop entry in a routing table identify?

Routers:
A Router is a networking device that forwards data packets between computer network. This device is usually connected to two or more different networks. When a data packet comes to a router port, the router reads address information in packet to determine out which port the packet will be sent. For example, a router provides you with the internet access by connecting your LAN with the Internet.

When a packet arrives at a Router, it examines destination IP address of a received packet and make routing decisions accordingly. Routers use Routing Tables to determine out which interface the packet will be sent. A routing table lists all networks for which routes are known. Each router’s routing table is unique and stored in the RAM of the device.

Routing Table:
A routing table is a set of rules, often viewed in table format, that is used to determine where data packets traveling over an Internet Protocol (IP) network will be directed. All IP-enabled devices, including routers and switches, use routing tables. See below a Routing Table:

Destination Subnet mask Interface 128.75.43.0 255.255.255.0 Eth0 128.75.43.0 255.255.255.128 Eth1 192.12.17.5 255.255.255.255 Eth3 default Eth2

The entry corresponding to the default gateway configuration is a network destination of 0.0.0.0 with a network mask (netmask) of 0.0.0.0. The Subnet Mask of default route is always 255.255.255.255 .

Entries of an IP Routing Table:
A routing table contains the information necessary to forward a packet along the best path toward its destination. Each packet contains information about its origin and destination. Routing Table provides the device with instructions for sending the packet to the next hop on its route across the network.

Each entry in the routing table consists of the following entries:

  1. Network ID:
    The network ID or destination corresponding to the route.
  2. Subnet Mask:
    The mask that is used to match a destination IP address to the network ID.
  3. Next Hop:
    The IP address to which the packet is forwarded
  4. Outgoing Interface:
    Outgoing interface the packet should go out to reach the destination network.
  5. Metric:
    A common use of the metric is to indicate the minimum number of hops (routers crossed) to the network ID.

Routing table entries can be used to store the following types of routes:

  • Directly Attached Network IDs
  • Remote Network IDs
  • Host Routes
  • Default Route
  • Destination

When a router receives a packet, it examines the destination IP address, and looks up into its Routing Table to figure out which interface packet will be sent out.

How are Routing Tables populated?
There are ways to maintain Routing Table:

These Routing tables can be maintained manually or dynamically. In dynamic routing, devices build and maintain their routing tables automatically by using routing protocols to exchange information about the surrounding network topology. Dynamic routing tables allow devices to “listen” to the network and respond to occurrences like device failures and network congestion. Tables for static network devices do not change unless a network administrator manually changes them.

Route Determination Process (finding Subnet ID using Routing Table):
Consider a network is subnetted into 4 subnets as shown in the above picture. The IP Address of the 4 subnets are:

200.1.2.0 (Subnet a) 200.1.2.64 (Subnet b) 200.1.2.128 (Subnet c) 200.1.2.192 (Subnet d)

Then, Routing table maintained by the internal router looks like:

Destination Subnet Mask Interface
200.1.2.0 255.255.255.192 a
200.1.2.64 255.255.255.192 b
200.1.2.128 255.255.255.192 c
200.1.2.192 255.255.255.192 d
Default 0.0.0.0 e

To find its right subnet (subnet ID), router performs the bitwise ANDing of destination IP Address mentioned on the data packet and all the subnet masks one by one.

  • If there occurs only one match, router forwards the data packet on the corresponding interface.
  • If there occurs more than one match, router forwards the data packet on the interface corresponding to the longest subnet mask.
  • If there occurs no match, router forwards the data packet on the interface corresponding to the default entry.

Example-1: GATE-CS-2004 | Question 55

Example-2: GATE IT 2006 | Question 63

Note that the routing tables are not specific for Cisco devices. Even your Windows operating system has a routing table that can be displayed using the route print command

What information does the next hop entry in a routing table identify?

We use cookies on our website to give you the most relevant experience by remembering your preferences and repeat visits. By clicking “Accept All”, you consent to the use of ALL the cookies. However, you may visit "Cookie Settings" to provide a controlled consent.

Cookie SettingsAccept All

In computer networking, a routing table, or routing information base (RIB), is a data table stored in a router or a network host that lists the routes to particular network destinations, and in some cases, metrics (distances) associated with those routes. The routing table contains information about the topology of the network immediately around it.

The construction of routing tables is the primary goal of routing protocols. Static routes are entries made in a routing table by non-automatic means and which are fixed rather than being the result of routing protocols and associated network topology-discovery procedures.

A routing table is analogous to a distribution map in package delivery. Whenever a node needs to send data to another node on a network, it must first know where to send it. If the node cannot directly connect to the destination node, it has to send it via other nodes along a route to the destination node. Each node needs to keep track of which way to deliver various packages of data, and for this it uses a routing table. A routing table is a database that keeps track of paths, like a map, and uses these to determine which way to forward traffic. A routing table is a data file in RAM that is used to store route information about directly connected and remote networks. Nodes can also share the contents of their routing table with other nodes.

The primary function of a router is to forward a packet toward its destination network, which is the destination IP address of the packet. To do this, a router needs to search the routing information stored in its routing table. The routing table contains network/next hop associations. These associations tell a router that a particular destination can be optimally reached by sending the packet to a specific router that represents the next hop on the way to the final destination. The next hop association can also be the outgoing or exit interface to the final destination.

With hop-by-hop routing, each routing table lists, for all reachable destinations, the address of the next device along the path to that destination: the next hop. Assuming that the routing tables are consistent, the simple algorithm of relaying packets to their destination's next hop thus suffices to deliver data anywhere in a network. Hop-by-hop is the fundamental characteristic of the IP Internet layer[1] and the OSI Network Layer.

When a router interface is configured with an IP address and subnet mask, the interface becomes a host on that attached network. A directly connected network is a network that is directly attached to one of the router interfaces. The network address and subnet mask of the interface, along with the interface type and number, are entered into the routing table as a directly connected network.

A remote network is a network that can only be reached by sending the packet to another router. Routing table entries to remote networks may be either dynamic or static. Dynamic routes are routes to remote networks that were learned automatically by the router through a dynamic routing protocol. Static routes are routes that a network administrator manually configured.

Routing tables are also a key aspect of certain security operations, such as unicast reverse path forwarding (uRPF).[2] In this technique, which has several variants, the router also looks up, in the routing table, the source address of the packet. If there exists no route back to the source address, the packet is assumed to be malformed or involved in a network attack and is dropped.

The need to record routes to large numbers of devices using limited storage space represents a major challenge in routing table construction. In the Internet, the currently dominant address aggregation technology is a bitwise prefix matching scheme called Classless Inter-Domain Routing (CIDR). Supernetworks can also be used to help control routing table size.

The routing table consists of at least three information fields:

  1. network identifier: The destination subnet and netmask
  2. metric: The routing metric of the path through which the packet is to be sent. The route will go in the direction of the gateway with the lowest metric.
  3. next hop: The next hop, or gateway, is the address of the next station to which the packet is to be sent on the way to its final destination

Depending on the application and implementation, it can also contain additional values that refine path selection:

  1. quality of service associated with the route. For example, the U flag indicates that an IP route is up.
  2. filtering criteria: Access-control lists associated with the route
  3. interface: Such as eth0 for the first Ethernet card, eth1 for the second Ethernet card, etc.

Shown below is an example of what the table above could look like on a computer connected to the internet via a home router:

Example routing table contents
Network destination Netmask Gateway Interface Metric
0.0.0.0 0.0.0.0 192.168.0.1 192.168.0.100 10
127.0.0.0 255.0.0.0 127.0.0.1 127.0.0.1 1
192.168.0.0 255.255.255.0 192.168.0.100 192.168.0.100 10
192.168.0.100 255.255.255.255 127.0.0.1 127.0.0.1 10
192.168.0.1 255.255.255.255 192.168.0.100 192.168.0.100 10
  • The columns Network destination and Netmask together describe the Network identifier as mentioned earlier. For example, destination 192.168.0.0 and netmask 255.255.255.0 can be written as 192.168.0.0/24.
  • The Gateway column contains the same information as the Next hop, i.e. it points to the gateway through which the network can be reached.
  • The Interface indicates what locally available interface is responsible for reaching the gateway. In this example, gateway 192.168.0.1 (the internet router) can be reached through the local network card with address 192.168.0.100.
  • Finally, the Metric indicates the associated cost of using the indicated route. This is useful for determining the efficiency of a certain route from two points in a network. In this example, it is more efficient to communicate with the computer itself through the use of address 127.0.0.1 (called “localhost”) than it would be through 192.168.0.100 (the IP address of the local network card).

Routing tables are generally not used directly for packet forwarding in modern router architectures; instead, they are used to generate the information for a simpler forwarding table. This forwarding table contains only the routes which are chosen by the routing algorithm as preferred routes for packet forwarding. It is often in a compressed or pre-compiled format that is optimized for hardware storage and lookup.

This router architecture separates the control plane function of the routing table from the forwarding plane function of the forwarding table.[3] This separation of control and forwarding provides uninterrupted high-performance forwarding.

  • Luleå algorithm
  • Internet protocol suite

  1. ^ F. Baker (June 1995). Requirements for IPv4 Routers]. RFC 1812.
  2. ^ F. Baker & P. Savola (March 2004). Ingress Filtering for Multihomed Networks. doi:10.17487/RFC3704. RFC 3704.
  3. ^ Forwarding and Control Element Separation (ForCES) Framework, L. Yang et al., RFC3746,April 2004.

  • IP Routing from the Linux Network Administrators Guide

Retrieved from "https://en.wikipedia.org/w/index.php?title=Routing_table&oldid=1108126185"