Operating System - HP-UX
1827459 Members
4246 Online
109965 Solutions
New Discussion

ifalias? Need to add 2nd IP Address?

 
Declan Mc Kay
Occasional Advisor

ifalias? Need to add 2nd IP Address?

I have recently installed HP-UX11i and it doesn't seem to contain the 'ifalias' program which normally allows you to assign multiple IP-Address's to the one Interface. On my UX10.20 systems it's located in /usr/contrib/bin. Is this done differently on UX11i. I have searched for 'ifalias' and it doesn't seem to exist?
4 REPLIES 4

Re: ifalias? Need to add 2nd IP Address?

Declan,

It's all built in to the ifconfig command now. Have a look at the man page for ifconfig.

e.g. to bind another IP address onto lan0

ifconfig lan0:1 10.10.10.2 netmask 255.255.255.0 up

HTH

Duncan

I am an HPE Employee
Accept or Kudo
Michael Steele_2
Honored Contributor

Re: ifalias? Need to add 2nd IP Address?

From command line:

ifconfig lan0:0 inet 18.2.2.2
ifconfig lan0:1 inet 18.3.3.3

For /etc/rc.config.d/netconf

INTERFACE_NAME[0]=lan0
IP_ADDRESS[0]=18.2.2.2
SUBNET_MASK[0]=255.0.0.0
INTERFACE_STATE[0]=up

INTERFACE_NAME[1]=lan0:1
IP_ADDRESS[1]=18.3.3.3
SUBNET_MASK[1]=255.0.0.0
INTERFACE_STATE[1]=up


Support Fatherhood - Stop Family Law
KCS_1
Respected Contributor

Re: ifalias? Need to add 2nd IP Address?

hi,
follow under of ifconfig command.

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

open/edit this file if, you wanna got permanent ip setting /etc/rc.config.d/netconf

(ip address lan0:0 -> 10.10.10.1 , lan0:1 -> 10.10.10.15)

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

have a good day!
Easy going at all.
Michael Steele_2
Honored Contributor

Re: ifalias? Need to add 2nd IP Address?

Just noticed a typo:

INTERFACE_NAME[0]=lan0

INTERFACE_NAME[0]=lan0:0
Support Fatherhood - Stop Family Law