Operating System - HP-UX
1834395 Members
2038 Online
110066 Solutions
New Discussion

Re: How to bind two IPs in the same subnet to a single NIC w/o using MC/SG

 
Oliver Tian
Occasional Advisor

How to bind two IPs in the same subnet to a single NIC w/o using MC/SG

Can anyone tell me how to bind two IPs in the same subnet to a single NIC without using MC/ServiceGuard?

One IP is static and configured in netconf file, the second IP is dynamic or relocatable.

Thanks.

Oliver
Oracle DBA
5 REPLIES 5
Sundar_7
Honored Contributor

Re: How to bind two IPs in the same subnet to a single NIC w/o using MC/SG

Hi Oliver,

If 11.x then use ifconfig

ifconfig lan0:1 netmask

you can use lanX:Y where Y can be 1 to 255

If 10.x then use ifalias.

Sundar.
Learn What to do ,How to do and more importantly When to do ?
RAC_1
Honored Contributor

Re: How to bind two IPs in the same subnet to a single NIC w/o using MC/SG

ifconfig lan1 "ip_address" -- /etc/rc.config.d/netconf file details.

ifconfig lan1:1 -- to assign another ip address. Called virtual ip.

Anil
There is no substitute to HARDWORK
Oliver Tian
Occasional Advisor

Re: How to bind two IPs in the same subnet to a single NIC w/o using MC/SG

Thank you all for the quick response. It works great!!!

Oracle DBA
Tim D Fulford
Honored Contributor

Re: How to bind two IPs in the same subnet to a single NIC w/o using MC/SG

Hi

There are a few qwerks in doing what you have asked..

1 - routing out. If the two IP addesses are within the same subnet (this is supported) then you will ONLY route out of the lowest interface e.g.
lan0 193.164.192.200
lan0:1 193.164.192.201

2 - If the two IP's are NOT on the same subnet HP do NOT support it. However I've got it to work fine, but I suspect there may be problems with various hubs etc... The routing out problem is now avoided e.g.
lan0 193.164.192.200
lan0:1 172.16.8.200

Regards

Tim
-
Sarvesh A Dhuri
Advisor

Re: How to bind two IPs in the same subnet to a single NIC w/o using MC/SG

Hi

you can do that by creating subinterfaces on lan card ifconfig lan0:1 ,
But the best way to do this thing use SAM and you will find the option to assing multiple IP adress on a single lan card
I have been betrayed by our own People