TCP/IP Configuration  «Prev 

Linux Routing Commmands

  1. You are logged on with normal user permissions, and you are in the /home/user1 directory.
    Your systems administrator has updated the system PATH value to allow you to use the route command. You are going to work with the routing table in order to further understand the significance of a properly configured routing table.
    Your IP address is You are therefore on the network. Issue the proper command to inspect your routing table.
    Solution: route
  2. According to the readout, your default gateway is You can see this by viewing the entry that says default Then, look for the entry beneath “Gateway”. The default gateway is listed here ( Send four ping packets to your default gateway.
    ping -c 4
  3. You now know that you can access your default gateway. Assert root privileges so that you can work with your routing table.
    Solution: su
  4. Use rootpass as your password.
  5. Now that you have root privileges, you can experiment with the routing table to further understand the consequences of a misconfigured routing table. Delete the default gateway entry. Hint: Your command will involve the use of the word “default.”
    Solution: route del default
  6. One of the many systems on your subnet has the IP address of Issue four ping packets to see if you can still reach this system.
    Solution: ping -c 4
  7. Notice that you can still connect to this system, even though you have deleted the default gateway from your system's routing table. This is because the system exists on the same subnet, and does not require a default gateway. Now, check to see if you can ping another host on another subnet.For example, the Acme Web server is on another subnet. Ping the host at four times.
    Solution: ping -c 4
  8. Note that you have not been able to issue this query, because the Acme Web server exists on a different subnet. In order to send messages to this Web server, you require a router to intercede for you. It is possible, however, that your DNS server may be down. This means that even though you may still have a default gateway, your DNS server will not be able to provide name-to-IP-address resolution. To troubleshoot your connectivity, use ping to query the Acme Web server by its IP address ( Send the server two ping packets.
    Solution: ping -c 2
  9. The attempt has failed, confirming your understanding of the routing table. The problem is not with DNS. It is with your routing table. Now, issue a command that creates a new default entry for your default gateway.
    Solution: route add default gw
  10. Your interface has a default gateway, again. Test your connectivity by pinging the Acme Web server again twice. Use the following command: ping -c 2
    Solution: ping -c 2