Routing Table Management
The route command shows or modifies the network routing table. Think of it as your computer's GPS - it decides which path data should take to reach different destinations on the internet.
The routing table tells your computer: "To reach this network, send data through this gateway." It's essential for how your computer decides where to send network traffic, especially when you have multiple network connections.
Advertisement
[ Insert Google AdSense Banner Code Here ]
See how your computer routes traffic to different networks.
Add or modify routes when using VPN connections.
Diagnose why traffic isn't reaching certain networks.
Manage connections to multiple networks simultaneously.
route print Display the entire routing table with all network routes.
route print -4 Show only IPv4 routes (cleaner output).
route add 192.168.2.0 mask 255.255.255.0 192.168.1.1 Add a route to reach 192.168.2.0 network through gateway 192.168.1.1 (requires admin).
route delete 192.168.2.0 Remove a specific route from the routing table (requires admin).
route -f Clear all routes (requires admin).
The route add, route delete, and route -f commands require Administrator privileges to modify the routing table.
To run commands as Administrator in the simulator:
runas /user:administrator cmd Request administrator privileges
admin123 Enter the password when prompted
route add 192.168.2.0 mask 255.255.255.0 192.168.1.1 Now you can add, delete, or flush routes
Real Windows: Right-click Command Prompt and select "Run as administrator" before running these commands.
Practice using the route command in the terminal below: