Network issues - Destination host unreachable

This forum is for discussion about general software issues.

Network issues - Destination host unreachable

Postby slackline » Sun Sep 03, 2017 2:49 pm

Hi,

Moved house recently and on rebooting my Raspberry Pi2 could resolve domains. Fixed the DNS issue and I can ping/drill address' but can not reach hosts.

Code: Select all
# ifconfig wlan0
wlan0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.1.21  netmask 255.255.255.0  broadcast 192.168.1.255
        inet6 fd42:d629:d966:0:6670:2ff:fe24:19a6  prefixlen 64  scopeid 0x0<global>
        inet6 fe80::6670:2ff:fe24:19a6  prefixlen 64  scopeid 0x20<link>
        ether 64:70:02:24:19:a6  txqueuelen 1000  (Ethernet)
        RX packets 6507781  bytes 511338048 (487.6 MiB)
        RX errors 0  dropped 2  overruns 0  frame 0
        TX packets 5437392  bytes 4747200385 (4.4 GiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

alarmpi etc # drill archlinuxarm.org
ping archlinuxarm.org
;; ->>HEADER<<- opcode: QUERY, rcode: NOERROR, id: 16106
;; flags: qr rd ra ; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0
;; QUESTION SECTION:
;; archlinuxarm.org.   IN   A

;; ANSWER SECTION:
archlinuxarm.org.   79385   IN   A   50.116.36.110

;; AUTHORITY SECTION:

;; ADDITIONAL SECTION:

;; Query time: 2 msec
;; SERVER: 192.168.1.1
;; WHEN: Sun Sep  3 14:43:51 2017
;; MSG SIZE  rcvd: 50
# ping mirror.archlinuxarm.org
PING mirror.archlinuxarm.org (50.116.36.110) 56(84) bytes of data.
From alarmpi (192.168.0.21) icmp_seq=1 Destination Host Unreachable
From alarmpi (192.168.0.21) icmp_seq=2 Destination Host Unreachable
From alarmpi (192.168.0.21) icmp_seq=3 Destination Host Unreachable
From alarmpi (192.168.0.21) icmp_seq=4 Destination Host Unreachable
From alarmpi (192.168.0.21) icmp_seq=5 Destination Host Unreachable
From alarmpi (192.168.0.21) icmp_seq=6 Destination Host Unreachable
From alarmpi (192.168.0.21) icmp_seq=8 Destination Host Unreachable
From alarmpi (192.168.0.21) icmp_seq=9 Destination Host Unreachable


It stands out to me that the address that is being used to ping from (192.168.0.21) is not that which the wlan0 interface has been assigned by the router and is shown by ifconfig (192.168.1.21) and I suspect this may be one problem but am unsure how to resolve.

I'm using netctl and dnsmasq with IP address picked up using DHCP (my router sets it 192.168.1.21 and this is reflected by ifconfig output listed above)...

Code: Select all
# netctl status slack-vpn
● netctl@slack\x2dvpn.service - Automatically generated profile by wifi-menu
   Loaded: loaded (/etc/systemd/system/netctl@slack\x2dvpn.service; enabled; vendor preset: disabled)
   Active: active (exited) since Sun 2017-08-13 20:02:22 UTC; 2 weeks 6 days ago
     Docs: man:netctl.profile(5)
  Process: 298 ExecStart=/usr/lib/netctl/network start slack-vpn (code=exited, status=0/SUCCESS)
 Main PID: 298 (code=exited, status=0/SUCCESS)
   Status: "online"
    Tasks: 1 (limit: 4915)
   CGroup: /system.slice/system-netctl.slice/netctl@slack\x2dvpn.service
           └─326 wpa_supplicant -q -B -P /run/wpa_supplicant-wlan0.pid -i wlan0 -D nl80211,wext -c/run/netctl/wpa_supplicant-wlan0.conf

Aug 13 20:02:18 alarmpi systemd[1]: Starting Automatically generated profile by wifi-menu...
Aug 13 20:02:19 alarmpi network[298]: Starting network profile 'slack-vpn'...
Aug 13 20:02:22 alarmpi systemd[1]: Started Automatically generated profile by wifi-menu.
Aug 28 09:17:16 alarmpi network[298]: Started network profile 'slack-vpn'
 # systemctl status dnsmasq.service
● dnsmasq.service - A lightweight DHCP and caching DNS server
   Loaded: loaded (/usr/lib/systemd/system/dnsmasq.service; enabled; vendor preset: disabled)
   Active: active (running) since Mon 2017-08-28 09:18:42 UTC; 6 days ago
     Docs: man:dnsmasq(8)
  Process: 525 ExecStartPre=/usr/bin/dnsmasq --test (code=exited, status=0/SUCCESS)
 Main PID: 530 (dnsmasq)
    Tasks: 1 (limit: 4915)
   CGroup: /system.slice/dnsmasq.service
           └─530 /usr/bin/dnsmasq -k --enable-dbus --user=dnsmasq --pid-file

Aug 28 09:18:42 alarmpi systemd[1]: Starting A lightweight DHCP and caching DNS server...
Aug 28 09:18:42 alarmpi dnsmasq[525]: dnsmasq: syntax check OK.
Aug 28 09:18:42 alarmpi systemd[1]: Started A lightweight DHCP and caching DNS server.




Stumped as to what to try next and would like to update my install. Pointers, thoughts and advice gratefully received.

Thanks in advance,

slackline
slackline
 
Posts: 2
Joined: Wed May 11, 2016 8:18 pm

Re: Network issues - Destination host unreachable

Postby WarheadsSE » Sun Sep 03, 2017 10:52 pm

$ ip route
Core Developer
Remember: Arch Linux ARM is entirely community donation supported!
WarheadsSE
Developer
 
Posts: 6727
Joined: Mon Oct 18, 2010 2:12 pm

Re: Network issues - Destination host unreachable

Postby slackline » Mon Sep 04, 2017 7:10 am

Thanks for taking the time to respond.

WarheadsSE wrote:
Code: Select all
$ ip route



In 15 years of GNU/Linux I've not managed to commit the ip command to my memory banks. :oops:

It seems to show as I suspected that the IP address 192.168.0.21 is being used in preference to the router assigned 192.168.1.21 somehow, but its unclear to me how or why this is happening since I did not change any configuration with regards to networking.

Code: Select all
# ip route
default via 192.168.0.1 dev wlan0 src 192.168.0.21 metric 303
192.168.0.0/24 dev wlan0 proto kernel scope link src 192.168.0.21 metric 303
192.168.1.0/24 dev wlan0 proto kernel scope link src 192.168.1.21
# ip addr
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host
       valid_lft forever preferred_lft forever
2: eth0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc fq_codel state DOWN group default qlen 1000
    link/ether b8:27:eb:20:ee:8f brd ff:ff:ff:ff:ff:ff
3: wlan0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
    link/ether 64:70:02:24:19:a6 brd ff:ff:ff:ff:ff:ff
    inet 192.168.1.21/24 brd 192.168.1.255 scope global wlan0
       valid_lft forever preferred_lft forever
    inet 192.168.0.21/24 brd 192.168.0.255 scope global wlan0
       valid_lft forever preferred_lft forever
    inet6 fd42:d629:d966:0:6670:2ff:fe24:19a6/64 scope global mngtmpaddr dynamic
       valid_lft forever preferred_lft forever
    inet6 fe80::6670:2ff:fe24:19a6/64 scope link
       valid_lft forever preferred_lft forever
# ip neigh
192.168.1.11 dev wlan0 lladdr cc:2d:8c:fd:b8:bf STALE
192.168.1.41 dev wlan0 lladdr d8:50:e6:78:4b:5f STALE
192.168.1.4 dev wlan0 lladdr 6c:ad:f8:9e:11:ba STALE
192.168.1.9 dev wlan0 lladdr cc:2d:8c:fd:b8:bf STALE
192.168.1.1 dev wlan0 lladdr 14:91:82:b8:0e:dc STALE
192.168.0.1 dev wlan0  FAILED
192.168.1.31 dev wlan0 lladdr 60:d8:19:85:25:aa STALE
192.168.1.32 dev wlan0 lladdr 1c:99:4c:cf:8c:e8 STALE
192.168.1.45 dev wlan0 lladdr 38:d5:47:e0:16:1f REACHABLE
fe80::1691:82ff:feb8:edc dev wlan0 lladdr 14:91:82:b8:0e:dc router STALE


Prompted me to check a few things so I grep'ed everything in /etc/ for this rogue IP address and looks like I mis-typed the address in /etc/dhcpcd.conf removing the entry resolves it (been moving house and stressed the last few weeks and squeezing in sorting out computers as and when and not giving it the correct attention).

Thanks for the pointer, helped kick my brain into gear to solve things, appreciated.

slackline
slackline
 
Posts: 2
Joined: Wed May 11, 2016 8:18 pm


Return to General

Who is online

Users browsing this forum: No registered users and 3 guests