Routing Table - Contents of Routing Tables

Contents of Routing Tables

The routing table consists of at least three information fields:

  1. the network id: i.e. the destination network id
  2. cost: i.e. the cost or metric of the path through which the packet is to be sent
  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. links to filtering criteria/access lists associated with the route
  3. interface: such as eth0 for the first Ethernet card, eth1 for the second Ethernet card, etc.

Routing tables are also a key aspect of certain security operations, such as unicast reverse path forwarding (uRPF). 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.

Network id Cost Next hop
........ ........ ........
........ ........ ........

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

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.255 255.255.255.255 192.168.0.100 192.168.0.100 10
  • The columns Network Destination and Netmask together describe the Network id as mentioned earlier. For example, destination 192.168.0.0 and netmask 255.255.255.0 can be written as network id 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).

Read more about this topic:  Routing Table

Famous quotes containing the words contents of, contents and/or tables:

    Conversation ... is like the table of contents of a dull book.... All the greatest subjects of human thought are proudly displayed in it. Listen to it for three minutes, and you ask yourself which is more striking, the emphasis of the speaker or his shocking ignorance.
    Stendhal [Marie Henri Beyle] (1783–1842)

    To be, contents his natural desire;
    He asks no Angel’s wing, no Seraph’s fire;
    But thinks, admitted to that equal sky,
    His faithful dog shall bear him company.
    Alexander Pope (1688–1744)

    O these encounterers, so glib of tongue,
    That give a coasting welcome ere it comes,
    And wide unclasp the tables of their thoughts
    To every ticklish reader! Set them down
    For sluttish spoils of opportunity
    And daughters of the game.
    William Shakespeare (1564–1616)