Verifying Your Routing Table

The third thing you might want to do, you might want to have a look at your routing table.

We saw that "netstat -r" would show us our routing table and if you didn't want name LOOKUP to appear on our routing table, we could use netstat -rn

riaan@debian:~> netstat -rn
Kernel IP routing table
Destination     Gateway         Genmask         Flags   MSS Window  irtt Iface
192.168.1.0     0.0.0.0         255.255.255.0   U         0 0          0 eth0
192.168.10.0    0.0.0.0         255.255.255.0   U         0 0          0 eth0
0.0.0.0         192.168.1.1     0.0.0.0         UG        0 0          0 eth0
riaan@debian:~>
            

Using the routing table set up we might want to correct a list of MAC addresses on our network, and for that we can use our "arp" command. This should show us whether we are going to see any devices on our network or not. Perhaps we can only see one device and that's our default gateway.

Use "arp -a" to list potential devices on the network as well as the MAC addresses of those devices.

We can also use a command called "traceroute" which has the ability to trace the route between point A and point B for us. So if we perform a traceroute on QEDux.co.za we are tracing from our source through to the destination.

Now sometimes what companies do is they block a traceroute and a way to get around this is to use traceroute using ICMP rather than UDP.

linux:~ # traceroute 196.14.187.146
traceroute to 196.14.187.146 (196.14.187.146), 30 hops max, 40 byte packets
 1  192.168.1.1  0.329 ms   0.296 ms   0.339 ms
 2  10.0.1.1  0.496 ms   0.414 ms   0.422 ms
 3  www.stt-global.com (196.14.187.146)  0.541 ms   0.460 ms   0.585 ms
linux:~ #
            

If traceroute is blocked by the firewall (which is often the case if ICMP is being blocked), then one may use UDP to perform a traceroute. In the above example, the traceroute reflects the IP address of the hosts, as well as the time to reach and return from that node. The operation is done 3 times for each hosts. This gives a good idea of where the problems lie in a network.