Operating System - HP-UX
1831645 Members
2105 Online
110029 Solutions
New Discussion

Re: Adding host route gives "network not reachable"

 
SOLVED
Go to solution
Thomas Blietz
New Member

Adding host route gives "network not reachable"

Hi,
trying to add a new hostroute to reach a SMTP-server (192.168.120.39), which is only accessibly over a firewall (192.168.50.19) always gives me the error "network not reachable". The firewall does not respond to a ping.
Here is what I did:

route add 192.168.120.39 192.168.50.19 1

My own IP is 192.168.50.17.

Any idea?
Thomas
7 REPLIES 7
Steven E. Protter
Exalted Contributor

Re: Adding host route gives "network not reachable"

This question can not be answered without the network mask.

ifconfig lan0

or whatever the lan is lan0,lan1 etc.

A network mask of 255.255.255.0 means the network portion of the address is 192.168.50

You may have incompatible network masks.

You might want to display curernt routes with netstat.

netstat -rn

Post it up and you can get some good help.

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
Solution

Re: Adding host route gives "network not reachable"

go into ndd and turn off the dead gateway detection.

ndd -set /dev/ip ip_ire_gw_probe 0

Then remove and reinstall the route and it should work. If it does you will need to edit /etc/rc.config.d/nddconf to make it stick after a reboot.

TRANSPORT_NAME[0]=ip
NDD_NAME[0]=ip_ire_gw_probe
NDD_VALUE[0]=0

Use the next higher integer in the brackets if you already have an entry.

Ron

Re: Adding host route gives "network not reachable"

Can you reach the firewall (rlogin, telnet, ssh or so)?

Is your firewall a router?. It's up and running? Have the correct route to net/host that you want tou reach?

Have you look at rules in the firewall to see if your machine have rights?. Try seeing the logs from the firewall to see what happen.

JF
En el espacio nadie puede oir tus gritos
Thomas Blietz
New Member

Re: Adding host route gives "network not reachable"

First I tried

ndd -set /dev/ip ip_ire_gw_probe 0

but I still get the "Network is unreachable" error.

ipconfig lan0 shows my network mask as
255.255.255.0

netstat -rn gives me

Routing tables
Dest/Netmask Gateway Flags Refs Use Interface Pmtu
127.0.0.1 127.0.0.1 UH 0 21980 lo0 4136
192.168.50.17 192.168.50.17 UH 0 12207 lan0 4136
192.168.50.0 192.168.50.17 U 2 0 lan0 1500
192.168.1.0 192.168.50.34 UG 0 0 lan0 1500
127.0.0.0 127.0.0.1 U 0 0 lo0 4136
default 192.168.50.10 UG 0 0 lan0 1500
Elmar P. Kolkman
Honored Contributor

Re: Adding host route gives "network not reachable"

You could try to add 'host':
route add host 192.168.120.39 192.168.50.19 1

Every problem has at least one solution. Only some solutions are harder to find.
Ron Kinner
Honored Contributor

Re: Adding host route gives "network not reachable"

I believe there were some ndd/ARPA patches that were required in order for the command to work. (the command does not even appear in my unpatched 11.0 box) PHNE 26125 for NDD and PHNE 21767 or 26771 for ARPA for 11.0.

http://www2.itrc.hp.com/service/patch/search.do?BC=patch.breadcrumb.main|&pageContextName=hpux:::

Also once the dead gateway detection is turned off, any dead gateways are not restored until you remove the route then add it back in or reboot after making the changes to nddconf. There is another ndd command for the timeout. It is normally set at 3 minutes so it should work during the three minutes right after you add it if dead gateway is the problem.

Another possible problem could be the MTU discovery method you are using. This is also set in ndd and can cause problems with some firewalls. Do ndd -h ip_pmtu_strategy
and it will tell you all about it.

You might check your arp table after attempting to ping the firewall to see if it even replies to an arp.

arp -a

A work around would be to let it go to your original default router and have the router relay it to the firewall. You would have to turn off icmp redirect on the router (and put a route on the router pointing to the firewall) or it would tell your HPUX to use the firewall and you would be back where you started from.

Ron
Thomas Blietz
New Member

Re: Adding host route gives "network not reachable"

Now it works.
It seems that I did something wrong in the last step suggested by Ron. I tried again disabling the dead network detection and it worked..

Thanks to all.