LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This 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


Reply
  Search this Thread
Old 04-16-2009, 05:11 PM   #1
john test
Member
 
Registered: Jul 2008
Distribution: ubuntu 9.10
Posts: 527
Blog Entries: 1

Rep: Reputation: 35
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
 
Old 04-16-2009, 05:16 PM   #2
repo
LQ 5k Club
 
Registered: May 2001
Location: Belgium
Distribution: Arch
Posts: 8,529

Rep: Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899
/etc/hostname
 
Old 04-16-2009, 05:17 PM   #3
{BBI}Nexus{BBI}
Senior Member
 
Registered: Jan 2005
Location: Nottingham, UK
Distribution: Mageia 6, KDE Neon
Posts: 4,313

Rep: Reputation: 212Reputation: 212Reputation: 212
Check the entries in network located in your /etc/sysconfig folder.
 
Old 04-16-2009, 05:34 PM   #4
john test
Member
 
Registered: Jul 2008
Distribution: ubuntu 9.10
Posts: 527

Original Poster
Blog Entries: 1

Rep: Reputation: 35
Quote:
Originally Posted by repo View Post
/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?
 
Old 04-16-2009, 05:42 PM   #5
john test
Member
 
Registered: Jul 2008
Distribution: ubuntu 9.10
Posts: 527

Original Poster
Blog Entries: 1

Rep: Reputation: 35
Quote:
Originally Posted by {BBI}Nexus{BBI} View Post
Check the entries in network located in your /etc/sysconfig folder.
I can't seem to find that file or that directory.
 
Old 04-16-2009, 06:09 PM   #6
jay73
LQ Guru
 
Registered: Nov 2006
Location: Belgium
Distribution: Ubuntu 11.04, Debian testing
Posts: 5,019

Rep: Reputation: 133Reputation: 133
Check /etc/hosts
 
Old 04-16-2009, 06:29 PM   #7
john test
Member
 
Registered: Jul 2008
Distribution: ubuntu 9.10
Posts: 527

Original Poster
Blog Entries: 1

Rep: Reputation: 35
Quote:
Originally Posted by jay73 View Post
Check /etc/hosts
'Nothing in /etc/hosts except two ipv4 entries
127.0.0.1 and 127.0.1.1 and the ipv6 stuff
 
Old 04-16-2009, 06:34 PM   #8
jay73
LQ Guru
 
Registered: Nov 2006
Location: Belgium
Distribution: Ubuntu 11.04, Debian testing
Posts: 5,019

Rep: Reputation: 133Reputation: 133
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.
 
Old 04-16-2009, 06:41 PM   #9
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
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.
 
Old 04-16-2009, 07:15 PM   #10
john test
Member
 
Registered: Jul 2008
Distribution: ubuntu 9.10
Posts: 527

Original Poster
Blog Entries: 1

Rep: Reputation: 35
Quote:
Originally Posted by jschiwal View Post
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
 
Old 04-16-2009, 07:22 PM   #11
john test
Member
 
Registered: Jul 2008
Distribution: ubuntu 9.10
Posts: 527

Original Poster
Blog Entries: 1

Rep: Reputation: 35
man avahi No Good
but ps aux | grep avahi shows the avahi daemon running with the johnboy.local showing
 
Old 04-16-2009, 07:53 PM   #12
john test
Member
 
Registered: Jul 2008
Distribution: ubuntu 9.10
Posts: 527

Original Poster
Blog Entries: 1

Rep: Reputation: 35
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
 
Old 04-17-2009, 02:23 AM   #13
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
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.
 
Old 04-17-2009, 08:45 AM   #14
john test
Member
 
Registered: Jul 2008
Distribution: ubuntu 9.10
Posts: 527

Original Poster
Blog Entries: 1

Rep: Reputation: 35
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?
 
Old 04-17-2009, 03:41 PM   #15
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
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.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
NFS Homeshares located on the server instead of local... Vince0000 Linux - Desktop 0 10-05-2007 09:38 PM
Where are these icons located? Thaidog Linux - General 1 06-26-2006 05:07 AM
Connecting to mydomain.com which's located on local network - CANT! ivj Linux - Networking 2 05-19-2006 11:45 PM
where is the gcc located johnnymonk Mandriva 5 06-08-2004 08:09 AM
where is this website located? eaglegst LQ Suggestions & Feedback 6 12-05-2003 07:11 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 06:04 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration