2

If I try to add a route with route add dest X.X.X.X mask 255.255.252.0 gw X.X.X.X I get dest: Unknown host message. Nothing changes even if I add the -n switch, which I believe should prevent route from trying to interpret ip addresses as host names. Regardless of the fact if the route is actually valid or not some proprietary software, that I need to work, tries this command and exits with failure. Is it possible to “force” add a route without any checks/host name resolving?

2 Answers 2

1

The error message is telling you that the literal hostname dest is an unknown host. dest is not a valid parameter for the route command. If you can't change the software to call route differently, you'll have to do something like replacing route with a script that calls the real route with correct arguments.

2
  • The problem is that dest is actually an ipv4 address and it looks fine to me, I have no idea why route would not treat it as such. Oct 28, 2012 at 6:48
  • It's not complaining about the IP address, it is complaining about the literal string dest.
    – Kyle Jones
    Oct 28, 2012 at 6:55
0

I take it that you want to add a host route like this:

route add -host X.X.X.X mask 255.255.252.0 gw X.X.X.X

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .