1755988 Members
3486 Online
108839 Solutions
New Discussion юеВ

Re: Alias at /etc/hosts

 
Daniel Emir
New Member

Alias at /etc/hosts

Hi, I would like to ask what the impact if I add an alias same as hostname. The real IP for this server is 10.1.54.120.

#vi /etc/hosts

10.1.54.120 s54xy120 s53kpg53
127.0.0.1 localhost loopback

10.1.53.53 s53kpg53 s53kpg53.xxxxx.com

Tq
2 REPLIES 2
Steven Schweda
Honored Contributor

Re: Alias at /etc/hosts

Are you trying to associate the name
"s53kpg53" with two addresses (10.1.54.120
and 10.1.53.53)? This seems to me unwise.

What do you expect the system to do when you
ask about "s53kpg53"?

> The real IP for this server is 10.1.54.120.

So what is 10.1.53.53? The unreal address?

Is there some actual problem which you are
trying to solve?
SKR_1
Trusted Contributor

Re: Alias at /etc/hosts

s53kpg53 name will show only 10.1.54.120 IP as per the /etc/hosts entry.

10.1.54.120 s54xy120 s53kpg53

You dont need to assign two IP for the same hostname.

10.1.53.53 s53kpg53 s53kpg53.xxxxx.com

This entry can be used for short and long names of the server, you can access the server with both names.

Thanks

SKR