Operating System - HP-UX
1832885 Members
2504 Online
110048 Solutions
New Discussion

Re: How to add a second ip address in my HP-UX?

 
Mario Rodriguez
New Member

How to add a second ip address in my HP-UX?

Hello!!
I have a problem.
I want to put a second IP address in my server in order to be accessed by another network. I have hp-ux 10.20 in the server.
I think what I'm trying to do is possible, isn't it?
I've tried with the "ifconfig" command but the only I've reached is to change my ip address in order to add another one.

Thank you.
Mario.
10 REPLIES 10
Sanjay_6
Honored Contributor

Re: How to add a second ip address in my HP-UX?

Victor BERRIDGE
Honored Contributor

Re: How to add a second ip address in my HP-UX?

Hi,
To a different network will be possible if you have 2 cards (2 lan interfaces) in your box...

All the best

Victor
Kevin Wright
Honored Contributor

Re: How to add a second ip address in my HP-UX?

You need to set up ipaliasing, and have a virtual interface on your card. Every flavor of unix does this alittle different, but man ifconfig should help you..
netstat -nr to get lan0 or INT name.
ifconfig lan0:1 up
ifconfig lan0:1
this should do it.
Denver Osborn
Honored Contributor

Re: How to add a second ip address in my HP-UX?

If you need to assign two different networks on the same NIC the box would need to be at 11.0. With 10.20 (I think a patch is needed) you can do it but the IPs will be on the same net.

(search key word(s): multicasting)

Hope this helps
-denver

Anthony deRito
Respected Contributor

Re: How to add a second ip address in my HP-UX?

If all you want to do is assign a second IP to your interface then use an aliase IP. Install patch PHNE_12492. It will place a copy of ifalias in /usr/contrib/bin. Note... this would be if you only want to create an alias to your existing card... it has nothing to do with routing.

Tony
Mario Rodriguez
New Member

Re: How to add a second ip address in my HP-UX?

Hi!!
First of all I want to thank all of you for your responses. I'm going to try to explain better my problem.

I have one server (with only one LAN Card) with a network with some PC's with its IP addresses. I'm going to add a new server that needs to change the IP addresses of the new network. Here is the problem, I have some PC's that have to work in both servers but I have to put in these PC's one IP of the new range. So I have to give the old server a second IP of the new range in order to be accessible from both networks, the old one and the new one.

I hope this clears a little my problem for all of you.

Please can you tell me something about my problem?

Thank you for all.
Mario.

P.D. Sorry if my English is not very good.
Bruno DESQUESNE
Advisor

Re: How to add a second ip address in my HP-UX?

Hi Mario,

We had the same problem and found for HPUX 10.20 the command "ifalias".

For example :
/usr/contrib/bin/ifalias lan1 add 141.189.55.181

where lan1 as already its original IP address at 141.189.55.144.

Hope this help

Regards
Lalo_Weng
Advisor

Re: How to add a second ip address in my HP-UX?

Try this:
1. ifconfig lan0:1 inet
2. edit /etc/rc.config.d/netconf to add this portion as a new interface.
Keep finding is the way.
Santosh Nair_1
Honored Contributor

Re: How to add a second ip address in my HP-UX?

As mentioned previously, this can be done using the ifalias command in HPUX 10.20 (introduced through patch PHNE_12492), i.e.

/usr/contrib/bin/ifalias lan1 add 192.168.0.2
-Santosh
Life is what's happening while you're busy making other plans
Krishna Prasad
Trusted Contributor

Re: How to add a second ip address in my HP-UX?

Hello,

Sorry if I am off base with this.

But do your devices use a default router?

Wouldn't you be able to get to both networks if you set up a default router for both networks and the routers had routes to the other network?

Is the problem that you are not using a router?
Positive Results requires Positive Thinking