Operating System - HP-UX
1827487 Members
2672 Online
109965 Solutions
New Discussion

how to config a hpux server as a router

 
SOLVED
Go to solution
TAN Hui_1
Occasional Advisor

how to config a hpux server as a router

I have a hpux server with 2 NICs, lan0 and lan3. lan0 is connect to our intranet, and lan3 is connect to a private network for test purpose. The server can access both the intranet and private network correctly now.
The question is, how to config the server as a router? So that I can access the private network through the server from my desktop.
tiger
8 REPLIES 8
malay boy
Trusted Contributor

Re: how to config a hpux server as a router

Hi,
Well you can telnet to HP then telnet to the private network.:-) this may not be the answer you looking for.

HP to do routing ?.I don''t know.

regards mB
There are three person in my team-Me ,myself and I.
T G Manikandan
Honored Contributor
Solution

Re: how to config a hpux server as a router

1.The two cards should be connected to different networks->you have done that.

2.From your desktop point to the lan0 ip of the hpux server as the gateway to reach the private network

The routing table should have an entry like any access to private network should go via the lan0 of the hpux server.

i.e
C:>route add mask

Also make sure that ip_forwarding is enabled on the hpux server.
By default it is enabled for machine with two cards.

check using
#ndd -get /dev/ip ip_forwarding

Revert on the same.

Steve Lewis
Honored Contributor

Re: how to config a hpux server as a router


Configure and run gated.

In its simplest form, just add the line:
rip yes
to /etc/gated.conf.
Set GATED=1 in /etc/rc.config.d/netconf
and start the gated daemon.

Also see: man gated.conf

Editing the gated configuration file will allow you to configure it to only route from your machine to the test network, not the whole world.

It may consume a certain amount of cpu, depending on traffic.

Be aware of security considerations.



TAN Hui_1
Occasional Advisor

Re: how to config a hpux server as a router

Hi TG,

I have done all your suggestion, but it doesn't work.
Follows are my configurations,
=== hp server ===
# netstat -in
Name Mtu Network Address Ipkts Ierrs Opkts Oerrs Coll
lan3 1500 192.1.1.0 192.1.1.99 1558 0 2740 0 0
lan0 1500 172.18.0.0 172.18.1.114 9617064 0 84979 0 0
lo0 4136 127.0.0.0 127.0.0.1 2273 0 2273 0 0

# netstat -rn
Routing tables
Destination Gateway Flags Refs Interface Pmtu
127.0.0.1 127.0.0.1 UH 0 lo0 4136
172.18.1.114 172.18.1.114 UH 0 lan0 4136
192.1.1.99 192.1.1.99 UH 0 lan3 4136
192.1.1.0 192.1.1.99 U 2 lan3 1500
172.18.0.0 172.18.1.114 U 2 lan0 1500
127.0.0.0 127.0.0.1 U 0 lo0 0
default 172.18.1.10 UG 0 lan0 0

# ndd -get /dev/ip ip_forwarding
2
=== desktop pc ===
Active Routes:
Network Destination Netmask Gateway Interface Metric
0.0.0.0 0.0.0.0 172.18.1.10 172.18.18.55 1
127.0.0.0 255.0.0.0 127.0.0.1 127.0.0.1 1
172.18.0.0 255.255.0.0 172.18.18.55 172.18.18.55 1
172.18.18.55 255.255.255.255 127.0.0.1 127.0.0.1 1
172.18.255.255 255.255.255.255 172.18.18.55 172.18.18.55 1
192.1.1.0 255.255.255.0 172.18.1.114 172.18.18.55 2
224.0.0.0 224.0.0.0 172.18.18.55 172.18.18.55 1
255.255.255.255 255.255.255.255 172.18.18.55 172.18.18.55 1
Default Gateway: 172.18.1.10

Where,
the intranet network is 172.18.0.0/16, and the private network is 192.1.1.0/24
tiger
TAN Hui_1
Occasional Advisor

Re: how to config a hpux server as a router

Hi steve,

I have also tried to enable the gated to do the job, but there was no effect.
I can ping to 192.1.1.99 from my pc, which ip is 172.18.18.55. When I try to ping a ip in the private network, for example 192.1.1.100, the result is "time out".
It seems that the packet can reach the hp server, but not be forwarded.
tiger
T G Manikandan
Honored Contributor

Re: how to config a hpux server as a router

What is the output of

C;>tracert -d 192.1.1.100

from 172.18.18.55

Revert
Steve Lewis
Honored Contributor

Re: how to config a hpux server as a router

I searched the forums for this issue. It seems that the NDD default ip_forwarding will do the job. So forget gated for now. See:

http://forums.itrc.hp.com/cm/QuestionAnswer/0,,0xa69de7613948d5118fef0090279cd0f9,00.html

I think that your PC routes to the intermediate HP-UX server via the default gateway. Check this router setting also. The problem may be the routing between PC and HP-UX server for ultimate destinations on 192...

I assume that the final destination is up and running and pingable from the HP-UX server?
TAN Hui_1
Occasional Advisor

Re: how to config a hpux server as a router

Hi all,

Thanks for your help. I have solved the problem now.

The problem exist in the private network while not in the hp server or my pc. I added the 192.1.1.99 as the gateway for 192.1.1.100 which was not set before.

Anyway, many thanks to you all.
tiger