# [SOLVED] Avahi - now what?

## pigeon768

So I set avahi up, because I'm sick of attempting to maintain a herd of host.conf files on my 3 different systems on a network with a dhcp server that insists on giving me a different IP each and every time I logon. And it works. I can type 'avahi-browse -atr' and it gives me a list of hosts, services, and ip addresses of what's on the network, so now I don't have to nmap or login and ifconfig to get find ip addresses, and it's less error prone. And it's great.

The question is, how do I go about using all that dns info in a more transparent manner? How can I ssh to my laptop with 'ssh eee.local'? How can I mount my cifs share with 'mount -t cifs \\\\media-server\\share /mnt/media'?

edit: I don't control the dhcp server. I know setting the dhcp server up in a sane fashion is the correct solution, but I can't, unfortunately.Last edited by pigeon768 on Tue Feb 09, 2010 8:01 am; edited 1 time in total

----------

## gerdesj

I'm not a expert here but have you enabled Avahi support in the applications that support it?  ie USE=avahi and recompile all apps that use it (emerge --deep --newuse world.)

Cheers

Jon

----------

## salahx

In additional to Avahi, you also need nss-mdns. And you'll need to modify /etc/nsswitch.conf too. Be very careful editing this file, as you can lock yourself out of the machine.

----------

## pigeon768

 *salahx wrote:*   

> In additional to Avahi, you also need nss-mdns. And you'll need to modify /etc/nsswitch.conf too. Be very careful editing this file, as you can lock yourself out of the machine.

  Yup, this fixed it - thanks. Changed:

```
hosts:          files dns
```

to:

```
hosts:          files mdns4_minimal [NOTFOUND=return] dns mdns4
```

----------

