Operating System - HP-UX
1819695 Members
3824 Online
109605 Solutions
New Discussion юеВ

Adding a static route to HP UX box

 
SOLVED
Go to solution
John O'Neill_6
Regular Advisor

Adding a static route to HP UX box

Hi All,

Wondering if you can help me.

I've got a DR site set up and need to move a HP UX Box from my head office to the DR site for database log shipping (I FTP dbase AI logs from one box to another).

The provider tried to give us a 'bridged ethernet' connection, but was unable to, so we have a 'routed' connection instead.

As such, at each end of the WAN I have a CISCO router.

Our head office uses a network address range of 89.0.3.x and subnet of 255.0.0.0 (Weird I know but it's to support legacy equipment).

It has been suggested that I do this:

Head office Router.. 89.0.3.249
Router at DR Site... 89.0.2.249

I then need to add an 'route' on the UNIX machine on the 89.0.3.x network so it knows that in order to send things to the 89.0.2.x network it needs to send it to the router at 89.0.3.249.

I'm told this a 'route add net' type of command. I'm also advised that this will need to be done at the other end so that box UNIX boxes can talk to each other.

Does this make sense? I don't want to give the UNIX boxes a 'default gateway' as they are not allowed to access the internet.

How hard is this to do? Do I need to reboot the machines?

Any advice appreciated. I know a bit about UNIX but do not consider myself a fully trained System Admin, I'll be getting assistance from our HP partner on this one but would like some feedback before I take up their time.

-John
6 REPLIES 6
YoungHwan, Ko
Valued Contributor
Solution

Re: Adding a static route to HP UX box

You can set multi gateway.
You don't have to reboot the system.

# vi /etc/rc.config.d/netconf



INTERFACE_NAME[0]="lan0"

IP_ADDRESS[0]="89.0.3.249"

SUBNET_MASK[0]="255.0.0.0"

BROADCAST_ADDRESS[0]=""

INTERFACE_STATE[0]=

DHCP_ENABLE[0]=0



INTERFACE_NAME[1]="lan1"

IP_ADDRESS[1]="89.0.2.249"

SUBNET_MASK[1]="255.0.0.0"

BROADCAST_ADDRESS[1]=""

INTERFACE_STATE[1]=

DHCP_ENABLE[1]=0





ROUTE_DESTINATION[0]=default

ROUTE_MASK[0]=""

ROUTE_GATEWAY[0]="89.0.3.1"

ROUTE_COUNT[0]="1"

ROUTE_ARGS[0]=""



ROUTE_DESTINATION[1]="net 89.0.2" ==> Default gateway must be set one.

ROUTE_MASK[1]=""

ROUTE_GATEWAY[1]="89.0.2.1"

ROUTE_COUNT[1]="1"

ROUTE_ARGS[1]=""


After edit netconf file you have to restart the network.

# /sbin/init.d/net stop

# /sbin/init.d/net start
Muthukumar_5
Honored Contributor

Re: Adding a static route to HP UX box

You can set route settings with route command simply for a network as,

# route add net gateway

change prefix based on route man page.

For permanent effect configure with /etc/rc.config.d/netconf file. You can add more gateway(s) as well.

No reboot is needed at all. You can check the connectivity with nslookup or ping after route setting.

--
Muthu
Easy to suggest when don't know about the problem!
Arunvijai_4
Honored Contributor

Re: Adding a static route to HP UX box

Hi John,

You can do it with # route add <..>
Check # man route for more information. After you add, there is no need to reboot your machine, just you can restart network alone.

-Arun
"A ship in the harbor is safe, but that is not what ships are built for"
Nguyen Anh Tien
Honored Contributor

Re: Adding a static route to HP UX box

YoungHwan, Ko is one solution (this is permanent exist)
beside this, you can use route command
Syntax:
route add host|net IP/net GW

You can man route for more!
HTH
tienna
HP is simple
Aji Thomas
Regular Advisor

Re: Adding a static route to HP UX box

Hi John O'Neill ,

Using the route command, we can manually manipulate the routing tables.

The syntax is
route add {ip} {netmask} {gateway} count

eg:

route add 192.11.100.1 255.255.255.0 192.11.100.250 1

where
192.11.100.1 -> IP
255.255.255.0 -> Netmask
192.11.100.250 -> Gateway

John O'Neill_6
Regular Advisor

Re: Adding a static route to HP UX box

Thanks for all the help guys!

-John O'Neill