Operating System - HP-UX
1752591 Members
3538 Online
108788 Solutions
New Discussion юеВ

Re: adding a static route return unreachable

 
WilliamSmith11
Super Advisor

adding a static route return unreachable

Hi
I am trying to a add a static route but I return unreachable.

I have noted that this happend when I do a ping to the gateway 192.168.20.18 and I can not reach the gateway.

When I reach the gateway 192.168.20.18 am I do the same command all is perfect

The command that I am doing is
route add net 192.168.40.0 netmask 255.255.255.0 192.168.20.18 1

The picture that I have added Think clarify a little more what I am trying to do.

I have a NAT that make and IP translation for my HP ux box from 192.168.2.8 to 192.168.20.68

The 192.168.2.1 is the gateway for the internal server that are together with the HPUX box and other network.

The 192.168.20.18 is the gateway for the net 192.168.40.x

here is the output for my netstat -nr
# netstat -nr
Routing tables
Destination Gateway Flags Refs Interface Pmtu
127.0.0.1 127.0.0.1 UH 0 lo0 32808
192.168.2.6 192.168.2.6 UH 0 lan0 32808
192.168.2.0 192.168.2.6 U 2 lan0 1500
192.168.33.0 192.168.2.1 UG 0 lan0 1500
192.168.100.0 192.168.2.1 UG 0 lan0 1500
192.168.24.0 192.168.2.1 UG 0 lan0 1500

help are welcomes

w.s
rperez
11 REPLIES 11
Johnson Punniyalingam
Honored Contributor

Re: adding a static route return unreachable

>>route add net 192.168.40.0 netmask 255.255.255.0 192.168.20.18 1 <<<

Command looks Ok, did you get any information route has been added ..?
after issue the below command ???

can you do "trace route" to check how many hops

# traceroute 192.168.20.18

if no hops * * * * -> check with your network admin /support team

>>># netstat -nr
Routing tables
Destination Gateway Flags Refs Interface Pmtu
127.0.0.1 127.0.0.1 UH 0 lo0 32808
192.168.2.6 192.168.2.6 UH 0 lan0 32808
192.168.2.0 192.168.2.6 U 2 lan0 1500
192.168.33.0 192.168.2.1 UG 0 lan0 1500
192.168.100.0 192.168.2.1 UG 0 lan0 1500
192.168.24.0 192.168.2.1 UG 0 lan0 1500<<<

as per above routing table i would also use <192.168.2.1> -> gateway ip

can you try as below :-

route add net 192.168.40.0 netmask 255.255.255.0 192.168.2.1 1


Problems are common to all, but attitude makes the difference
Steven Schweda
Honored Contributor

Re: adding a static route return unreachable

What are the IP address and netmask of the
interface on the HP-UX system? If they're
192.168.2.8 and 255.255.255.0, then the only
gateways it can reach would have addresses
like 192.168.2.x, for example, 192.168.2.1.

If you specify a gateway on any other subnet,
then you should expect a complaint like
"unreachable".

If 192.168.2.1 is the only gateway on that
subnetwork, then why not make it the default
route, and stop fooling around?

> The picture that I have added Think clarify
> [...]

Not to me. Boxes and wires don't have IP
addresses. Interfaces have IP addresses. I
see no addresses on the box labeled "NAT",
and too many on the box labeled "HP".
johnsonpk
Honored Contributor

Re: adding a static route return unreachable

Hi William,

route add command tying reach the g/w you have specified and not able to do that.It could be because of ICMP is blocked on that n/w or g/w

if the g/w is not reachable by ping and you still need to add the route , change the dead gateway detection to off:

ndd -set /dev/ip ip_ire_gw_probe 0
and add the route again.
Thanks!
Johnson


johnsonpk
Honored Contributor

Re: adding a static route return unreachable

In order to make this change permanent over reboots add entries in the ndd.conf file

Johnson
Steven Schweda
Honored Contributor

Re: adding a static route return unreachable

> [...] It could be because of ICMP is
> blocked [...]

Perhaps I'm confused, and we are working with
incomplete information, but ...

> route add net 192.168.40.0 netmask 255.255.255.0 192.168.20.18 1

To me, this says, "If you wish to talk to
anyone at 192.168.40.x, then send the message
to 192.168.20.18." The mystery is, if your
own address is 192.168.2.8 (and assuming a
netmask of 255.255.255.0 here, too), then
how do you get the message to 192.168.20.18?
It's not on your own subnet, and you don't
have a route to _it_.

The problem, I claim, is not with anyone
blocking ICMP, but with a thoroughly confused
network configuration. (And/or requests for
the impossible.)
Johnson Punniyalingam
Honored Contributor

Re: adding a static route return unreachable

Hi,

>>johnsonpk<<

>>>that.It could be because of ICMP is blocked on that n/w or g/w<<<

how can you confirm, ????? with out seeing any errors posted .... (It could be some other issues)too.

you should always start digging by (trace route) to give some ideas

Problems are common to all, but attitude makes the difference
johnsonpk
Honored Contributor

Re: adding a static route return unreachable

William>>I am trying to a add a static route but I return unreachable.

I have noted that this happend when I do a ping to the gateway 192.168.20.18 and I can not reach the gateway.

When I reach the gateway 192.168.20.18 am I do the same command all is perfect


Steven, I do agree that the post is not clear ,but see the above message, does this says ..at some point, he is able to reach the gateway 192.168.20.18 ?
Steven Schweda
Honored Contributor

Re: adding a static route return unreachable

> [...] does this says ..at some point, he is
> able to reach the gateway 192.168.20.18 ?

I see "I can not reach the gateway" and "When
I reach the gateway", so I have no clear idea
what he means. My psychic powers are much
too weak.


It's usually a good idea to show actual
commands with their actual output. It's an
especially good idea when English is a second
language, or when one does not have a good
understanding of the situation.
WilliamSmith11
Super Advisor

Re: adding a static route return unreachable

Hi
It is also confused to my because I ping 192.168.20.18 , at some moments I lose the ping.

Really the IP address form the HPUX is 192.160.2.8 and its gateway is 192.168.2.1.

All clients external to the 192.168.2.8 have access to the server throught the translation made by the NAT 192.168.20.68=192.168.2.8
rperez