Fedora name resolution
-
Same command as on Windows...
nslookup sitename
That'll tell us what it is "doing."
-
If it's a .local domain, edit the
avahi-daemon.conf
file:Un-comment the following line, and add a . (dot) infront of local:
domain-name=.local
Then restart network or reboot.
-
@obsolesce said in Fedora name resolution:
is it a .local domain?
No, I nuked that localhost.localdomain and changed it to just a hostname, hpfed.
-
@scottalanmiller said in Fedora name resolution:
Welcome to Linux.
Are you maybe not using DHCP?
No I'm using DHCP.
-
@obsolesce said in Fedora name resolution:
If it's a .local domain, edit the
avahi-daemon.conf
file:Un-comment the following line, and add a . (dot) infront of local:
domain-name=.local
Then restart network or reboot.
Why not edit
/etc/nsswitch.conf
instead?
https://ask.fedoraproject.org/en/question/90486/cannot-resolve-local-domain-name-on-fedora-23/?answer=90625#post-id-90625Change...
hosts: files mdns4_minimal [NOTFOUND=return] dns myhostname
To...
hosts: files dns mdns4_minimal [NOTFOUND=return] myhostname
-
@scottalanmiller said in Fedora name resolution:
Same command as on Windows...
nslookup sitename
That'll tell us what it is "doing."
If I go "nslookup hostname" I get told that there is no entry for 'hostname' in DNS which looks correct.
-
Your DNS settings are kept in a file called /etc/resolv.conf, you'll want it to look something like this...
nameserver 1.1.1.1 nameserver 1.0.0.1
-
@black3dynamite said in Fedora name resolution:
@obsolesce said in Fedora name resolution:
If it's a .local domain, edit the
avahi-daemon.conf
file:Un-comment the following line, and add a . (dot) infront of local:
domain-name=.local
Then restart network or reboot.
Why not edit
/etc/nsswitch.conf
instead?
https://ask.fedoraproject.org/en/question/90486/cannot-resolve-local-domain-name-on-fedora-23/?answer=90625#post-id-90625Change...
hosts: files mdns4_minimal [NOTFOUND=return] dns myhostname
To...
hosts: files dns mdns4_minimal [NOTFOUND=return] myhostname
I wasn't aware of that option.
Can you tell me why one solution is better than the other or why one is worse than the other?
-
@scottalanmiller said in Fedora name resolution:
Your DNS settings are kept in a file called /etc/resolv.conf, you'll want it to look something like this...
nameserver 1.1.1.1 nameserver 1.0.0.1
If he has to do that something is wrong. Otherwise, won't he need to change that every time he connects to a different LAN?
I ran in to that issue before. A reboot solved it, rather than having to manually enter nameservers.
-
@siringo said in Fedora name resolution:
@scottalanmiller said in Fedora name resolution:
Same command as on Windows...
nslookup sitename
That'll tell us what it is "doing."
If I go "nslookup hostname" I get told that there is no entry for 'hostname' in DNS which looks correct.
You are doing hostname, not FQDN?
-
If searching for a hostname, do you have a "search" option in /etc/resolv.conf ?
-
@obsolesce said in Fedora name resolution:
@black3dynamite said in Fedora name resolution:
@obsolesce said in Fedora name resolution:
If it's a .local domain, edit the
avahi-daemon.conf
file:Un-comment the following line, and add a . (dot) infront of local:
domain-name=.local
Then restart network or reboot.
Why not edit
/etc/nsswitch.conf
instead?
https://ask.fedoraproject.org/en/question/90486/cannot-resolve-local-domain-name-on-fedora-23/?answer=90625#post-id-90625Change...
hosts: files mdns4_minimal [NOTFOUND=return] dns myhostname
To...
hosts: files dns mdns4_minimal [NOTFOUND=return] myhostname
I wasn't aware of that option.
Can you tell me why one solution is better than the other or why one is worse than the other?
nsswitch defines the default order to look for information. Thats where you define user, group, sudo, DNS, etc lookups.
-
A couple things. As @scottalanmiller pointed out, make sure to check your /etc/resolve.conf. That gives you the DNS servers and search domain to query. If all of that lines up, then I would check your /etc/nsswitch.conf file and make sure dns is after files.
-
@obsolesce said in Fedora name resolution:
@black3dynamite said in Fedora name resolution:
@obsolesce said in Fedora name resolution:
If it's a .local domain, edit the
avahi-daemon.conf
file:Un-comment the following line, and add a . (dot) infront of local:
domain-name=.local
Then restart network or reboot.
Why not edit
/etc/nsswitch.conf
instead?
https://ask.fedoraproject.org/en/question/90486/cannot-resolve-local-domain-name-on-fedora-23/?answer=90625#post-id-90625Change...
hosts: files mdns4_minimal [NOTFOUND=return] dns myhostname
To...
hosts: files dns mdns4_minimal [NOTFOUND=return] myhostname
I wasn't aware of that option.
Can you tell me why one solution is better than the other or why one is worse than the other?
Has long as dns is after files in the hosts: section in nsswitch.conf file, utilities like nslookup should work correctly.
-
@stacksofplates said in Fedora name resolution:
A couple things. As @scottalanmiller pointed out, make sure to check your /etc/resolve.conf. That gives you the DNS servers and search domain to query. If all of that lines up, then I would check your /etc/nsswitch.conf file and make sure dns is after files.
I notice with a clean install of Fedora 28, the nsswitch.conf is auto created and manage by authselect instead authconfig.
https://fedoraproject.org/wiki/Changes/AuthselectAsDefaultThe settings in the nsswitch.conf file is different too.
# Generated by authselect on Fri May 11 18:52:54 2018 # Do not modify this file manually. passwd: sss files systemd group: sss files systemd netgroup: sss files automount: sss files services: sss files sudoers: files shadow: files ethers: files netmasks: files networks: files protocols: files rpc: files hosts: files dns myhostname aliases: files nisplus bootparams: nisplus [NOTFOUND=return] files publickey: nisplus ~
By default the order for hosts is now
files, dns, myhostname
instead ofhosts: files mdns4_minimal [NOTFOUND=return] dns myhostname
from the previous Fedora releases. -
@black3dynamite said in Fedora name resolution:
@obsolesce said in Fedora name resolution:
@black3dynamite said in Fedora name resolution:
@obsolesce said in Fedora name resolution:
If it's a .local domain, edit the
avahi-daemon.conf
file:Un-comment the following line, and add a . (dot) infront of local:
domain-name=.local
Then restart network or reboot.
Why not edit
/etc/nsswitch.conf
instead?
https://ask.fedoraproject.org/en/question/90486/cannot-resolve-local-domain-name-on-fedora-23/?answer=90625#post-id-90625Change...
hosts: files mdns4_minimal [NOTFOUND=return] dns myhostname
To...
hosts: files dns mdns4_minimal [NOTFOUND=return] myhostname
I wasn't aware of that option.
Can you tell me why one solution is better than the other or why one is worse than the other?
Has long as dns is after files in the hosts: section in nsswitch.conf file, utilities like nslookup should work correctly.
Un-commenting the .local line in the other file seems to do the job just fine. Still not seeing any advantages to doing it the other way, or disadvantages to keep doing it how I am.
-
@obsolesce said in Fedora name resolution:
@black3dynamite said in Fedora name resolution:
@obsolesce said in Fedora name resolution:
@black3dynamite said in Fedora name resolution:
@obsolesce said in Fedora name resolution:
If it's a .local domain, edit the
avahi-daemon.conf
file:Un-comment the following line, and add a . (dot) infront of local:
domain-name=.local
Then restart network or reboot.
Why not edit
/etc/nsswitch.conf
instead?
https://ask.fedoraproject.org/en/question/90486/cannot-resolve-local-domain-name-on-fedora-23/?answer=90625#post-id-90625Change...
hosts: files mdns4_minimal [NOTFOUND=return] dns myhostname
To...
hosts: files dns mdns4_minimal [NOTFOUND=return] myhostname
I wasn't aware of that option.
Can you tell me why one solution is better than the other or why one is worse than the other?
Has long as dns is after files in the hosts: section in nsswitch.conf file, utilities like nslookup should work correctly.
Un-commenting the .local line in the other file seems to do the job just fine. Still not seeing any advantages to doing it the other way, or disadvantages to keep doing it how I am.
Only disadvantage or more of an inconvenience that I can see, is that you would have to keep changing the domain name because of each network uses a different domain like .local, .lan, or .home.
But I don't see anything wrong with un-commenting domain-name=local
-
@black3dynamite said in Fedora name resolution:
@obsolesce said in Fedora name resolution:
@black3dynamite said in Fedora name resolution:
@obsolesce said in Fedora name resolution:
@black3dynamite said in Fedora name resolution:
@obsolesce said in Fedora name resolution:
If it's a .local domain, edit the
avahi-daemon.conf
file:Un-comment the following line, and add a . (dot) infront of local:
domain-name=.local
Then restart network or reboot.
Why not edit
/etc/nsswitch.conf
instead?
https://ask.fedoraproject.org/en/question/90486/cannot-resolve-local-domain-name-on-fedora-23/?answer=90625#post-id-90625Change...
hosts: files mdns4_minimal [NOTFOUND=return] dns myhostname
To...
hosts: files dns mdns4_minimal [NOTFOUND=return] myhostname
I wasn't aware of that option.
Can you tell me why one solution is better than the other or why one is worse than the other?
Has long as dns is after files in the hosts: section in nsswitch.conf file, utilities like nslookup should work correctly.
Un-commenting the .local line in the other file seems to do the job just fine. Still not seeing any advantages to doing it the other way, or disadvantages to keep doing it how I am.
Only disadvantage or more of an inconvenience that I can see, is that you would have to keep changing the domain name because of each network uses a different domain like .local, .lan, or .home.
But I don't see anything wrong with un-commenting domain-name=local
Right, /etc/nsswitch defines where you're looking. So correcting that fixes all scenarios vs fixing only one specific thing.
-
@stacksofplates said in Fedora name resolution:
@black3dynamite said in Fedora name resolution:
@obsolesce said in Fedora name resolution:
@black3dynamite said in Fedora name resolution:
@obsolesce said in Fedora name resolution:
@black3dynamite said in Fedora name resolution:
@obsolesce said in Fedora name resolution:
If it's a .local domain, edit the
avahi-daemon.conf
file:Un-comment the following line, and add a . (dot) infront of local:
domain-name=.local
Then restart network or reboot.
Why not edit
/etc/nsswitch.conf
instead?
https://ask.fedoraproject.org/en/question/90486/cannot-resolve-local-domain-name-on-fedora-23/?answer=90625#post-id-90625Change...
hosts: files mdns4_minimal [NOTFOUND=return] dns myhostname
To...
hosts: files dns mdns4_minimal [NOTFOUND=return] myhostname
I wasn't aware of that option.
Can you tell me why one solution is better than the other or why one is worse than the other?
Has long as dns is after files in the hosts: section in nsswitch.conf file, utilities like nslookup should work correctly.
Un-commenting the .local line in the other file seems to do the job just fine. Still not seeing any advantages to doing it the other way, or disadvantages to keep doing it how I am.
Only disadvantage or more of an inconvenience that I can see, is that you would have to keep changing the domain name because of each network uses a different domain like .local, .lan, or .home.
But I don't see anything wrong with un-commenting domain-name=local
Right, /etc/nsswitch defines where you're looking. So correcting that fixes all scenarios vs fixing only one specific thing.
I see, that makes sense. I'll try that next time.... because my host name and the LAN domain I connect to never changes.
-
@black3dynamite said in Fedora name resolution:
@obsolesce said in Fedora name resolution:
If it's a .local domain, edit the
avahi-daemon.conf
file:Un-comment the following line, and add a . (dot) infront of local:
domain-name=.local
Then restart network or reboot.
Why not edit
/etc/nsswitch.conf
instead?
https://ask.fedoraproject.org/en/question/90486/cannot-resolve-local-domain-name-on-fedora-23/?answer=90625#post-id-90625Change...
hosts: files mdns4_minimal [NOTFOUND=return] dns myhostname
To...
hosts: files dns mdns4_minimal [NOTFOUND=return] myhostname
That didn't work by the way.
This did:
hosts: files dns myhostname mymachines