Operating System - HP-UX
1833589 Members
4233 Online
110061 Solutions
New Discussion

Re: HPUX 11.0: Configuring Mutliple Routes To Multiple Lan Cards

 
SOLVED
Go to solution
LG Porter
Frequent Advisor

HPUX 11.0: Configuring Mutliple Routes To Multiple Lan Cards

I have a N4000 server running HPUX 11.0. I have just installed a 1000Base-SX lan card (lan3) and I want to set a new IP with a specific route other than the default route(which is associated with 100BaseT lan1). Can the "ifconfig" command to specify a specific route? How should the /etc/rc.config/netconf file be configured to specify specific route to a specific lan card as to not to conflict with the default route?
4 REPLIES 4
Sridhar Bhaskarla
Honored Contributor
Solution

Re: HPUX 11.0: Configuring Mutliple Routes To Multiple Lan Cards

Hi,

There is one more thread today about the same thing.

You will need to use 'route add' command to add a route. For ex., Say you have a router 200.200.200.1 that can route to 210.210.210.0 network. If your 1000B-Sx interface has the IP 200.200.200.10, then you would run the following command to add the route to 210.210.210.0.

route add net 210.210.210.0 netmask 255.255.255.0 200.200.200.1 1

Since 200.200.200.1 is directly reachable through your Gigabit interface, the traffic to 210.210.210.0 network will go through it.

Your netconf will have


ROUTE_DESTINATION[x]="net 210.210.210.0"
ROUTE_MASK[x]="255.255.255.0"
ROUTE_GATEWAY[x]=200.200.200.1
ROUTE_COUNT[x]=1

Replace x with the next index in netconf file.

-Sri
You may be disappointed if you fail, but you are doomed if you don't try
Steven E. Protter
Exalted Contributor

Re: HPUX 11.0: Configuring Mutliple Routes To Multiple Lan Cards

adding routes is done with the route command


route add destination source

If the route isn't valid it will return and error code. You are responsible for not setting up routes that will screw with the default routes.

Check them before you start with netstat -in



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
Michael Steele_2
Honored Contributor

Re: HPUX 11.0: Configuring Mutliple Routes To Multiple Lan Cards

From the command line:

route add net 10.0.0.0 192.168.100.2 255.0.0.0 1

(* route add net subnet_ip gateway mask hop_count *)

To be added in /etc/rc.config.netconf for bootup:

ROUTE_DESTINATION[1]="10.0.0.0"
ROUNT_MASK[1]="255.0.0.0"
ROUTE_GATEWAY[1]="192.168.100.2"
ROUTE_COUNT[1]=1
ROUTE_ARGS[1]=""

Note the [indice] increases like an array indice.

You may have an issue with the default gateway sending all traffic to the primary lan. Apparently this is how routers and gateways work sometimes. Contact your router/gateway manufacturer about this.
Support Fatherhood - Stop Family Law
Ron Kinner
Honored Contributor

Re: HPUX 11.0: Configuring Mutliple Routes To Multiple Lan Cards

If you just want to add a route then use the route command and change netconf as Frederick suggested. If the gateway you give for the route is on lan3 then it will use lan3.

If your problem is that you want to have a second default gateway for lan3 then HPUX allows you to turn on the strong end-system model in ndd (HPUX 10.3 or later) which is what you need if you insist on having a second default gateway dedicated to lan1. Unfortunately they did not bother to document it anywhere that I can find. The behavior of the Strong End-System Model is discussed in RFC 1122.

http://deesse.univ-lemans.fr:8003/Connected/RFC/1122/62.html

ndd -h ip_strong_es_model says:

Controls support for "Strong End-System Model" described in
RFC1122, Section 3.3.4.2. When enabled, packet source addresses
(and therefore interfaces on a multihomed host) affect selection
of a gateway for outbound packets. Set to 0 to disable; set to 1
to enable. [0,1] Default: 0 (disable)

In order to turn SESM on you have to:

ndd -set /dev/ip ip_strong_es_model 1

or better edit /etc/rc.config.d/nddconf
to add:

TRANSPORT_NAME[0]=ip
NDD_NAME[0]=ip_strong_es_model
NDD_VALUE[0]=1

so it will stay after a reboot.


If HPUX supports the RFC 1122 then it must allow you to assign two default gateways tho again how you do it is not really well defined. I suppose it would simply be the same in /etc/rc.config.d/netconf as defining one default so it would look something like this:

ROUTE_DESTINATION[0]="default"
ROUTE_MASK[0]=""
ROUTE_GATEWAY[0]="192.168.2.1"
ROUTE_COUNT[0]="1"
ROUTE_ARGS[0]=""

ROUTE_DESTINATION[1]="default"
ROUTE_MASK[1]=""
ROUTE_GATEWAY[1]="172.155.23.1"
ROUTE_COUNT[0]="1"
ROUTE_ARGS[0]=""

(IP addresses are from a previous post use your own.)

In your case you would need a default gateway assigned for each interface since the strong model requires it.

I assume the Strong ES Model would figure out which one went with which interface based on the IP addresses.

If you do

ndd -set /dev/ip ip_strong_es_model 1

first then you can probably get it to reread the netconf file with:

ined -c

otherwise you would have to reboot.

You can check whether it is working by doing a traceroute to this system from a device on the other side of the Lan3 router. If the traceroute reports the final address as that of lan3 then it worked if not it will show one of the other interface IPs.

Ron