Operating System - HP-UX
1834643 Members
3427 Online
110069 Solutions
New Discussion

need 2 functional NIC's on an HPUX machine

 
Ahmed_41
Super Advisor

need 2 functional NIC's on an HPUX machine

Dear All,
i have an HPUX machine with 2 NIC's, Lan0 is already configured with IP, Lan1 is not yet configured.
i need to do the following scenario, i need to be able to make lan1 functional using a different IP of lan0 and different gateway than that of lan0, and to start some services using this IP.
i was thinking of a script to do the following steps
1- ifconfig for lan1
2- configure the gateway for lan1
3- start the services i need to use with lan1

sooo do you think this is right ?? and how to do it ??
for example, i think of having "netconf" file with lan0 configuration, and another "netconf.old" for example with lan1 config, and when i need to enable and switch the configuration to lan1 i would rename and switch the files.
so do you think that these steps would do it ?? or the idea itself is nonacceptable ??
and in this case how to use both NIC's on the same machine to start services that bind on a specific IP like (OPENVIW NNM) on a specific IP


Thanks in advance

5 REPLIES 5
Chris Vail
Honored Contributor

Re: need 2 functional NIC's on an HPUX machine

Don't make this too hard. Use SAM. As long as the NICs are on the same network, you won't have any problems. Two NICs on the same network will bollox up the works: don't do it.

I'm a firm believer in the command line, but SAM does have some benefits. Use them.


Chris
Ahmed_41
Super Advisor

Re: need 2 functional NIC's on an HPUX machine

Chris
i dont think sam will be good for me since i need to use this in a script, so i will have to go for commands

second the NICS will not be on the same network, for example, 10.100.100.1 and 10.101.101.1

sooo they will not be on the same network
Biswajit Tripathy
Honored Contributor

Re: need 2 functional NIC's on an HPUX machine

If you want lan1 to be configured always, the best
way to do this is to add an entry in
/etc/rc.config.d/netconf. Any time you don't
want lan1 to be up, you could just unplumb
it by :

# ifconfig lan1 down
# ifconfig lan1 unplumb

I don't think having 2 netconf files is a good idea;
everytime you want to switch, you need to bring
down the networking (and terminate all networking
connections with it).

Any service that's running on the system would
probably bind to all interfaces. If you want to
allow specific IP addresses to access your service,
use IPFilter system firewall to control connections.

- Biswajit
:-)
bhoopathi_1
Frequent Advisor

Re: need 2 functional NIC's on an HPUX machine

Having two netconf is not advicable. Instead you can have to entries for the 2NICs in the netconf file :
INTERFACE_NAME[0]=lan0
IP_ADDRESS[0]=10.100.100.1
SUBNET_MASK[0]=
BROADCAST_ADDRESS[0]=
DHCP_ENABLE[0]=0

INTERFACE_NAME[1]=lan1
IP_ADDRESS[1]=10.101.101.1
SUBNET_MASK[1]=
BROADCAST_ADDRESS[1]=
DHCP_ENABLE[1]=0

For the first time you may have to use ifconfig and plumb the second NIC also. Everytime after that (when the machine reboots) its automatically taken care.
rick jones
Honored Contributor

Re: need 2 functional NIC's on an HPUX machine

You can configure the IP, but you may have an issue trying to establish two default routes. If your setup supports proxy arp, then you can _probably_ get most of multiple default routes with using the local IPs as default routes and setting ip_strong_es_model.

Don't set the broadcast address to the gateway address.
there is no rest for the wicked yet the virtuous have no pillows