3
0
Hi I configured the following persistent routes on my Windows Server.
route -p ADD 10.32.1.40 MASK 255.255.255.255 172.16.8.254
route -p ADD 10.192.1.40 MASK 255.255.255.255 172.16.8.254
They work fine initially, but when I reboot they do not work anymore and no longer show up as an active route. How could this be?
My route print output looks like this
Tracing route to 10.192.1.40
over a maximum of 30 hops:
1 <1 ms <1 ms <1 ms 10.129.81.11
2 <1 ms <1 ms <1 ms 10.222.129.5
3 17 ms 4 ms 4 ms 10.48.1.121
4 1 ms 1 ms 1 ms 10.222.13.13
5 4 ms 4 ms 4 ms 10.222.13.14
6 * * * Request timed out.
7 * * * Request timed out.
8 * * * Request timed out.
9 * * * Request timed out.
10 * * * Request timed out.
11 PS C:\Users\Administrator> route print
===========================================================================
Interface List
12 ...00 50 56 bb 76 d2 ...... Intel(R) PRO/1000 MT Network Connection #2
11 ...00 50 56 bb 47 c4 ...... Intel(R) PRO/1000 MT Network Connection
1 ........................... Software Loopback Interface 1
14 ...00 00 00 00 00 00 00 e0 isatap.{B96D2DBB-444E-4452-ADD3-E20B7A534D11}
13 ...00 00 00 00 00 00 00 e0 isatap.{7D99C8C8-276A-4232-A137-BA84ACBD738D}
10 ...02 00 54 55 4e 01 ...... Teredo Tunneling Pseudo-Interface
===========================================================================
IPv4 Route Table
===========================================================================
Active Routes:
Network Destination Netmask Gateway Interface Metric
0.0.0.0 0.0.0.0 10.129.81.10 10.129.81.234 266
10.10.110.0 255.255.255.0 172.16.6.254 172.16.6.234 11
10.129.81.0 255.255.255.0 On-link 10.129.81.234 266
10.129.81.234 255.255.255.255 On-link 10.129.81.234 266
10.129.81.255 255.255.255.255 On-link 10.129.81.234 266
127.0.0.0 255.0.0.0 On-link 127.0.0.1 306
127.0.0.1 255.255.255.255 On-link 127.0.0.1 306
127.255.255.255 255.255.255.255 On-link 127.0.0.1 306
172.16.0.0 255.255.0.0 172.16.6.254 172.16.6.234 11
172.16.6.0 255.255.255.0 On-link 172.16.6.234 266
172.16.6.234 255.255.255.255 On-link 172.16.6.234 266
172.16.6.255 255.255.255.255 On-link 172.16.6.234 266
224.0.0.0 240.0.0.0 On-link 127.0.0.1 306
224.0.0.0 240.0.0.0 On-link 172.16.6.234 266
224.0.0.0 240.0.0.0 On-link 10.129.81.234 266
255.255.255.255 255.255.255.255 On-link 127.0.0.1 306
255.255.255.255 255.255.255.255 On-link 172.16.6.234 266
255.255.255.255 255.255.255.255 On-link 10.129.81.234 266
===========================================================================
Persistent Routes:
Network Address Netmask Gateway Address Metric
10.10.110.0 255.255.255.0 172.16.6.254 1
172.16.0.0 255.255.0.0 172.16.6.254 1
10.32.1.40 255.255.255.255 172.16.8.254 1
10.192.1.40 255.255.255.255 172.16.8.254 1
0.0.0.0 0.0.0.0 10.129.81.10 Default
===========================================================================
IPv6 Route Table
===========================================================================
Active Routes:
If Metric Network Destination Gateway
1 306 ::1/128 On-link
1 306 ff00::/8 On-link
===========================================================================
Persistent Routes:
None
According to this post the most specific subnet mask should get priority. Pretty sure I can't get more specific than 255.255.255.255
More information: I can ping the gateway I'm trying to rig
PS C:\Users\Administrator> ping 172.16.8.254
Pinging 172.16.8.254 with 32 bytes of data:
Reply from 172.16.8.254: bytes=32 time=3ms TTL=255
Reply from 172.16.8.254: bytes=32 time=1ms TTL=255
Reply from 172.16.8.254: bytes=32 time=4ms TTL=255
Reply from 172.16.8.254: bytes=32 time=2ms TTL=255
Result of a tracert:
PS C:\Users\Administrator> tracert 10.32.1.40
Tracing route to pen-srv1 [10.32.1.40]
over a maximum of 30 hops:
1 <1 ms <1 ms <1 ms 10.129.81.11
2 <1 ms <1 ms <1 ms 10.222.129.5
3 1 ms 1 ms 1 ms 172.29.150.10
4 2 ms 1 ms 1 ms 172.29.150.9
5 * * * Request timed out.
It keeps jumping to the wrong network.
As you can read at the very end of the Article you posted with your first link "persistent routes". ---- That’s all easy enough, but there is one extra little catch. When you add a static route, by default it only lasts until the next time you start Windows. The reason for this is that many companies use a coordinated list of static routes that gets updated fairly often. Rather than adding and updating all those routes on every machine, they just distribute a batch script file that adds the newest routes during Windows startup. This keeps the routing table relatively uncluttered. – konqui – 2017-09-14T12:44:16.000
I made the route persistent using the "-p" parameter. As you can see it is also showing up in the routing table. It's just not in the active routing table. So somehow it is being overruled by one of the other routes. I just have no clue which one. – Gilles Lesire – 2017-09-14T12:46:28.147
1Persistent routes sometimes don't persist and with no explanation. Try to add the interface parameter to the route command. But if the problem still returns, you might consider adding a boot script that reestablishes these routes. – harrymc – 2017-09-17T18:26:17.450
Hmmm indeed, I just removed the persistent route and readded it, after reboot it just functions as it should. The fact that persistent routes not always persist is quite worrying though. I use it to persist a route to the Active Directory Domain Controller. If that route goes out, no more logging in. :/ – Gilles Lesire – 2017-09-18T07:10:32.357
A boot scrip may be an overkill, but is good assurance. – harrymc – 2017-09-19T10:16:44.670
Yeah that's what I did now. After another reboot the persistent routes were gone again. I was hoping there would have been a cleaner solution. Startupscripts often get overlooked. – Gilles Lesire – 2017-09-19T10:39:13.273