Where is johnboy.local located? How was it created?
Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Where is johnboy.local located? How was it created?
Some how linux has decided that one of the machines on my met (johnboy) is named johnboy.local. (Didn't do that for the other machines on the Network)
Any ideas on Where that value can be found would be appreciated.
Also would like to know why it happpened.
Don't seem to have a LMHOSTs file and it does not appear in /etc/hosts.
Also be nice to know where LMHOSTS should be located.
127.0.0.1 means "local computer". I guess you are using DHCP, in which case the IP you mention is not set by the computer but by the router. That also means that, if you have multiple computers, IP address may change when you reboot. If you need NAT and a fixed IP address, you will need to reconfigure both your router and your OS.
The .local domain name is used by the avahi dns daemon. If you have a computer with the hostname "johnboy", from another machine running zeroconf (MS), avahi (Linux) or rendezvous (Mac) will be able to resolve the IP address of johnboy.local.
The .local domain name is used by the avahi dns daemon. If you have a computer with the hostname "johnboy", from another machine running zeroconf (MS), avahi (Linux) or rendezvous (Mac) will be able to resolve the IP address of johnboy.local.
Thanks for shedding some more light on the issue!
The Linksys router lists johnboy in the dhcpclient list along with its ip address.
/etc/hostname had the entry johnboy.local
if I ping johnboy by name I get Host not found.
If I ping johnboy.local it works
If I ping any other winbox on the net it works with no entry either in hosts or hostnames
So it sounds like avahi has chosen to append .local to johnboy and entered it into hostnames, while ignoring the other machine names on the network.
Found the avahi directory and /etc/avahi/hosts is empty except for the documentation
Can't figure out how the avahi daemon gets fired up with the "running johnboy.local" entry.
So we have "johnboy.local" shows up in /etc/hostnames and /etc/avahi/hosts
Still no file that ties johnboy.local to the dynamic ip address 192.168.1.100
NAME
avahi-set-host-name - Change mDNS host name
SYNOPSIS
avahi-set-host-name host-name
DESCRIPTION
Set the mDNS host name of a currently running Avahi daemon. The effect of this operation is not persistent across daemon restarts. This operation is usu-
ally privileged.
Look at your /etc/resolv.conf and /etc/nsswitch file.
Code:
avahi- dnsconfd(8) avahi-dnsconfd(8)
NAME
avahi-dnsconfd - Unicast DNS server from mDNS/DNS-SD configuration daemon
DESCRIPTION
avahi-dnsconfd connects to a running avahi-daemon and runs the script /etc/avahi/dnsconfd.action for each unicast DNS server that is announced on the
local LAN. This is useful for configuring unicast DNS servers in a DHCP-like fashion with mDNS.
Some NAT routers provide a dns (nameserver) service. Mine doesn't.
The point that I tried to make is that from another linux computer, you may be able to use something like "ping johnboy.local" successfully even if there is no entry for "johnboy" or "johnboy.local" in that computer's /etc/hosts file. Avahi is Linux's version of zeroconf.
Thanks for the help!
I think I am beginning to see it. Avahi is a linux utility that provides DNS service on an isolated network. Since I have only one Linux box on a network connected via a Linksys router which provides the same function for Linux and Windows, I could kill the avahi daemon with no ill effect. Right???
Any thoughts on why avahi has elected to capture Johnboy and append the .local to it while ignoring all other windows machines on the network.
In orther words, what triggers avahi daemom to grab network names and store them in the hostnames file?
No I don't know. I don't run any windows or apple machines on my network. One thing to look at is what ports are open inside vs outside your firewall. E.G. run nmap on the same computer & then from a different computer. You may discover a port that should be opened. Also check if you have an mdns_minimal entry in the hosts: line of /etc/nsswitch.
Can you ping a windows client by using hostname.local? What does "getent hosts <hostname>.local" return. By the way the getent command will also verify if your host can connect to your isp's nameserver. "getent hosts www.google.com".
You will need the avahi daemon running for pulse audio to work.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.