Operating System - HP-UX
1830481 Members
2777 Online
110005 Solutions
New Discussion

How to set an ip-alias address ?

 
Md. Minhaz Khan
Super Advisor

How to set an ip-alias address ?

Hello List,

I have to configure an alias-IP address on a lan-card in addition to the existing one.

Until now , I couldn't find anything in the documentation.
How do i setup the alias-address?

Any help from from the forum would be apreciated.

As far as i know following command can be useful:
#ifconfig lan0:1 ip_address up
but if i want to set it permanently then???

Thanks in advance,
4 REPLIES 4
Robert-Jan Goossens_1
Honored Contributor

Re: How to set an ip-alias address ?

Hello Minhaz,

Have a look at this thread.

http://forums11.itrc.hp.com/service/forums/questionanswer.do?threadId=72711

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

2)
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)

Regards,
Robert-Jan
Mel Burslan
Honored Contributor

Re: How to set an ip-alias address ?

to permanently set up the IP address, real or virtual (or ip-alias as you referred to it) is not different.

edit the file /etc/rc.config.d/netconf

copy a block of lanX definition into a new block (example below)

INTERFACE_NAME[1]=lan1
IP_ADDRESS[1]=14.2.82.21
SUBNET_MASK[1]=255.255.255.0
BROADCAST_ADDRESS[1]=14.2.82.255
INTERFACE_STATE[1]=up
DHCP_ENABLE[1]=0

and make a new block with your ip-alias and new lanX:Y instance as in the example below:

INTERFACE_NAME[2]=lan1:1
IP_ADDRESS[2]=14.2.82.31
SUBNET_MASK[2]=255.255.255.0
BROADCAST_ADDRESS[2]=14.2.82.255
INTERFACE_STATE[2]=up
DHCP_ENABLE[2]=0

Stop and start networking

/sbin/init.d/net stop
/sbin/init.d/net start

or just reboot the machine

this should be it.

On the other hand, if the IP alias is going to be on a different subnet, you have to configure VLAN and talk to your network administrators about trunking this physical interface but it is a matter of a totally separate discussion as it is not called aliasing.

Hope this helps
________________________________
UNIX because I majored in cryptology...
Michal Kapalka (mikap)
Honored Contributor

Re: How to set an ip-alias address ?

Hi,

/etc/rc.config.d/netconf add :

root@hpeos001[] # vi /etc/rc.config.d/netconf

INTERFACE_NAME[0]=lan0

IP_ADDRESS[0]=192.168.0.67

SUBNET_MASK[0]=255.255.255.224

BROADCAST_ADDRESS[0]=""

INTERFACE_STATE[0]=""

DHCP_ENABLE[0]=0



INTERFACE_NAME[1]=lan0:1

IP_ADDRESS[1]=200.200.10.10

SUBNET_MASK[1]=255.255.255.0

BROADCAST_ADDRESS[1]=""

INTERFACE_STATE[1]=""

DHCP_ENABLE[1]=0



INTERFACE_NAME[2]=lan0:2

IP_ADDRESS[2]=150.17.35.100

SUBNET_MASK[2]=255.255.0.0

BROADCAST_ADDRESS[2]=""

INTERFACE_STATE[2]=""

DHCP_ENABLE[2]=0

from the book : HP-UX CSE Official Study Guide and Desk Reference => 15.12 IP Multiplexing

mikap
Md. Minhaz Khan
Super Advisor

Re: How to set an ip-alias address ?

Thanks a lot. I have got my answer

Thanks
Minhaz