Hello,
in my local lan I have this setup:
A home router providing DHCP to a Debian server connected and all the other clients. I connect to it only inside my local lan, there is no outside ip involved.
Suddenly, from Linux and Android clients I cannot connect to it anymore through hostname but only through ip. From Windows client I can connect also through hostname.
I don't want to edit the host file because the server is on a laptop and i frequently change networks.
This is in my /etc/nsswitch file:
hosts: files mdns4_minimal [NOTFOUND=return] dns mdns4
This is my /etc/resolv.conf
# Generated by NetworkManager
nameserver 192.168.1.254
The address is the correct dns server of the router.
Any ideas? Thank you
Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230
Linux clients don't resolve hostname
-
- Posts: 1403
- Joined: 2009-09-10 20:15
- Location: Saint-Petersburg, Russian Federation
- Been thanked: 11 times
Re: Linux clients don't resolve hostname
Better show your /etc/network/interfaces, if you have been changed it.
Peter.
Peter.
Re: Linux clients don't resolve hostname
here it is:
Strangely enough I restored a previous working image of the system and it still does not work
Code: Select all
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).
source /etc/network/interfaces.d/*
# The loopback network interface
auto lo
iface lo inet loopback
-
- Posts: 1403
- Joined: 2009-09-10 20:15
- Location: Saint-Petersburg, Russian Federation
- Been thanked: 11 times
Re: Linux clients don't resolve hostname
For example, my /etc/network/interfaces. I'm is beyond the router too. enp6s0 is eth0's name.
And resolvconf package is installed.
Enter
or
and you will see teh network device name.
Peter.
Code: Select all
allow-hotplug enp6s0
allow-auto enp6s0
iface enp6s0 inet dhcp
network 192.168.0.0
gateway 192.168.0.1
netmask 255.255.255.0
#dns-nameserver 192.168.1.254
dns-nameserver 8.8.4.4
Enter
Code: Select all
/sbin/ifconfig
Code: Select all
ip link
Peter.
Re: Linux clients don't resolve hostname
Using a router with openwrt solves the problem, so the problem lies in the router sent by the isp. unfortunaly doesn't have much config options. Is there something else I can do as a workaround?
Re: Linux clients don't resolve hostname
When it was working, when you connected to your server using hostname, what process was resolving the host name?
You mention:
1. Does this refer to the host file on your server or the host files on each of the client workstations?
2. What do you mean by "i frequently change networks"?
If the hostname resolution was being done using host files (which seems likely, but...) then the problem could simply be caused by a change in the IP address assigned to your server by DHCP. Whenever that occurs, you would have to update the host files on all client workstations.
You mention:
2 questions:I don't want to edit the host file because the server is on a laptop and i frequently change networks.
1. Does this refer to the host file on your server or the host files on each of the client workstations?
2. What do you mean by "i frequently change networks"?
If the hostname resolution was being done using host files (which seems likely, but...) then the problem could simply be caused by a change in the IP address assigned to your server by DHCP. Whenever that occurs, you would have to update the host files on all client workstations.