LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Where is johnboy.local located? How was it created? (https://www.linuxquestions.org/questions/linux-newbie-8/where-is-johnboy-local-located-how-was-it-created-719678/)

john test 04-16-2009 05:11 PM

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.

TIA

repo 04-16-2009 05:16 PM

/etc/hostname

{BBI}Nexus{BBI} 04-16-2009 05:17 PM

Check the entries in network located in your /etc/sysconfig folder.

john test 04-16-2009 05:34 PM

Quote:

Originally Posted by repo (Post 3511527)
/etc/hostname

Thank you!
I see it there. It does not seem to have an IP address associated with it in the hostname file.

Do you know how it is associated with 192.168.1.100?

john test 04-16-2009 05:42 PM

Quote:

Originally Posted by {BBI}Nexus{BBI} (Post 3511529)
Check the entries in network located in your /etc/sysconfig folder.

I can't seem to find that file or that directory.

jay73 04-16-2009 06:09 PM

Check /etc/hosts

john test 04-16-2009 06:29 PM

Quote:

Originally Posted by jay73 (Post 3511562)
Check /etc/hosts

'Nothing in /etc/hosts except two ipv4 entries
127.0.0.1 and 127.0.1.1 and the ipv6 stuff

jay73 04-16-2009 06:34 PM

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.

jschiwal 04-16-2009 06:41 PM

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.

john test 04-16-2009 07:15 PM

Quote:

Originally Posted by jschiwal (Post 3511588)
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.

Any thoughts

john test 04-16-2009 07:22 PM

man avahi No Good
but ps aux | grep avahi shows the avahi daemon running with the johnboy.local showing

john test 04-16-2009 07:53 PM

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

jschiwal 04-17-2009 02:23 AM

Code:

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.

john test 04-17-2009 08:45 AM

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?

jschiwal 04-17-2009 03:41 PM

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.


All times are GMT -5. The time now is 07:30 PM.