Computer Networks/Route/Modify

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 edit

To prepare for this activity:

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

Display Local Routing Table edit

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 edit

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 edit

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 edit

References edit