1752675 Members
5518 Online
108789 Solutions
New Discussion юеВ

IP Address for NIC cards

 
Sarvesh A Dhuri
Advisor

IP Address for NIC cards

How many IP address a system administrator can configure on a single NIC card , I have HP UX 11i operting system (Hardware:- N class server) with two IP addresses mentioned on a single NIC card.
Thanks in advance
I have been betrayed by our own People
8 REPLIES 8
Steven E. Protter
Exalted Contributor

Re: IP Address for NIC cards

How many do you want to configure?

On a practical basis if you are using a class C subnet, the most ip addresses you can configure is limtited by the network configuration.

Class C limit is 253 IP addresses.

I've never tried more than a couple of dozen. This was to provide ssl websites that needed their own ip address.

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
rick jones
Honored Contributor

Re: IP Address for NIC cards

There is no hardcoded limit to the number of IP addresses one can assign to a NIC under HP-UX 11i. There may or may not be practical limits - like the aforementioned number of IPs in a given subnet and the like - presented by your specific situation.
there is no rest for the wicked yet the virtuous have no pillows
Stuart Abramson
Trusted Contributor

Re: IP Address for NIC cards

Am I misunderstanding? I always thought that you could only configure -1- IP address per NIC card...:

INTERFACE_NAME[0]=lan1
IP_ADDRESS[0]=10.96.34.12
SUBNET_MASK[0]=255.255.255.0
BROADCAST_ADDRESS[0]=10.96.34.255
INTERFACE_STATE[0]=up
DHCP_ENABLE[0]=0

Are we saying that I can just keep on configuring IP addresses to the same card?:


INTERFACE_NAME[1]=lan1
IP_ADDRESS[1]=10.96.34.13
...
INTERFACE_NAME[2]=lan1
IP_ADDRESS[2]=10.96.34.14
...

MC/ServiceGuard let's you assign other IP addresses to the same card, so to speak, but you have to buy MC/SG.
Gary L. Paveza, Jr.
Trusted Contributor

Re: IP Address for NIC cards

Stuart,

Yes, you can configure multiple IP addresses for a given NIC. In fact, ServiceGuard relies on this functionality.

For example, I have 2 hosts. Each host has a NIC with a static IP address on it. In addition, each host belongs to a ServiceGuard cluster. In that cluster are two packages - each with it's own static IP address (different than the first two). ServiceGuard actives those IP addresses on the NICs on the physical hosts.

It shows as

lan1 (host address)
lan1:1 (package address)

Note that you do not need S/G to do this.
Geoff Wild
Honored Contributor

Re: IP Address for NIC cards

Shouldn't be a limit on Unix - only the network as others have said.

And yes - multiple ips show as:

lan0
lan0:1
lan0:2

etc...in a netstat -in

Rgds...Geoff

Proverbs 3:5,6 Trust in the Lord with all your heart and lean not on your own understanding; in all your ways acknowledge him, and he will make all your paths straight.
Mark Greene_1
Honored Contributor

Re: IP Address for NIC cards

See the man page for lanscan. If you lanscan -v, you'll see a column labeled NM ID. This is where the number to the right of the colon comes from in the "lan0:1" comes from. See the section in the man page for ifconfig under "IP Index Number".

mark
the future will be a lot like now, only later
Sean OB_1
Honored Contributor

Re: IP Address for NIC cards

Sarvesh,

There is no hard limit on the number of IP's you can configure. I believe the only limit is that they have to be on the same subnet.

You can have a primary and many aliases on a single NIC.

rick jones
Honored Contributor

Re: IP Address for NIC cards

The IPs do not even have to be in the same subnet these days - that was strictly an ancient HP-UX 10.20 limitation.

The point about NM IDs being a possible limiter is a good one to consider. I suppose a search of the include files might be in order, or of the MIB definitions - I believe it comes from the MIB definitions for ifIndex. If it is a short, then we are talking about 32 or 64K IPs. If it is an int then 2G or 4G.
there is no rest for the wicked yet the virtuous have no pillows