Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I use Calibre to manage my ebooks.

Caibre has a server option, which I can access on my Ubuntu 12.10 machine through the link: http://my_computer_name:8080 or through http://my_IP_address:8080.

On another machine on the local network, I can access the server through the IP address but not through the computer name. Since the IP address changes every time I connect, I wish to be able to connect through the computer name.

How do I go about it?

Some information:

There's a router which manages my network but I do not have much information on it, since I'm not administrator of the network. However, both machines are on the same local network.

cat /etc/hostname gives username-computer-name

avahi-resolve --name username-computer-name.local gives something like this: username-computer-name.local ff70::465d:57ef:fed5:dd46. (What is this?)

avahi-resolve -n username-computer-name.local gives my my IP address, the one assigned by the router.

ping username-computer-name gives: 64 bytes from username-computer-name ( icmp_req=1 ttl=64 time=0.017 ms but my IP address accessible through the network is not but I can successfully ping the latter address as well.

share|improve this question
1) the avahi-resolve syntax you're using is wrong (missing --name). 2) avahi-resolve will use IPv6 link-local whereas Ubuntu is configured to use regular IPv4 addresses (as shown in my answer) 3) Don't use avahi-resolve as it's not the same as resolving in other applications. Use ping for example instead. – gertvdijk Feb 1 '13 at 11:18

Ubuntu has link-local multicast DNS enabled by default using Avahi. This is a short version of my answer on pretty much the same question on UL. This is a way completely independent on how your local network was set up, so this should work in most cases, even if you're not using a local DNS server on the machines.

I'm assuming both hosts here are in the same LAN (layer 2 network segment). In most set ups there's just one of it in a home network and both wireless and wired are connected at layer 2.

Suppose one host is called host1 and the other host2, then you should be able to talk to each other using host1.local and host2.local. That's it.

But, how does this relate to regular name resolving? .local is "special" and your Ubuntu system is configured to try mDNS as well:

cat /etc/nsswitch.conf
hosts:          files mdns4_minimal [NOTFOUND=return] dns mdns4

Check your hostname configuration in /etc/hostname for this. It should be a single word and you've assigned it during the installation of Ubuntu.

share|improve this answer
This does not work on my system. Any clues how to diagnose? – To Do Feb 19 '13 at 22:58

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.