DistributedNetworks DistributedNetworks


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 192.168.199.34. You are therefore on the 192.168.199.0 network. Issue the proper command to inspect your routing table.
    Solution: route
  2. According to the readout, your default gateway is 192.168.199.1. You can see this by viewing the entry that says default Then, look for the entry beneath “Gateway”. The default gateway is listed here (192.168.199.1). Send four ping packets to your default gateway.
    Solution:
    ping -c 4 192.168.199.1
    
  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 192.168.199.129. Issue four ping packets to see if you can still reach this system.
    Solution: ping -c 4 192.168.199.129
  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 www.acmecorp.com four times.
    Solution: ping -c 4 www.acmecorp.com
  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 (216.32.118.210). Send the server two ping packets.
    Solution: ping -c 2 216.32.118.210
  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 192.168.199.1
  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 www.acmecorp.com.
    Solution: ping -c 2 www.acmecorp.com