1833813 Members
3494 Online
110063 Solutions
New Discussion

Add an alias IP on HP-UX

 
SOLVED
Go to solution
Adam Garsha
Valued Contributor

Add an alias IP on HP-UX

If I need to add an alias IP address on HP-UX, is this how I would do it (assume the card already has 2 other IP's attached) :

# (1) edit /etc/rc.config.d/netconf
# add these lines:

INTERFACE_NAME[3]=lan9:3
IP_ADDRESS[3]=X.Y.Z.A
SUBNET_MASK[3]=255.255.255.0
BROADCAST_ADDRESS[3]=X.Y.Z.255
INTERFACE_STATE[3]=up

# (2) attach the new IP manually (netconf is used at boot time)

ifconfig lan9:3 X.Y.Z.A netmask 255.255.255.0 up
7 REPLIES 7
baiju_3
Esteemed Contributor

Re: Add an alias IP on HP-UX


Hi Adam Garsha,

You are Correct.

Thanks.
BL.
Good things Just Got better (Plz,not stolen from advertisement -:) )
Mel Burslan
Honored Contributor
Solution

Re: Add an alias IP on HP-UX

Your assumptions are correct. Just make sure all your ip addresses are in the same subnet for this new virtual IP address to work.
________________________________
UNIX because I majored in cryptology...
Adam Garsha
Valued Contributor

Re: Add an alias IP on HP-UX

Are you sure that the virtual IP's need to be on the same subnet?
HGN
Honored Contributor

Re: Add an alias IP on HP-UX

Hi

What Lalb & Mel mentioned are true the important thing is that the IP has to be on the same subnet,hope you know this already.

Rgds

HGN
Mel Burslan
Honored Contributor

Re: Add an alias IP on HP-UX

Think about it for a second. If it is not on the same subnet, how will the same physical network switch port is going to handle this IP address ? How will the packets coming out of this port will be routed ? And you will see the answer to your question yourself.

Very basic networking knowledge. No need to be a Cisco whiz.
________________________________
UNIX because I majored in cryptology...
Adam Garsha
Valued Contributor

Re: Add an alias IP on HP-UX

Thanks all. What confused me is the documentation that stated you can have virtual IP's from multiple subnets attached to a single interface. I didn't stop to think how it would actually work.

Can you think of a reason why you would ever want or be able to make use of multiple subnetted virtual IP's attached to a single interface? If not, then should the tools stop you?

If you did alias a virtual IP from a different subnet to an interface that already contained multiple active/functioning virtual IP's from a single subnet what would happen?

Would all packets that go out the interface be hopelessly lost? i.e. no outgoing traffic? what would outgoing connections use for the source IP? the lowest lan9 IP or would they take on the higher lan9:3 IP for the source?

Very curious and sorry for asking dumb questions, I am just very curious.
Adam Garsha
Valued Contributor

Re: Add an alias IP on HP-UX

If you did alias a virtual IP from a different subnet to an interface that already contained multiple active/functioning virtual IP's from a single subnet what would happen?

Would all packets that go out the interface be hopelessly lost? i.e. no outgoing traffic? what would outgoing connections use for the source IP? the lowest lan9 IP or would they take on the higher lan9:3 IP for the source?

Very curious and sorry for asking dumb questions, I am just very curious.