Operating System - HP-UX
1844069 Members
2884 Online
110227 Solutions
New Discussion

Distinction between real and virtual hostname

 
Shivkumar
Super Advisor

Distinction between real and virtual hostname

Dear Sirs,

I remember that by putting entries in /etc/hosts or by dns aliasing the unix hostname is identified on some of the unix flavours. I remember on solaris if loghost is entered against the ip/hostname entries in /etc/hosts file it is treated as real hostname of the server and others were treated as virtual hostname.

My question is on hpux how hostname is decided as real ? How to distinguish real hostname with virtual hostname on hpux 11i ?

Thanks,
Shiv
3 REPLIES 3
Mel Burslan
Honored Contributor

Re: Distinction between real and virtual hostname

Shiv,

When you are on any given host, you only reference the host with one single name which is the name returned by command

# uname -n
or
# hostname

when you are trying to reach this system from another location on your network, you can call it with either its hostname or one of the aliases assigned to it. Aliases can be assigned on the remote hosts' /etc/hosts files (provided these are unix hosts) or they can be assigned via DNS. You can assign more than one alias to your system. But this does not change the fact that the servr has only one real name. And when you are working on the host, you reference the real name, not the aliases.


________________________________
UNIX because I majored in cryptology...
Devender Khatana
Honored Contributor

Re: Distinction between real and virtual hostname

Hi,

From man hosts
===========================
/etc/hosts should contain a single line for each host with the following information:



Aliases are other names by which a host is known. They can substitute for the official host name in most commands. For example:

192.45.36.5 hpdxsg testhost

In this example, users can use remote login on hpdxsg by using the command:

rlogin testhost

instead of

rlogin hpdxsg

If your system is in a domain naming environment, an official host name consists of the full domain extended host name. For example:

192.45.36.5 hpdxsg.xsg.hp.com hpdxsg testhost

HTH,
Devender
Impossible itself mentions "I m possible"
Mahesh Kumar Malik
Honored Contributor

Re: Distinction between real and virtual hostname

Hi Shiv

In hp-ux hostname appears in /etc/hosts file. Aliases can be added along with real names in same file. You may call alias as virtual name.

Regards
Mahesh