Computer Networks/Route/Modify
(Redirected from Route command/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
editTo prepare for this activity:
- Start Windows.
- Log in if necessary.
Display Local Routing Table
editTo display the local routing table:
- Open an elevated/administrator command prompt.
- Type route print and press Enter.
- Observe the active routes by destination, network mask, gateway, interface, and metric.
Delete a Route
editTo delete a route:
- 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.
- Type ping 8.8.8.8 to test Internet connectivity. The ping should be successful.
- Type route delete 0.0.0.0 and press Enter to delete the routing table entry for the default gateway.
- Type route print and press Enter.
- Observe the active routes by destination, network mask, gateway, interface, and metric. Note the missing entry for network destination 0.0.0.0.
- Type ping 8.8.8.8 to test Internet connectivity. The ping should fail.
Add a Route
editTo add a route:
- 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.
- 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.
- Close the command prompt to complete this activity.