Operating System - HP-UX
1846963 Members
4209 Online
110257 Solutions
New Discussion

IP Routing on HP-UX 11 Workstation

 
SOLVED
Go to solution
Hiroyuki_1
Advisor

IP Routing on HP-UX 11 Workstation


A Happy New Year .

I'm new to hp-ux and interested in network . To search , enterd " hp-ux route " in forum search engine and found similar question written in Jan 4, 2002 05:08:20 GMT and titled " IP Routing on HP-UX 11 Servers " . But suspected useful links were obsoleted . Could anybody take a little time to help ?

The Question was below ...

Hi,

We need to multihome HP servers on two separate subnet. One interface is on company intranet, the other one is on its local network. eg. 10.1.1.0 (intranet) and 172.18.1.0

How could I define the routing? Would like to setup default routing to 172.18.1.0.
We also want some other devices with 10.170.1.0 network IP to reach the server through 10.1.1.0 subenet interface. Right now I had to use "route add host ..." to specify host by host. "route add 10.170.1.0 ..." does not work.

Thanks in advance,
?
7 REPLIES 7
Laurent Menase
Honored Contributor
Solution

Re: IP Routing on HP-UX 11 Workstation

Hi,
I suppose you are subnetting the class A net 10.0.0.0

I suppose your nemask on the 10... is 255.255.255.0

A 10.1.1.x --- 10.1.1.y gw10 10.170.1.y
|
B 10.170.1.z
if this is the case you must:
route add net 10.170.1.0 10.1.1.y 1
or
route add net 10.0.0.0 10.1.1.y 1
for all 10.... systems

on b you must know the reversed route using 10.17.1.y




Hiroyuki_1
Advisor

Re: IP Routing on HP-UX 11 Workstation

Thank you Raulent .

Befor accessing distant machines , I need to build up workstation as gateway . Local R/C provides following document ..

1.
INTERFACE_NAME[1]=lan1
IP_ADDRESS[1]="192.0.1.1"
SUBNET_MASK[1]=""
BROADCAST_ADDRESS[1]=""
LANCONFIG_ARGS[1]="ether"

2.
(/etc/hosts)
133.0.1.1 hpws1
192.0.1.1 hpws1-gw

only above are suitable configuration for GW ?
And also it seems not to work .



?
Laurent Menase
Honored Contributor

Re: IP Routing on HP-UX 11 Workstation

Hello Hiroyuki,

could you send the result of
netstat -nai
netstat -nrv

from the 2 systems?
Hiroyuki_1
Advisor

Re: IP Routing on HP-UX 11 Workstation

Thank you Raulent .

I searched interested article for me on forum and actually I don't have such big network on my home and now I'm making an effort to understand how to configure and use hp-ux GW box . I'm sorry I don't understand " netstat from the 2 systems " .

# netstat -nai
Name Mtu Network Address Ipkts Ierrs Opkts Oerrs Coll
lan1 1500 192.168.2.0 192.168.2.10 1092 0 1092 0 0
lan0 1500 192.168.1.0 192.168.1.22 577775 0 416126 0 0
lo0 4136 127.0.0.0 127.0.0.1 85 0 85 0 0


# netstat -nrv
Routing tables
Dest/Netmask Gateway Flags Refs Interface Pmtu
127.0.0.1/255.255.255.255 127.0.0.1 UH 0 lo0 4136
192.168.2.10/255.255.255.255 192.168.2.10 UH 0 lan1 4136
192.168.1.22/255.255.255.255 192.168.1.22 UH 0 lan0 4136
192.168.1.0/255.255.255.0 192.168.1.22 U 2 lan0 1500
192.168.2.0/255.255.255.0 192.168.2.10 U 2 lan1 1500
127.0.0.0/255.0.0.0 127.0.0.1 U 0 lo0 0
default/0.0.0.0 192.168.1.1 UG 0 lan0 0

only information I have on my workstation is above and other machines are just PCs or NAPT router .
?
Ron Kinner
Honored Contributor

Re: IP Routing on HP-UX 11 Workstation

I think 11.0 has ip forwarding turned on by default but it wouldn't hurt to check. I don't have access to an HPUX right now but I think
ndd -get /dev/ip ip_forwarding
should return 1 if it is on. If you get 0 then try:
ndd -set /dev/ip ip_forwarding 1
and also make the appropriate changes in /etc/rc.config.d/nddconf

Also check that
ping 192.168.1.1
works or you will need to turn off dead gateway detection in ndd too.

ndd -set /dev/ip ip_ire_gw_probe 0

and make the same change in nddconf. You may also need to remove and readd the default with route delete and route add in order to get it to work or reboot.

Assuming you did not need to make any ndd changes then verify that each box on the 192.168.1.x knows that the 192.168.2.x can be reached by going through your HPUX. All boxes on the 192.168.2.x should use your HPUX as the default gateway.

I expect however that you are going to run into routing and NAT problems if your router is one of the low end boxes. First, there may not be any way to add a route on the router to tell it about the 192.168.2.x LAN. Second, any traffic going to the Internet via the router will have to go through the NAT process where it gets a legal address assigned and usually the cheap routers only NAT from a fixed pool of 192.168.1.1-254 so will ignore any 192.168.2.x packets or send them out unchanged where they will be filtered and dropped.

11.0 does not offer native NAT support which is what you would need to fix the problem. There are programs such as ipfilter which will run on 11.0 which do offer NAT which can. You should be able to find ipfilter on the web.

Ron

rick jones
Honored Contributor

Re: IP Routing on HP-UX 11 Workstation

If you want a given client to access a server on a given IP, either use that IP address directly, or make sure that when the client goes to resolve the server's name to an IP address, it gets the IP address you want.

Indeed HP-UX 11 will "route" by default - ip_forwarding is on by default. HOWEVER - if you want toe HP-UX system to be used as a router, you have to configure the _other_ systems to know to use it as a router. It is not enough to just configure things on the HP-UX system.

As for NAT and the like - perhaps the ipfilter HP ships has some "works but not necessarily supported" NAT functionality in it.
there is no rest for the wicked yet the virtuous have no pillows
Hiroyuki_1
Advisor

Re: IP Routing on HP-UX 11 Workstation

Thank you very much Laurent , Ron and Rick .

According to your advices , I setup client PCs to use WS's NIC as default gateway and succeeded in pinging together , amazing .

Fortunately my cheap router has adding rotes facility and now every machines can use browser .

And Windows file share was a little bit tricky . I saw some tips mentioned to LMHOSTS but it doesn't work . So I tried " Add network place " wizard and it began working .

I spent happy new year vacation . Hope you will be healthy this year .
?