How to get the routing table of your network with Windows and Linux.

Showing the routing table in Linux is very useful when you are required to get information about a network.

This is the output when retrieving the routing table in Windows 7.

C:\Users\jason>route PRINT
===========================================================================
Interface List
 16...00 ff f0 18 9a f5 ......TAP-Windows Adapter V9
 13...00 13 46 3a 02 83 ......Realtek RTL8139/810x Family Fast Ethernet NIC #2
 12...6c f0 49 b5 e6 2a ......Realtek RTL8168D/8111D Family PCI-E Gigabit Ethernet NIC (NDIS 6.20)
 10...f8 1a 67 10 b1 63 ......Realtek RTL8139/810x Family Fast Ethernet NIC
 18...00 50 56 c0 00 01 ......VMware Virtual Ethernet Adapter for VMnet1
 20...00 50 56 c0 00 08 ......VMware Virtual Ethernet Adapter for VMnet8
  1...........................Software Loopback Interface 1
 11...00 00 00 00 00 00 00 e0 Microsoft ISATAP Adapter
 24...00 00 00 00 00 00 00 e0 Microsoft Direct Point-to-point Adapater
 14...00 00 00 00 00 00 00 e0 Microsoft ISATAP Adapter #2
 15...00 00 00 00 00 00 00 e0 Microsoft ISATAP Adapter #3
 17...00 00 00 00 00 00 00 e0 Microsoft ISATAP Adapter #4
 19...00 00 00 00 00 00 00 e0 Microsoft ISATAP Adapter #5
 23...00 00 00 00 00 00 00 e0 Microsoft ISATAP Adapter #7
===========================================================================
 
IPv4 Route Table
===========================================================================
Active Routes:
Network Destination        Netmask          Gateway       Interface  Metric
          0.0.0.0          0.0.0.0    192.168.100.1    192.168.100.2     20
        127.0.0.0        255.0.0.0         On-link         127.0.0.1    306
        127.0.0.1  255.255.255.255         On-link         127.0.0.1    306
  127.255.255.255  255.255.255.255         On-link         127.0.0.1    306
     192.168.17.0    255.255.255.0         On-link      192.168.17.1    276
     192.168.17.1  255.255.255.255         On-link      192.168.17.1    276
   192.168.17.255  255.255.255.255         On-link      192.168.17.1    276
    192.168.100.0    255.255.255.0         On-link     192.168.100.2    276
    192.168.100.2  255.255.255.255         On-link     192.168.100.2    276
  192.168.100.255  255.255.255.255         On-link     192.168.100.2    276
    192.168.248.0    255.255.255.0         On-link     192.168.248.1    276
    192.168.248.1  255.255.255.255         On-link     192.168.248.1    276
  192.168.248.255  255.255.255.255         On-link     192.168.248.1    276
        224.0.0.0        240.0.0.0         On-link         127.0.0.1    306
        224.0.0.0        240.0.0.0         On-link     192.168.100.2    276
        224.0.0.0        240.0.0.0         On-link      192.168.17.1    276
        224.0.0.0        240.0.0.0         On-link     192.168.248.1    276
  255.255.255.255  255.255.255.255         On-link         127.0.0.1    306
  255.255.255.255  255.255.255.255         On-link     192.168.100.2    276
  255.255.255.255  255.255.255.255         On-link      192.168.17.1    276
  255.255.255.255  255.255.255.255         On-link     192.168.248.1    276
===========================================================================
Persistent Routes:
  None
 
IPv6 Route Table
===========================================================================
Active Routes:
 If Metric Network Destination      Gateway
  1    306 ::1/128                  On-link
 10    276 fe80::/64                On-link
 18    276 fe80::/64                On-link
 20    276 fe80::/64                On-link
 20    276 fe80::35c9:fab0:c58:9537/128
                                    On-link
 18    276 fe80::7d9a:395:2c12:eec5/128
                                    On-link
 10    276 fe80::ac72:159e:fd1e:d216/128
                                    On-link
  1    306 ff00::/8                 On-link
 10    276 ff00::/8                 On-link
 18    276 ff00::/8                 On-link
 20    276 ff00::/8                 On-link
===========================================================================
Persistent Routes:
 If Metric Network Destination      Gateway
  0 4294967295 ::/0                     2001:470:1f06:1b5::1
===========================================================================

And this is how it is done in Linux.

[email protected]:~$ route -e -v
Kernel IP routing table
Destination     Gateway         Genmask         Flags   MSS Window  irtt Iface
default         192.168.100.1   0.0.0.0         UG        0 0          0 eth2
10.8.0.0        10.8.0.2        255.255.255.0   UG        0 0          0 tun1194
10.8.0.2        *               255.255.255.255 UH        0 0          0 tun1194
link-local      *               255.255.0.0     U         0 0          0 eth2
192.168.100.0   *               255.255.255.0   U         0 0          0 eth2

Linux shows a lot less information than Windows, but it is still pertinent information. This shows the gateway IP address of my router and the network mask. As well as the IP address of my VPN configuration.

No comments have been made. Use this form to start the conversation :)

Leave a Reply