Did you know that your router isn’t the only device with a routing table?
Yup, any device that relies on TCP/IP for network communications has a routing table – including Windows.
Go ahead and open a command prompt (Windows Key + x + c) and type:
The output is divided into three sections:
- Interfaces List
- IPv4 Route Table
- IPv6 Route Table
The Interfaces List enumerates all your interfaces by MAC address and the next two sections list your dynamic and persistent routes for IPv4 and IPv6.
Each line under Active Routes is a TCP/IP route to a network or a specific device on the network.
To add a route we use the route ADD command to tell Windows which Network to add and then we enter the Subnet mask and Gateway.
But why would you ever add a static route in the first place? People often add static routes when troubleshooting routing related problems. For example, maybe you can’t ping a workstation from a server or perhaps can successfully ping that workstation but the ICMP echo reply chronically times out. Sometimes we can isolate networking problems like this by manually entering a known route. That’s where static routes come in.
So let’s say we’re on the 10.255.70.0 network and the default gateway is 10.255.70.1 and we want to add static route to our management VLAN located on the 126.96.36.199 network.
Assuming our subnet mask is 255.255.248.0 we could add the route like this:
route ADD 188.8.131.52 MASK 255.255.248.0 10.255.70.1
The format is as follows:
route ADD this network with this mask via this gateway IP.
The only drawback to this method is that after you reboot your static route will go poof!
In order to make it stay we need to make it persistent with the -p modifier. So just add a -p to the end of the route and it’ll be permenent.
route ADD 184.108.40.206 MASK 255.255.248.0 10.255.70.1 -p
If later you decide to remove the static route, you can use route DELETE followed by the destination network IP.
route DELETE 220.127.116.11
That’s it for now!