One utility that can be used to find the contents of a routing table for a host or router is netstat in UNIX or LINUX. The following shows the list of the contents of a default server. We have used two options, r and n. The option r indicates that we are interested in the routing table, and the option n indicates that we are looking for numeric addresses. Note that this is a routing table for a host, not a router. Although we discussed the routing table for a router throughout the chapter, a host also needs a routing table.
Kernel IP routing table
Note also that the order of columns is different from what we showed. The destination column here defines the network address. The term gateway used by UNIX is synonymous with router. This column acmally defines the address of the next hop. The value 0.0.0.0 shows that the delivery is direct. The last entry has a flag of G, which means that the destination can be reached through a router (default router). The Iface defines the interface. The host has only one real interface, ethO, which means interface 0 connected to an Ethernet network. The second interface, la, is actually a virmalloopback interface indicating that the host accepts packets with loopback address 127.0.0.0. More information about the IP address and physical address of the server can be found by using the ifconfig command on the given interface (ethO). $ ifconfig ethO ethO Link encap:Ethemet HWaddr 00:BO:DO:DF:09:5D inet addr:22.214.171.124 Bcast: 126.96.36.199 Mask:255.255.240.0
PLACE YOUR ORDER TO GET STARTEDThe post One utility that can be used to find the contents of a routing table for a host or router is netstat… appeared first on Essay Gem.