Operating System - HP-UX
1819788 Members
3562 Online
109607 Solutions
New Discussion юеВ

Re: route add default fails

 
SOLVED
Go to solution
Alan Casey
Trusted Contributor

route add default fails

I am trying to add a default gateway to an N-Class HP-UX 11.0 server:

image1(root)/etc/rc.config.d> route add default 10.16.0.1
add net default: gateway 10.16.0.1: Network is unreachable

I can ping 10.16.0.1, but don't know why I can't add this route.

Any ideas?
7 REPLIES 7
John Palmer
Honored Contributor
Solution

Re: route add default fails

1. You need to add the hop count to your route command...
route add default 1

2. The IP address *must* be in your local subnet, it can't be a device accessed via a gateway.

What's the output from:
netstat -in
netstat -rnv

Regards,
John
Chris Wilshaw
Honored Contributor

Re: route add default fails

I had similar problems on a server yesterday. It turned out that the card settings were incorrect.

Check the values for the following in the network card config in SAM.

Autoneg
Speed
Duplex Mode
Alan Casey
Trusted Contributor

Re: route add default fails

Thanks guys,

It was the hop count that I ommited.

Chuck J
Valued Contributor

Re: route add default fails

Have you got the network and subnet mask configured in /etc/networks?
Chuck J
Valued Contributor

Re: route add default fails

Alan

Here is how to assign points:

1- 3: The answer didn't really help answer my question but thanks for your assistance!
4- 7: The answer helped with a portion of my question, but I still need some additional help.
8-10: The answer has solved my problem completely! Now I'm a happy camper!

Maybe 1 point at least would've been nice as opposed to 0.
Alan Casey
Trusted Contributor

Re: route add default fails

Chuck you forgot to add in what 0 points are for:

The answer was simply a point of clarification to my original question


If you are going to be so rude, please don't bother replying to my posts in future.
JHL_2
Advisor

Re: route add default fails

John above is right. I ran into the same thing last week in fact. Most guides ( for some reason) do not include the last value at the end of the command. Also check the netconf file and check the value of the route count field for the same interface.

Good luck