[SOLVED] DHCP works, internet not. SSH is not working either

Ask questions about Arch Linux ARM. Please search before making a new topic.

[SOLVED] DHCP works, internet not. SSH is not working either

Postby pontius » Wed Apr 05, 2017 4:17 pm

Hi,
I have arch installed on a Raspberry Pi2. Had a headless server configuration with with arch and the same Pi on the same network which worked, but I remember I had to change one line in a config file. Took me days to figure it out. Can't remember what it was hmm. One time I had network issues after upgrading but didn't have time to look into it. After months I did a fresh installation but could not get any Internet connection. I messed with some config files but can't recall in detail what I did. Didn't help.
So I just did another fresh installation to make sure everything is default.

I'm using a fritz.box as router. I can confirm the ethernet cable works and the ethernet port on the fritzbox also works. I also tried different ports and cables. I have no problems to SSH into the same Pi and to connect to the internet from a different network (at my girlfriends house).

However I can't SSH into the fresh installation on my home network. I have no option to use a monitor. I could however connect a keyboard and type commands blindly. I need a solution or further diagnostics that I can copy to the SD card and boot it up.

Any ideas? Thx so much.

Some details:

DHCP seems to work the fritz.box gave it IP address 192.168.1.6 and shows the hostname 'alarmpi'. It shows as status: "Connected to the fritz.box, but not to the internet"
The router is connected via IPv4 to the Internet. Somewhere I read that Fritz.Box runs it's own DNS server if DHCP is enabled. Fritz.Box also tells me that it's using 193.189.250.100 (currently used for standart requests) and 193.189.250.101 as DNS Nameservers.

resolv.conf of my laptop (kubuntu 16.10) which works just fine on this network is:
Code: Select all
# Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8)
#     DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN
nameserver 127.0.1.1
search fritz.box


resolv.conf of the arch is (after the first boot):
Code: Select all
# This file is managed by systemd-resolved(8). Do not edit.
#
# This is a dynamic resolv.conf file for connecting local clients directly to
# all known DNS servers.
#
# Third party programs must not access this file directly, but only through the
# symlink at /etc/resolv.conf. To manage resolv.conf(5) in a different way,
# replace this symlink by a static file or a different symlink.
#
# See systemd-resolved.service(8) for details about the supported modes of
# operation for /etc/resolv.conf.

nameserver 8.8.8.8
nameserver 8.8.4.4
nameserver 2001:4860:4860::8888
# Too many DNS servers configured, the following entries may be ignored.
nameserver 2001:4860:4860::8844

Those are the errors I get when I try to connect:
Code: Select all
$ ssh alarm@192.168.1.6
ssh: connect to host 192.168.1.6 port 22: No route to host

$ ssh alarmpi
ssh: Could not resolve hostname alarmpi: Name or service not known

$ ssh alarm@alarmpi.box
ssh: connect to host alarmpi.box port 22: Connection refused

$ $ ping 192.168.1.6
PING 192.168.1.6 (192.168.1.6) 56(84) bytes of data.
From 192.168.1.2 icmp_seq=1 Destination Host Unreachable

$ ping alarmpi.box
PING alarmpi.box (127.0.53.53) 56(84) bytes of data.
64 bytes from localhost (127.0.53.53): icmp_seq=1 ttl=64 time=0.037 ms
64 bytes from localhost (127.0.53.53): icmp_seq=2 ttl=64 time=0.065 ms
64 bytes from localhost (127.0.53.53): icmp_seq=3 ttl=64 time=0.072 ms
Last edited by pontius on Thu Apr 06, 2017 9:32 pm, edited 1 time in total.
pontius
 
Posts: 3
Joined: Wed Apr 05, 2017 4:14 pm

Re: Can't SSH in fresh installation. DHCP works, but no inte

Postby WarheadsSE » Wed Apr 05, 2017 4:32 pm

Code: Select all
ssh: connect to host 192.168.1.6 port 22: No route to host

This is not "ssh isn't listening", this is "I can't talk to it at all!"

Your laptop is using 127.0.x.x which is a localhost address, so it has some form of local DNS cache/proxy as it is. Do not base your ALARM DNS configuration on that.

The fact that your laptop(?) can't resolve 'alarmpi' as a hostname shows that something in your DNS configuration is borked.

Here is the big question: why is is that pinging 'alarmpi.box' resolves to 127.0.53.53 ? That, again, is a localhost address. Yet, your attempts to connect to 192.168.1.6, an actual routeable class C LAN address.

Your network's configuration is all kinda of screwed up.
Core Developer
Remember: Arch Linux ARM is entirely community donation supported!
WarheadsSE
Developer
 
Posts: 6729
Joined: Mon Oct 18, 2010 2:12 pm

Re: Can't SSH in fresh installation. DHCP works, but no inte

Postby pontius » Wed Apr 05, 2017 8:20 pm

Thank you for your answer. That's what i thought.

Let me clarify: I get it that this is not a SSH problem.

I think this is a router problem. My laptop works fine on any network I connect and I didn't edit any network stuff. My network configuration may be all screwed up, any device on our network can handle it out of the box, but not the arch pi. I don't think it is the responsibility of the pi to just work on networks that are 'just wrong', however it would be nice to get it working anyways.

I googled 127.0.53.53 and what I found is, that it is a warning that indicates overlapping namespaces between private and public DNS. This is due to the introduction of new TLD's.

I will reset my Router to factory setting and do an update and hope this fixes this issue, (and maybe some more?), but i should still be able to connect to my pi via '$ssh alarm@192.168.1.6' or '$ping 192.168.1.6', shouldn't I?

Like I said, I will try resetting the router, but this network configuration is kinda forced on me by it.
The SSH thing is important to this question in the sense of 'I don't have any a monitor, SSH doesn't work, so I can't do any diagnostics on the running system'.

So I pretty much need help to configure my PI to work with this "screwed up" network configuration, but I need to do it by editing config files on the SD card, of some I have no clue how to do it (-> DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN) or what files to edit in the first place.
pontius
 
Posts: 3
Joined: Wed Apr 05, 2017 4:14 pm

Re: Can't SSH in fresh installation. DHCP works, but no inte

Postby WarheadsSE » Thu Apr 06, 2017 12:50 pm

I really wonder why your Pi was getting supposedly getting a 192.168.x.x address, but your DNS was resolving 127.0.53.x . What IP address did your laptop have?

If you can get your hands on a TTL UART (3.3v serial cable), this will let you interact live, and provide a lot of insight.
Core Developer
Remember: Arch Linux ARM is entirely community donation supported!
WarheadsSE
Developer
 
Posts: 6729
Joined: Mon Oct 18, 2010 2:12 pm

Re: Can't SSH in fresh installation. DHCP works, but no inte

Postby pontius » Thu Apr 06, 2017 9:31 pm

My laptop had 192.168.1.3
Had a chance to get my hands on the router today. Resetting it to factory settings did help (Can login via ip and hostname now). Sorry for bothering you.
pontius
 
Posts: 3
Joined: Wed Apr 05, 2017 4:14 pm


Return to User Questions

Who is online

Users browsing this forum: technosf and 1 guest