Operating System - HP-UX
1834431 Members
2243 Online
110067 Solutions
New Discussion

Re: route add command give odd error

 
SOLVED
Go to solution
harmt01
Frequent Advisor

route add command give odd error

When I type "route add 10.10.10 10.1.1.2 1"
I see:

add net 10.10.10: gateway 10.1.1.2: Network is unreachable"

But I can ping the IP and traceroute to both the a server on the 10.10.10 and the router.

I'm also followings an ITRC post, what is the issue here?
Life isn't about how you survived the storm, it's about how you danced in the rain!
10 REPLIES 10
A. Clay Stephenson
Acclaimed Contributor
Solution

Re: route add command give odd error

I would change:
route add 10.10.10 10.1.1.2 1
to
route add 10.10.10.0 10.1.1.2 1

so that I am certain that you are specifying a network address.

What are you subnet masks for each interface?

It would probably be helpful to post the output of netstat -r.

It would also be helpful to see the output of "ifconfig lan0", "ifconfig lan1", ... for all of your active NIC's.
If it ain't broke, I can fix that.
harmt01
Frequent Advisor

Re: route add command give odd error

Same error with that command. Just added a .0
Where do I add mask?

mask is 255.255.255.0 for both.
Can't send other info as it is a company network.
Life isn't about how you survived the storm, it's about how you danced in the rain!
Tim Nelson
Honored Contributor

Re: route add command give odd error

route add 10.10.10 netmask 255.255.255.0 10.1.1.2 1

>>But I can ping the IP and traceroute to both the a server on the 10.10.10 and the router.
Where are you pinging from ? You need to be able to ping the router ( 10.1.1.2 ) from the server you are adding the route to. When the route is added an ICMP packet is sent. The message is saying that route is not responding.

I am also assuming that your lan interface IP is 10.1.1.something.

This is why the output of ifconfig or netstat -in and netstat -rvn was requested.

Sandman!
Honored Contributor

Re: route add command give odd error

Could you post the IP of the server on the 10.10.10 network. Also what is that network's mask? Could you post the output of the following commands:

# netstat -rnv
# netstat -in
# traceroute
A. Clay Stephenson
Acclaimed Contributor

Re: route add command give odd error

>>> I'm also followings an ITRC post, what is the issue here?

Without the data I requested, it's not possible to know.

because this is a 10.X.X.X network (and thus a private network), you really aren't risking anything (other than attack from someone within your owm 10.X.X.X network) by posting the output of netstat and ifconfig.

At the very least, execute those commands yourself and you will probably see why you can ping with a static route.
If it ain't broke, I can fix that.
Steven Schweda
Honored Contributor

Re: route add command give odd error

> But I can ping the IP and traceroute to
> both the a server on the 10.10.10 and the
> router.

As usual, showing the actual commands used
and their output would probably reveal more
than your summary of what you think happened
when you did some unknown thing.

> I'm also followings an ITRC post [...]

Which one? Some are more relevant and/or
helpful than others.
rick jones
Honored Contributor

Re: route add command give odd error

You cannot add a route using a gateway that is on a network not directly connected to the system. So, unless you have an interface in the system configured into the same subnet as 10.1.1.2 you cannot use 10.1.1.2 as a gateway.
there is no rest for the wicked yet the virtuous have no pillows
harmt01
Frequent Advisor

Re: route add command give odd error

I can't provide more info due to secure enviroment.

Thanks for your help all.
Life isn't about how you survived the storm, it's about how you danced in the rain!
rick jones
Honored Contributor

Re: route add command give odd error

Just make sure you and your organization don't put too much faith in security through obscurity.
there is no rest for the wicked yet the virtuous have no pillows
Steven Schweda
Honored Contributor

Re: route add command give odd error

> I can't provide more info due to secure
> enviroment.

If you're living in fear of hijacked Windows
systems in China attacking your 10.x.x.x
networks, then you have more problems than
one bad route.