< Computer Networks < Route

Route is a Windows command that displays and updates the network routing table. These activities will show you how to use the route command to modify the local routing table.

Note: To complete this activity, you must have an administrative user account or know the username and password of an administrator account you can enter when prompted.

Preparation

To prepare for this activity:

  1. Start Windows.
  2. Log in if necessary.

Display Local Routing Table

To display the local routing table:

  1. Open an elevated/administrator command prompt.
  2. Type route print and press Enter.
  3. Observe the active routes by destination, network mask, gateway, interface, and metric.

Delete a Route

To delete a route:

  1. Observe the routing table entry for network destination 0.0.0.0 listed in Activity 1. The gateway listed for this network is the default gateway. Make note of this gateway address for use in restoring this route.
  2. Type ping 8.8.8.8 to test Internet connectivity. The ping should be successful.
  3. Type route delete 0.0.0.0 and press Enter to delete the routing table entry for the default gateway.
  4. Type route print and press Enter.
  5. Observe the active routes by destination, network mask, gateway, interface, and metric. Note the missing entry for network destination 0.0.0.0.
  6. Type ping 8.8.8.8 to test Internet connectivity. The ping should fail.

Add a Route

To add a route:

  1. Type route add 0.0.0.0 mask 0.0.0.0 <gateway>, where <gateway> is the gateway address listed for network destination 0.0.0.0 in Activity 1. For example, if the gateway was 192.168.1.1, you would type route add 0.0.0.0 mask 0.0.0.0 192.168.1.1. Then press Enter.
  2. Type ping 8.8.8.8 to test Internet connectivity. The ping should be successful. If not, repeat Activity 2 and then use ipconfig /renew to update your DHCP-assigned IP address and default gateway.
  3. Close the command prompt to complete this activity.

Readings

References

This article is issued from Wikiversity. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.