Operating System - HP-UX
1820636 Members
1853 Online
109626 Solutions
New Discussion юеВ

route add error :Network unreachable

 
malay boy
Trusted Contributor

route add error :Network unreachable

Hello,
My lan interface are 10.210.21.x with netmask 255.255.255.248 . I want to add the route : 10.210.21.148 with netmask 255.255.255.248 to routing table.

I execute :
route add 10.210.21.148 255.255.255.248 10.210.21.1
(I will return error "Network Unreachable")

If I execute :
route add 10.210.21.148 255.255.255.248 10.210.21.1 1
(I added 1 hop,it will return the command back and i think it's a syntax error ).

Please advice or any document that could help.

.... mB :-)
There are three person in my team-Me ,myself and I.
7 REPLIES 7
malay boy
Trusted Contributor

Re: route add error :Network unreachable

One more question:
If I put the route add,does the system will probe/ping the added route and if it failed and it will gave "Network Unreachable" ...
Uhm .. or how does this worked

Any help ..

regards
mB
There are three person in my team-Me ,myself and I.
Biswajit Tripathy
Honored Contributor

Re: route add error :Network unreachable

# route add 10.210.21.148 netmask 255.255.255.248 10.210.21.1 1

- Biswajit
:-)
malay boy
Trusted Contributor

Re: route add error :Network unreachable

Hi Biswajit,
That's won't work.Try that before.It gave the command back with command syntax.

Thanks for replying.

But does the system will ping the gateway before putting in the route?.

regards
Arman Rahim
There are three person in my team-Me ,myself and I.
Biswajit Tripathy
Honored Contributor

Re: route add error :Network unreachable

As per usage, that should work and should not give
any syntax error.

# route add
usage: add destination [netmask mask] gateway [metric]

The gateway must be reachable from the host on
which you are running "route add" command.
Otherwise, there is no way the system can route
those packets.

- Biswajit

:-)
Steven E. Protter
Exalted Contributor

Re: route add error :Network unreachable

I'd make sure the network hardware is correct.

The commands look good and there may be a problem with how the VLAN is done or the routers on the system you are trying to connect.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Ron Kinner
Honored Contributor

Re: route add error :Network unreachable

What version of HPUX are we talking about? There have been subtle variations in the route command syntax over the years. You may need the -net or -network command option. Also what IP address does your HP have? If not in the 10.210.21.2-6 range then it will not be able to use the .1 gateway with the 248 mask. You definitely need the metric of 1 to indicate the address is not local.

10.210.21.1 with a 248 mask is part of the subnet zero and is unusable on most HPUX without turning off subnet checking in ndd.

Ron
Andrew Cowan
Honored Contributor

Re: route add error :Network unreachable

In your original statement you said "10.210.21.x" was your IP-Address and yet you did not state the range that "x" was in. By doing the binary arithmetic that address must be in the range ".144-.151". Are you sre that your adapter falls within this subnet, otherwise the network would indeed by unreachable:

Example of subnet calculation:

11111 | 000 = 248
10010 | 000 = 144
10010 | 111 = 151