1834167 Members
2640 Online
110064 Solutions
New Discussion

Re: IP alias

 
SOLVED
Go to solution
Raymond F
Frequent Advisor

IP alias

How do I set up a persistent IP alias on an interface? I can use ifconfig, but that is not persistent. I tried editing the netconf file, creating lan0:0 and lan0:1, but my system did not like that when I rebooted. I am running HPUX 11.00. Thanks for your help.
1 REPLY 1
Berlene Herren
Honored Contributor
Solution

Re: IP alias

Under 11.0, the ifconfig command can be used to assign multiple IP addresses to the same interface.

ifconfig lan#:0 <1st IP Address> netmask

NOTE: Specifying lan0:0 is equivalent to lan0

ifconfig lan#:1 <2nd IP Address> netmask

The netconf file should look like the following lines:
INTERFACE_NAME[0]="lan0"
IP_ADDRESS[0]=10.10.10.1
SUBNET_MASK[0]=255.255.255.0
BROADCAST_ADDRESS[0]=""
INTERFACE_STATE[0]=""
DHCP_ENABLE[0]=0

INTERFACE_NAME[1]="lan0:1"
IP_ADDRESS[1]=10.10.20.15
SUBNET_MASK[1]=255.255.255.0
BROADCAST_ADDRESS[1]=""
INTERFACE_STATE[1]=""
DHCP_ENABLE[1]=0

re-read netconf
/sbin/init.d/net stop
/sbin/init.d/net start

If this doesn't work, what error messages are you getting?

Berlene
http://www.mindspring.com/~bkherren/dobes/index.htm