Every computer on TCP/IP network (i.e. connect to Internet or LAN) depends on IP routing table to make routing decisions. Routing table, otherwise also known as Routing Information Base (RIB), is an electronic table (file) or database type object that is stored in a router or a networked computer to store the routes, and in some cases, metrics associated with those routes to particular network destinations, i.e. IP address.

Routing table is important for troubleshooting or identifying network problem, when all other components such as network cable, LAN connectivity, Ethernet (or FastEthernet or GigabitEthernet) port appear to have no error or issue. In rare cases, the routing table may point to incorrect interface to route, or has other routing problems, especially in the case of system with two or multiple NIC cards or network adapters.

To view, show or display the routing table in Windows or Linux (works on most Linux and Unix such as Ubuntu, RedHat, CentOS, etc.) operating system, use the following commands. In Windows, open a command prompt to issue the command:

netstat -rn

Alternatively, just type the following command in Linux:


Or, the following command in Windows XP, Windows Vista, Windows Server 2003, Windows Server 2008 and etc:

route print

In Windows Server based operating system, administrator can also view the content of routing table by using Routing And Remote Access GUI management console, accessible from Administrative Tools of Control Panel. After Configure and Enable Routing and Remote Access for LAN routing (under custom configuration), administrator can expand the node to view the routing table, and then expand IP Routing on the console tree. Then, right click on Static Routes and select Show IP Routing Table from the context menu. The entries in the routing table are displayed in the right pane of the Routing And Remote Access console.

The output or the routing table looks something similar with table below:

IPv4 Route Table
Active Routes:
Network Destination        Netmask          Gateway       Interface  Metric
     25         On-link    306         On-link    306         On-link    306         On-link    281         On-link    281         On-link    281         On-link    306         On-link    281         On-link    306         On-link    281
Kernel IP routing table
Destination     Gateway         Genmask         Flags   MSS Window  irtt Iface UH        0 0          0 eth1 U         0 0          0 eth0   U         0 0          0 eth1       UG        0 0          0 eth0         UG        0 0          0 eth1

Brief explanation and description of the columns in the routing table

Network destination or Destination: The destination host, subnet address, network address, or default route. The destination for a default route is

Netmask or Genmask: The subnet mask that is applied to the destination IP address when matching it to the value in the network destination. Used in conjunction with the destination to determine when a route is used.

Gateway: The IP address that the local host uses to forward IP datagrams to other IP networks. This is either the IP address of a local network adapter or the IP address of an IP router (such as a default gateway router) on the local network segment.

Interface or iFace: The interface indicates the LAN or demand-dial interface (i.e. its IP address that is configured on the local computer for the local network adapter) that is to be used to reach the next router when an IP datagram is forwarded on the network.

Metric: Indicates the cost of using a route, which is typically the number of hops or the number of routers to cross to reach to the IP destination, Anything on the local subnet is one hop, and each router crossed after that is an additional hop. If there are multiple routes to the same destination with different metrics, the route with the lowest metric is the best route selected.

Protocol: Shows how the route was learned. If the Protocol column lists RIP, OSPF, or anything other than Local, then the router is receiving routes. Open Shortest Path First (OSPF) is not available on Windows XP 64-bit Edition (Itanium) and the 64-bit versions of the Windows Server 2003 family.

Flags: Describes the route with the following definitions – G (The route uses a gateway); U (The interface to be used is up); H (Only a single host can be reached through the route. For example, this is the case for the loopback entry; D (The route is dynamically created. It is set if the table entry has been generated by a routing daemon like gated or by an ICMP redirect message); M (The route is set if the table entry was modified by an ICMP redirect message) and ! (The route is a reject route and datagrams will be dropped).

MSS: Acronym for Maximum Segment Size, and is the size of the largest datagram the kernel will construct TCP connection for transmission via this route.

Window: Indicates the maximum amount of data the system will accept in a single burst from a remote host when establishing TCP connections.

irtt: Acronym for “initial round trip time” – indicates the value of time that the TCP protocol will use to wait for acknowledgment for a datagram to remote end has delivered been received when a connection is first established. The protocol is used to ensure reliability as hosts will retransmit a datagram if it has been lost (no ack received).

Related Posts