Operating System - HP-UX
1826188 Members
2683 Online
109691 Solutions
New Discussion

default route when router won't answer ping?

 
Ray Jones_1
New Member

default route when router won't answer ping?

I have a router that won't answer a ping request. I can't seem to add the default route to the router. Route replies:
add net default: gateway X.X.X.X: Network is unreachable

any suggestions on how to get this to add?
Nothing is achieved before it is thourougly tried
3 REPLIES 3
John Palmer
Honored Contributor

Re: default route when router won't answer ping?

Hi Ray,

The 'Network is unreachable' error is saying that the router is not on the same subnet as your server.

This could be an IP configuration or subnetting issue.

For diagnosis, could you post the output from netstat -rnv and the IP address of the router.

Regards,
John
Jay Newman
Frequent Advisor

Re: default route when router won't answer ping?

Hi .
My first suspicion is that you need to specify the net mask.
Chances are, the net mask for your interface is set to 255.255.255.0. If the router is not in that same subnet (i.e. the first 3 sets of numbers matching that of your interface), there will be no route to the router.
You either need to specify a router within the same subnet, or change your net mask so that it includes the router (e.g. 255.255.0.0).
There are other consequences of changing the net mask; you'd be much further ahead making sure that the router and the host are in the same subnet. If they are, find another computer in the same subnet and make sure it can ping the router - maybe there is a connectivity issue not directly related to your host.
"Success is defined by getting up one more time than you fall down."
Ray Jones_1
New Member

Re: default route when router won't answer ping?

You where close...
The router was not on the server.
HP uses the hop count to identify local (0) or nonlocal (1). If the router is not in the server you must add 1 to the end of the route line.
Problem solved thanks to HP support.
Thanks for your help!
Nothing is achieved before it is thourougly tried