1834800 Members
2637 Online
110070 Solutions
New Discussion

dual hostname

 
Stefano_1
Frequent Advisor

dual hostname

Hi all,
I have a server PA-8500 with HP-UX 11.00.
This server has two lan:
lan0 and lan1.
this two lans are independent.
I need to define two different hostname for every lan0, for example:

lan0 10.192.10.1 /24 server1

lan1 192.168.4.1 /24 server2

How can I define in the /etc/hosts file this two hostname?
Is it possible to do this?


thanks in advance...
4 REPLIES 4
Sanjay_6
Honored Contributor

Re: dual hostname

Hi,

set the two seperate names as aliases.

hope this helps.

thanks
Stefano_1
Frequent Advisor

Re: dual hostname

thanks,...
Is it possible to have the same hostname for the two independent lans?
lan0 10.192.10.1 /24 server1

lan1 192.168.4.1 /24 server1
Sanjay_6
Honored Contributor

Re: dual hostname

Hi,

Yes you can have the same hostname for both the lan, The hostname is set using "set_parms hostname" command. You can set the two ip using sam for lan0 and lan1 and at the time of setting ip, set the aliases as different names if you want. you can then access the systems using the hotname or the aliases.

hope this helps.

thanks
Bill Thorsteinson
Honored Contributor

Re: dual hostname

In the /etc/hosts file the following will lead
to both names being recognized for both cards.

10.192.10.1 server1.mydomain.com server1
10.192.10.1 server2.mydomain.com server2
192.168.4.1 server1.mydomain.com server1
192.168.4.1 server2.mydomain.com server2

In DNS make server2 a CNAME for server1.
Then map server1 to both addresses, and
reverse map both addresses back to server1.
Server1 should be your hostname.