Operating System - HP-UX
1833775 Members
3205 Online
110063 Solutions
New Discussion

Bind Two IP Addresses To One NIC (lan0)

 
SOLVED
Go to solution
Karim Manji
Occasional Advisor

Bind Two IP Addresses To One NIC (lan0)

Hi,

Is is possible to address one nic (lan0) with two IP addresses belonging to different subnets. I have been able to do this on the IRIX platform. I am hoping to do this without having to add a second NIC card (lan1).

I was not able to find any specfic treads on this.

Thanks,
KM
5 REPLIES 5
harry d brown jr
Honored Contributor

Re: Bind Two IP Addresses To One NIC (lan0)

Yes, but you only can have one default gateway.

live free or die
harry
Live Free or Die
Sanjay_6
Honored Contributor
S.K. Chan
Honored Contributor

Re: Bind Two IP Addresses To One NIC (lan0)

You can do this on a 11.x system

# ifconfig lan0:0 netmask
# ifconfig lan0:1 <2nd IP Address> netmask

The /etc/rc.config.d/netconf file ..

INTERFACE_NAME[0]="lan0:0"
IP_ADDRESS[0]=10.10.10.1
SUBNET_MASK[0]=255.255.248.0
BROADCAST_ADDRESS[0]=""
INTERFACE_STATE[0]=""
DHCP_ENABLE[0]=0
INTERFACE_NAME[1]="lan0:1"
IP_ADDRESS[1]=10.10.10.15
SUBNET_MASK[1]=255.255.248.0
BROADCAST_ADDRESS[1]=""
INTERFACE_STATE[1]=""
DHCP_ENABLE[1]=0
Karim Manji
Occasional Advisor

Re: Bind Two IP Addresses To One NIC (lan0)

Thank you so much for an answer and solution. I understand that I can only have one gateway (makes sense). I quickly fixed the issue I was having from S.K response, and then looked the links provided by Sanjay.

Thanks again,
KM
Kristopher March
Regular Advisor

Re: Bind Two IP Addresses To One NIC (lan0)

What are the benefits of doing this?

I have two 10/100 copper cards and I'm thinking that this would improve system performance somewhat. Currently, only one card is in use.

I'm running a 2250 V Class.
"This ain't no burger flippin job!"