Windows Routing Table not allowing Permanent Route
Solution 1
Oddly enough I managed to fix this. The initial command I put in should work. And did.
The problem I think arose from the fact I was copying and pasting this into the command line from a text file that I had written it in. This time, after copying and pasting, I went and deleted the -p
flag and re-entered it. Presto!
I am assuming that in the copy/paste, the -
has become mis-represented in the command line somehow. Anyway, problem solved :)
Solution 2
The IP address of your gateway, 192.0.0.241, is a public IP address. It is so public, everybody who reads your OP will know you are located in Huddersfield, UK.
The routing table instead needs to know the private IP address of your gateway. In particular, for it to be reachable, it must be included in the net 192.168.20.0/24, which you have specified in your command. Included means it must be between 192.168.20.1 and 192.168.20.254. So you must learn your LAN-side IP address, and use that.
If you are wondering what WAN-side and LAN-side IP addresses mean, keep in mind this: your router has at least two cables: one is used to carry information to the Internet, and is called WAN-side. The other cable goes to your local network, and is called LAN-side.
The WAN-side interface must have a public address, the LAN-side interface a private address. The private addresses are : 10.0.0.0/8, 172.16.0.0/16, 192.168.0.0/16. Everything else is public (with few exceptions to be neglected here). Since you are on the same private network as your gateway/router/firewall, you see its private interface. Thus it is known to you with a private address, to be used in the above commands.
Related videos on Youtube
Comments
-
bmgh1985 almost 2 years
I have come across an odd problem today. When trying to add a route to the Routing Tables (in Windows 7 Professional x64), I am using the command
Route add –p 192.168.20.0 mask 255.255.255.0 192.0.0.241
However, this gives me a
Route: bad argument 192.0.0.241
, which would suggest to me that there is some kind of issue with that IP (which is our firewall). However, I then ranRoute add 192.168.20.0 mask 255.255.255.0 192.0.0.241
and it works fine and I can access that network. Does anyone have any ideas why the permanent routing did not work? I have used it on about seven or eight machines in the past without any issues (on XP and W7 machines).
Thanks
-
bmgh1985 over 10 yearsInteresting to hear that. All our PC's are on 192.0.0.x, however when this goes through the router, it supposedly then converts it to our external IP (64.something). The 192.168.20.x is our phone system that for some reason was put on a separate network to our PCs (mainly because the phone engineer didnt want to have to mess with extra config at the time - our managed services guys hate it!)
-
bmgh1985 over 10 yearsIn fact, doing a WhoIs on that IP gives no such info. It actually says that: Addresses starting with "192.0.0." are reserved for a variety of different protocols by the IETF, the organization that develops Internet protocols. The common factor is that these addresses are not used by a single organization but by any network where the specific protocol is implemented. whois.arin.net/rest/net/NET-192-0-0-0-1
-
MariusMatutiae over 10 yearsTake a look at either of these two Web pages: whatismyip.com/ip-address-lookup (here you will have to type in 192.0.0.241) and whatismyipaddress.com/ip/192.0.0.241
-
MariusMatutiae over 10 yearsAlso, the Whois page you reference states: Addresses from this range should not be used as an alternative to the private IPv4 address ranges assigned by the IETF in the Best Current Practice. Apparently, your LAN is running against an explicit recommendation of the IANA, if all your PCs are on 192.0.0.0/24.
-
bmgh1985 over 10 yearsOh I dont doubt its a stupid IP range to use as a private address (I didnt set it up :P), but the point I am making is it is our internal network IP range and this has worked in the past (and even works now if done as a non-permanent connection)
-
MariusMatutiae over 10 yearsStill all of this adds nothing to the fact that you cannot use a gateway with an IP outside the range of your subnet. You will have to find a gatway in the 192.168.20.0/24 subnet.
-
bmgh1985 over 10 years.241 has a rout built into it to allow for connections to .20.0. Would be so much easier if the supposed "experts" who set these up for us years ago knew what they were doing (hopefully will be ripping these out in a year or so :P)
-
DrColossos over 10 yearsThe question shows clearly that the
-p
flag was already there.