I've got an oddity with DNS lookups on my local LAN:
- running 'host' on the house server on my LAN has no trouble resolving
this laptop's name and address: its response correctly reports both
name and IP address - presumably because they've been retrieved from a
local of 'named'.
- however both 'ping' and 'traceroute' report it as
"Destination Host Unreachable" from the house server and ssh won't
connect to it using either hostname or IP
- 'ssh' reports 'No route to host' using either hostname or IP address
Any tips or stories of similar problems and their reolution will be gratefully received.
however both 'ping' and 'traceroute' report it as
"Destination Host Unreachable"
- 'ssh' reports 'No route to host' using either hostname or IP address
Martin Gregorie <martin@mydomain.invalid> wrote:
Any tips or stories of similar problems and their reolution will be
gratefully received.
I've been having something a bit similar lately. I put the IP of one of
my LAN machines in the public DNS, however:
$ ping lanmachine.example.com ping: lanmachine.example.com: Name or
service not known
$ host lanmachine.example.com $
The weird thing is that it goes back to being inaccessible after a few minutes, and I need another 'host -a' to access it again.
Martin Gregorie wrote:
however both 'ping' and 'traceroute' report it as
"Destination Host Unreachable"
That implies it has resolved the name, but can't reach the IP it was
resolved to (firewall?)
According to what you have available on the laptop run "ipconfig" or "ip address" and see if the laptop's address agrees with what host is
returning.
$ ip address
2: enp0s25: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel
state UP group default qlen 1000
link/ether 28:d2:44:96:54:b6 brd ff:ff:ff:ff:ff:ff
inet 192.168.7.243/24 brd 192.168.7.255 scope global dynamic noprefixroute enp0s25
valid_lft 210477sec preferred_lft 210477sec
The IP address 192.168.7.243 has appeared recently, possibly with the
recent upgrade from Fedora 36 -> 37 - I haven't a clue who or what
dreamed that up: I certainly haven't set it up and none of 'host', traceroute' or 'ping' get anything sensible from it:
$ host 92.168.7.243
$ traceroute 92.168.7.243;
$ ping 92.168.7.243;
Martin Gregorie wrote:
- 'ssh' reports 'No route to host' using either hostname or IP address
that implies you've got multiple subnets, with no routing between them.
have you got more than one DHCP server dishing out IPs from different
ranges?
I haven't touched my network configuration at all this
year and it uses only one subnet: 192.168.7.x.
- running 'host' on the house server on my LAN has no trouble
resolving this laptop's name and address: its response correctly
reports both name and IP address - presumably because they've been
retrieved from a local of 'named'.
Martin Gregorie wrote:
I haven't touched my network configuration at all this year and it uses
only one subnet: 192.168.7.x.
Maybe post the output of
ip link show
ip addr show
ip route show
from both the server and laptop's PoV?
Am 16.03.2023 schrieb Martin Gregorie <martin@mydomain.invalid>:nameserver 127.0.0.53
- running 'host' on the house server on my LAN has no trouble resolving
this laptop's name and address: its response correctly reports both
name and IP address - presumably because they've been retrieved from a
local of 'named'.
cat /etc/resolv.conf
cat /etc/nsswitch.confpasswd: sss files systemd
host <hostname>passwd: sss files systemd
ping <hostname>passwd: sss files systemd
I can see that "ip route show" says the link is down on the laptop but
I must be having a stupid day, because I can't work out from the 'ip'
manpage what command I parameters I should use to set the link to up.
I've got an oddity with DNS lookups on my local LAN:
- running 'host' on the house server on my LAN has no trouble resolving
this laptop's name and address: its response correctly reports both
name and IP address - presumably because they've been retrieved from a
local of 'named'.
- however both 'ping' and 'traceroute' report it as
"Destination Host Unreachable" from the house server and ssh won't
connect to it using either hostname or IP
- 'ssh' reports 'No route to host' using either hostname or IP address
The laptop has always been assigned 192.168.7.5 as its static IP.
I just tried connecting to it from the server using 192.168.7.243 as a
bare IP- this works, but I'd prefer to reset that to 192.168.7.5 rather
than dumbly accepting the changed laptop IP (192.168.7.243) as a fate accompli because I don't know how it became the default.
Can 'ip' be used to make that change? Thats not obvious from its manpage.
The laptop has always been assigned 192.168.7.5 as its static IP.
I just tried connecting to it from the server using 192.168.7.243 as a
bare IP- this works, but I'd prefer to reset that to 192.168.7.5 rather
than dumbly accepting the changed laptop IP (192.168.7.243) as a fate >accompli because I don't know how it became the default.
Can 'ip' be used to make that change? Thats not obvious from its manpage.
Martin Gregorie wrote:
I can see that "ip route show" says the link is down on the laptop but
I must be having a stupid day, because I can't work out from the 'ip'
manpage what command I parameters I should use to set the link to up.
the wifi device name is "wlp3s0", so ip link set dev wlp3s0 up
or in old money ifup wlp30s0
but you already seem to have a wired device "enp0s25" which is up, which should the laptop be using?
In article <tuvus9$1cfql$1@dont-email.me>,
Martin Gregorie <martin@mydomain.invalid> wrote:
I've got an oddity with DNS lookups on my local LAN:
- running 'host' on the house server on my LAN has no trouble resolving
this laptop's name and address: its response correctly reports both
name and IP address - presumably because they've been retrieved from
a local of 'named'.
- however both 'ping' and 'traceroute' report it as
"Destination Host Unreachable" from the house server and ssh won't
connect to it using either hostname or IP
- 'ssh' reports 'No route to host' using either hostname or IP address
Just chiming in here with some questions and ideas. Let us know if
you've already solved it.
1. The above behaviour suggests specifically that the IP address for the laptop
that your local DNS returns is not the same as the actual IP address
the laptop currently has.
2. Is the laptop supposed to use a fixed IP address, or to get it from
DHCP?
Your 'ip addr' output shows that it obtained its .7.243 address from
DHCP.
If it should have been fixed, you probably need to reconfigure
NetworkManager. Normally, a portable device like a laptop would
always use DHCP, so you could take it elsewhere to use, and if you
wanted it always to have the same address when at home, you would
configure the DHCP server always to give the same IP address to that
MAC address.
3. If it is indeed DHCP, what device is your DHCP server? The router or
the
house server? Had you previously configured it always to dish out the
same IP, as mentioned above, or did you just rely on default
stickiness of the lease?
On my own LAN, I have disabled the DHCP server in my router, and I use
dhcpd and named on my Linux house server. I specify persistent DHCP
addresses in /etc/dhcpd.conf using "host xxx { ... }" sections such as:
host einstein {
hardware ethernet 00:12:3f:db:97:25;
fixed-address 192.168.50.14;
option host-name "einstein";
}
Martin Gregorie wrote:
The laptop has always been assigned 192.168.7.5 as its static IP.
is the MAC address associated with the static reservation correct?
Seems like everything is working at the IP layer, when you try to ping
the laptop by name from the server, presumably it uses the (now
incorrect) 192.168.7.5 addr because and fails because (for whatever
reason) it should use the altered addr 192.168.7.243?
I just tried connecting to it from the server using 192.168.7.243 as a
bare IP- this works, but I'd prefer to reset that to 192.168.7.5 rather
than dumbly accepting the changed laptop IP (192.168.7.243) as a fate
accompli because I don't know how it became the default.
Can 'ip' be used to make that change? Thats not obvious from its
manpage.
no, depends what DNS and or DHCP you're running (some e.g dnsmasqd may
be combined) seems like it's stale info there ca\using the problem,
Martin Gregorie wrote:
The laptop has always been assigned 192.168.7.5 as its static IP.
is the MAC address associated with the static reservation correct?
Seems like everything is working at the IP layer, when you try to ping
the laptop by name from the server, presumably it uses the (now
incorrect) 192.168.7.5 addr because and fails because (for whatever
reason) it should use the altered addr 192.168.7.243?
I just tried connecting to it from the server using 192.168.7.243 as a
bare IP- this works, but I'd prefer to reset that to 192.168.7.5 rather
than dumbly accepting the changed laptop IP (192.168.7.243) as a fate
accompli because I don't know how it became the default.
Can 'ip' be used to make that change? Thats not obvious from its
manpage.
no, depends what DNS and or DHCP you're running (some e.g dnsmasqd may
be combined) seems like it's stale info there ca\using the problem,
A thought: I know very little about DHCP, but should the following correct the problem?
- turn my internet gateway box off
- login to the server from the laptop
- restart the gateway box
Or, is there a better way to force the laptop to get its IP assigned by my local DNS server?
In article <tv28do$1u3tc$4@dont-email.me>,
Martin Gregorie <martin@mydomain.invalid> wrote:
A thought: I know very little about DHCP, but should the following
correct the problem?
- turn my internet gateway box off - login to the server from the
laptop - restart the gateway box
Or, is there a better way to force the laptop to get its IP assigned by
my local DNS server?
Today's job: disable the DHCP server in the internet gateway/firewall and install a DHCP server on the house server after investigating recent
changes to the format of /etc/hostname and /etc/hosts.
The weird thing is that it goes back to being inaccessible after a few minutes, and I need another 'host -a' to access it again.
The TTL on the A record in the DNS is 300 seconds, but that doesn't explain why I'm getting empty DNS responses. The DNS zone looks fine to me.
Martin Gregorie wrote:
Today's job: disable the DHCP server in the internet gateway/firewall
and install a DHCP server on the house server after investigating
recent changes to the format of /etc/hostname and /etc/hosts.
Not sure what distro you're using, but if dnsmasqd is available, it integrates DNS and DHCP functionality, so can cut down on redundant
config of hosts, it's used in most linux router/firewall firmware
<https://thekelleys.org.uk/dnsmasq/doc.html>
In message <tv20mp$1u3tc$3@dont-email.me>, Martin Gregorie <martin@mydomain.invalid> writes
The laptop has always been assigned 192.168.7.5 as its static IP.Does this help ?
I just tried connecting to it from the server using 192.168.7.243 as a
bare IP- this works, but I'd prefer to reset that to 192.168.7.5 rather >>than dumbly accepting the changed laptop IP (192.168.7.243) as a fate >>accompli because I don't know how it became the default.
Can 'ip' be used to make that change? Thats not obvious from its
manpage.
https://linuxconfig.org/how-to-configure-static-ip-address-on-fedora-31
https://www.microhost.com/docs/tutorial/how-to-set-manual-or-static-ip-address-on-fedora/
Adrian
my ADSL gateway appears to be decaying because
its telnet and webserver interfaces are now unresponsive. The web
interface was always sluggish but currently are accepting connections but
not responding to logins (telnet prompts for and accepts a username but
does nothing further and the web interface accepts a connection but never replies) - probably this is a wakeup call to move to fibre (if locally available), and with the steady disappearance of ADSL and copper in
general, the last thing I need now is getting a replacement ADSL
gateway[*].
I now realise that somehow missed seeing NetworkManager, its certainly
part of Fedora 37, but was it a thing in Fedora 36?
Martin Gregorie wrote:
my ADSL gateway appears to be decaying because its telnet and webserver
interfaces are now unresponsive. The web interface was always sluggish
but currently are accepting connections but not responding to logins
(telnet prompts for and accepts a username but does nothing further and
the web interface accepts a connection but never replies) - probably
this is a wakeup call to move to fibre (if locally available), and with
the steady disappearance of ADSL and copper in general, the last thing
I need now is getting a replacement ADSL gateway[*].
Most VDSL modems double-up as ADSL modems, cheap secondhand on eBay
Martin Gregorie wrote:
I now realise that somehow missed seeing NetworkManager, its certainly
part of Fedora 37, but was it a thing in Fedora 36?
Yes, much older than that ...
I've also found
https://networkmanager.dev/
Is this to best place to start finding out about it?
Sysop: | Keyop |
---|---|
Location: | Huddersfield, West Yorkshire, UK |
Users: | 546 |
Nodes: | 16 (2 / 14) |
Uptime: | 20:22:34 |
Calls: | 10,390 |
Calls today: | 1 |
Files: | 14,061 |
Messages: | 6,416,974 |