Operating System - HP-UX
1752708 Members
5828 Online
108789 Solutions
New Discussion юеВ

Re: HPUX 11.00: Configuring "Virtual" IP Address To Single LAN Card

 
SOLVED
Go to solution
LG Porter
Frequent Advisor

HPUX 11.00: Configuring "Virtual" IP Address To Single LAN Card

I would like to assign a "virtual" ip address to a single lan card. What is the correct method or command syntax for this configuration? According to HP Documentation, "ifalias" command is no longer available at release 11.0 however is combined into the "ifconfig" command? Primary IP for lan0 is 192.168.3.4. Virtual IP is 192.168.3.5. Netmask: 255.255.255.0.
9 REPLIES 9
RAC_1
Honored Contributor
Solution

Re: HPUX 11.00: Configuring "Virtual" IP Address To Single LAN Card

ifconfig is the command you have to use for ifalias.

ifconfig lan0:1 192.168.3.5 netmask 255.255.255.0

will assign the ip 192.168.3.5 to lan0:1

Put the appropriate entries in /etc/rc.config.d/netconf to make the changes permanent.

Regards,
There is no substitute to HARDWORK
kish_1
Valued Contributor

Re: HPUX 11.00: Configuring "Virtual" IP Address To Single LAN Card

have you seen following URL might help you http://forums.itrc.hp.com/cm/QuestionAnswer/1,,0xb8c2854994d9d4118fef0090279cd0f9,00.html
share the power of the knowledge
T G Manikandan
Honored Contributor

Re: HPUX 11.00: Configuring "Virtual" IP Address To Single LAN Card

#ifconfig lan0:1 inet 192.168.3.5

This should work.
Here lan0 is the interface card name.


Thanks
Wodisch
Honored Contributor

Re: HPUX 11.00: Configuring "Virtual" IP Address To Single LAN Card

Hi,

to activate:

ifconfig lanX:Y A.B.C.D up

where "lanX" is the device name, "Y" is an (unused) number startinh with 1, and "A.B.C.D" is the IP-address you want to use.

to deactivate:

ifconfig lanX:Y 0.0.0.0

or in other words: the dummy IP-address 0.0.0.0 turns it off.

FWIW,
Wodisch
Oleg Zieaev_1
Regular Advisor

Re: HPUX 11.00: Configuring "Virtual" IP Address To Single LAN Card

HPUX 11.0 and up allows you to assign alias to your lan card, which might be called 'Virtual IP'.
To add alias to interface lan0 enter from root:
ifconfig lan0:1 192.168.3.5 netmask 255.255.255.0 up

specifying netmask in this scenario is optional as your IP is in class C network and subnet 255.255.255.0 is default for class C.

From naming convention we use 'virtual' IPs = real IP + 10 on our site. But this is up to you and your network admins.

Hope this helps,
0leg
Professionals will prevail ...
Sundar_7
Honored Contributor

Re: HPUX 11.00: Configuring "Virtual" IP Address To Single LAN Card


If U have MC-Service/Guard in UR machine, U can also use cmmodnet command to add virtual IP addresses
Learn What to do ,How to do and more importantly When to do ?
Karthik S S
Honored Contributor

Re: HPUX 11.00: Configuring "Virtual" IP Address To Single LAN Card

Hi,

To assign multiple IP,

Ifconfig lan0:1 plumb
Ifconfig lan0:1 x.x.x.x netmask x.x.x.x up
Netstat -nr (shows the second IP bound to lan0:1)

You can add lan0:1 array in netconf file for making the changes permanent.

Rgds,
Karthik
For a list of all the ways technology has failed to improve the quality of life, please press three. - Alice Kahn
Klaus Crusius
Trusted Contributor

Re: HPUX 11.00: Configuring "Virtual" IP Address To Single LAN Card

Hi,

the extra entry in /etc/rc.config.d/netconf would look like:



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

Klaus
There is a live before death!
jessica Koo
Occasional Contributor

Re: HPUX 11.00: Configuring "Virtual" IP Address To Single LAN Card

Hello all,

I'm having a similar problem Configuring "Virtual" IP Address To Single LAN Card, maybe you could provide some insight as well.

1.
Assigned the following VIPs only lan0 card on
localhost(zeus:11.11.20.11):

/etc/hosts
zeus-root IN A 11.11.20.21
zeus-user IN A 11.11.20.22
zeus-oper IN A 11.11.20.23

using both methods;
SAM and command line, ifconfig lan0:1 11.11.20.21 netmask 255.255.255.0 up

But route table shows :
# netstat -nr
11.11.20.21/255.255.255.255 ... 11.11.20.21
11.11.20.11/255.255.255.0 ... 11.11.20.21

And I'm getting errors from starting Apache Server reporting : ...can't resolve "localhost" with netmask
255.255.255.255.

When I open SAM, the netmask is shown to be
255.255.255.0 for 11.11.20.21


I read the following in this forum :
>>The trick is setting up static routes on the host box. I.e., you have to explicitely identify routes from local host to "each of the interfaces", then to each of the networks, and each gateway. Plus you still need to pick one or the other as the true default gateway.

Do I actually need to do and how to do the above ?

Please advice.

THanks in advance,
Jessica
Eternity, eternity,where does thou lead ?