Operating System - HP-UX
1833780 Members
2291 Online
110063 Solutions
New Discussion

How or can I bind multiple ips to a single nic.

 
SOLVED
Go to solution
someone_4
Honored Contributor

How or can I bind multiple ips to a single nic.

Hello everyone

A while back I was trying to bind multiple ips to a single nic. At the time HP told me that they dont support it.

Right now I am running 11i has this changed?

Why would it be a bad idea to bind multiple ips to a nic?

How do i acomplish this?

Thanks
richard

6 REPLIES 6
Sean OB_1
Honored Contributor
Solution

Re: How or can I bind multiple ips to a single nic.

You can give an alias to a nic.

ifconfig lan0:N IP nnn.nnn.nnn.nnn

where N is your alias number:

EX:

ifconfig lan0:1 IP 10.1.24.24

Jeff Schussele
Honored Contributor

Re: How or can I bind multiple ips to a single nic.

Hi Richard,

It's done using a virtual IP. Say lan0 is set to 111.222.111.222 & you want another IP in the same subnet then you'd do the following:

ifconfig lan0:1 111.222.111.223 netmask 255.255.255.0 up

The key is the :X after the lan instance. And yes this is fully supported. They may have been stating that virtual IP out of the original subnet are not supported & I believe that's true.

HTH,
Jeff
PERSEVERANCE -- Remember, whatever does not kill you only makes you stronger!
Alzhy
Honored Contributor

Re: How or can I bind multiple ips to a single nic.

You most certainly can Sire... it's called Virtual IP (or other folks call it multi-homing?).. You can use SAM or manually using ifconfig command..

This the reason why ISP's are able to host many Internet domains on one physical NIC.... Works well in disaster recovery sitautions too where you can lump several servers on to a single server...
Hakuna Matata.
G. Vrijhoeven
Honored Contributor

Re: How or can I bind multiple ips to a single nic.

Hi Richard,

It is possible and supported/needed if you run MC/SG. If you have installed the Mission Critical env. you also have MC/SG licensed and installed. I do not know why you want to add multiple ip-adresses on a interface and how. Do you want them in the same subnet ( vlan config on the switch). Can you give more info.

Gideon
doug mielke
Respected Contributor

Re: How or can I bind multiple ips to a single nic.

We've been forced to do this many times due to old legecy software that had IP addresses hardwired.

The problem we've had is un-doing this once it's been done. Unless we're willing to reset every piece of network gear, we can never be sure the ip/arp mapping is not cached somewhere, and then....

months later, some network guy resets a piece of gear, and I lose connection to some server object out there, and realizing that this is caused by removing an address months before, does not occur to us. It has bitten up painfully.
Chris Watkins_1
Respected Contributor

Re: How or can I bind multiple ips to a single nic.

Doug, it's easy to get bitten that way.
I try to always make sure I enter these addresses into
the netconf file when adding them, and remove them when
I'm through. Adding them helps me make sure we don't have a
reboot cause us any troubles... and I don't remove them from
netconf until I've done "ifconfig lanX:X 0.0.0.0"
(Followed by ifconfig "lanX:X down" if needed. Usually not.)

Simply doing the "ifconfig lanX:X down" doesn't always help.


Didn't mean to hijack your thread, Richard.
In case you were interested in making such aliased IP's
persistent across reboots... simply add the entries in the
/etc/rc.config.d/netconf file following the same format. ie...

INTERFACE_NAME[0]=lan2
IP_ADDRESS[0]=10.10.2.55
SUBNET_MASK[0]="0xffff0000"
BROADCAST_ADDRESS[0]=10.10.255.255
ETC[0]...

INTERFACE_NAME[1]=lan2:1
IP_ADDRESS[1]=10.10.2.56
SUBNET_MASK[1]="0xffff0000"
BROADCAST_ADDRESS[1]=10.10.255.255
ETC[1]...
Not without 2 backups and an Ignite image!