I have a network which connects a couple of hosts.
I would like to be able to reach other hosts from one of them using the hostname.
I just discovered the ".local" domain, which is available through avahi and /etc/nsswitch.conf.
But it's not set up this way on my servers.
And I don't want to create an entry in my dns server.
Is there an other way to do so ?
|
|
||||
|
Your /etc/nsswitch.conf should already have this for mDNS (avahi):
Just install
|
|||||
|
|
An alternative is to add an entry in your /etc/hosts file. An entry takes the form If you do that, you can now for example |
|||
|
|
I found another solution.
Using the file, This solution look nice, but i don't know if the every machine which use the same dns will see my "server1" hostname. Another bad side to this solution, i need to specify the hostname here and in the I just know that this file ( |
|||
|
|
|
You can let dynamic DHCP add the entry in DNS, instead of yourself. |
|||||
|

/etc/nsswitch.conffor how to configure it. – ulidtko Jan 28 '11 at 22:23