Hello,
After some time using a customized OpenWRT OS for a Dragino Yun, the default gateways that are passed by DHCP disappear and I loose internet access. Why is this happening? Here are some outputs of the system:
ping 8.8.8.8 -I wlan0 and ping 8.8.8.8 -I eth0
PING 8.8.8.8 (8.8.8.8): 56 data bytes
ping: sendto: Network is unreachable
No internet access, but the gateways are still reachable by the device:
ping 192.168.35.1
PING 192.168.35.1 (192.168.35.1): 56 data bytes
64 bytes from 192.168.35.1: seq=0 ttl=64 time=0.618 ms
ping 192.168.43.1
PING 192.168.43.1 (192.168.43.1): 56 data bytes
64 bytes from 192.168.43.1: seq=0 ttl=64 time=7.989 ms
Before loosing internet access:
route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
0.0.0.0 192.168.43.1 0.0.0.0 UG 5 0 0 wlan0
0.0.0.0 192.168.35.1 0.0.0.0 UG 10 0 0 eth0
172.31.255.252 0.0.0.0 255.255.255.252 U 0 0 0 eth0
192.168.35.0 0.0.0.0 255.255.255.0 U 10 0 0 eth0
192.168.43.0 0.0.0.0 255.255.255.0 U 5 0 0 wlan0
After loosing internet access:
route -n
Destination Gateway Genmask Flags Metric Ref Use Iface
172.31.255.252 0.0.0.0 255.255.255.252 U 0 0 0 eth0
192.168.35.0 0.0.0.0 255.255.255.0 U 10 0 0 eth0
192.168.43.0 0.0.0.0 255.255.255.0 U 5 0 0 wlan0
ifconfig (after loosing internet access)
eth0 Link encap:Ethernet HWaddr A8:40:41:17:45:A1
inet addr:192.168.35.67 Bcast:192.168.35.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:4452 errors:0 dropped:1 overruns:0 frame:0
TX packets:3025 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:613802 (599.4 KiB) TX bytes:585775 (572.0 KiB)
Interrupt:5
eth0:9 Link encap:Ethernet HWaddr A8:40:41:17:45:A1
inet addr:172.31.255.254 Bcast:172.31.255.255 Mask:255.255.255.252
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
Interrupt:5
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:16 errors:0 dropped:0 overruns:0 frame:0
TX packets:16 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:1456 (1.4 KiB) TX bytes:1456 (1.4 KiB)
wlan0 Link encap:Ethernet HWaddr A8:40:41:17:45:9E
inet addr:192.168.43.29 Bcast:192.168.43.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:245 errors:0 dropped:2 overruns:0 frame:0
TX packets:245 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:25423 (24.8 KiB) TX bytes:30746 (30.0 KiB)
ifconfig (Before losing internet connection, looks the same as after loosing iaccess)
eth0 Link encap:Ethernet HWaddr A8:40:41:17:45:A1
inet addr:192.168.35.67 Bcast:192.168.35.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:89 errors:0 dropped:0 overruns:0 frame:0
TX packets:71 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:14731 (14.3 KiB) TX bytes:11424 (11.1 KiB)
Interrupt:5
eth0:9 Link encap:Ethernet HWaddr A8:40:41:17:45:A1
inet addr:172.31.255.254 Bcast:172.31.255.255 Mask:255.255.255.252
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
Interrupt:5
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:16 errors:0 dropped:0 overruns:0 frame:0
TX packets:16 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:1621 (1.5 KiB) TX bytes:1621 (1.5 KiB)
wlan0 Link encap:Ethernet HWaddr A8:40:41:17:45:9E
inet addr:192.168.43.29 Bcast:192.168.43.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:25 errors:0 dropped:0 overruns:0 frame:0
TX packets:26 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:2778 (2.7 KiB) TX bytes:3753 (3.6 KiB)
Before and After loosing internet access:
netstat -lunp
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
udp 0 0 0.0.0.0:53 0.0.0.0:* 1473/dnsmasq
netstat: /proc/net/udp6: No such file or directory
cat /etc/config/dhcp
config dnsmasq
option domainneeded 1
option boguspriv 1
option filterwin2k 0 # enable for dial on demand
option localise_queries 1
option rebind_protection 1 # disable if upstream must serve RFC1918 addresses
option rebind_localhost 1 # enable for RBL checking and similar services
#list rebind_domain example.lan # whitelist RFC1918 responses for domains
option local '/lan/'
option domain 'lan'
option expandhosts 1
option nonegcache 0
option authoritative 1
option readethers 1
option leasefile '/tmp/dhcp.leases'
option resolvfile '/tmp/resolv.conf.auto'
#list server '/mycompany.local/1.2.3.4'
#option nonwildcard 1
#list interface br-lan
list notinterface wan
list notinterface wwan
#list bogusnxdomain '64.94.110.11'
config dhcp lan
option interface lan
option start 100
option limit 150
option leasetime 12h
config dhcp wan
option interface wan
option ignore 1
config dhcp wwan
option interface wwan
option ignore 1
cat /etc/config/network
config interface 'loopback'
option ifname 'lo'
option proto 'static'
option ipaddr '127.0.0.1'
option netmask '255.0.0.0'
config interface 'lan'
option proto 'static'
option ipaddr '192.168.240.1'
option netmask '255.255.255.0'
option hostname 'ElIoT-Dragino-17459e'
config interface 'wan'
option ifname 'eth0'
option proto 'dhcp'
option metric '10'
option hostname 'ElIoT-Dragino-17459e'
config interface 'wwan'
option ifname 'wlan0'
option proto 'dhcp'
option metric '5'
ps
644 root 1532 S /sbin/syslogd -C16
646 root 1516 S /sbin/klogd
648 root 860 S /sbin/hotplug2 --override --persistent --set-rules-file /etc/hotplug2.rules --set-coldplug-cmd /sbin/udevtrigger --max-children 1
656 root 876 S /sbin/ubusd
666 root 1484 S /sbin/netifd
766 root 1532 S udhcpc -p /var/run/udhcpc-eth0.pid -s /lib/netifd/dhcp.script -f -t 0 -i eth0 -H ElIoT-Dragino-17459e -C
1221 root 1620 S wpa_supplicant -B -P /var/run/wifi-wlan0.pid -D nl80211 -i wlan0 -c /var/run/wpa_supplicant-wlan0.conf
1360 root 1524 S /sbin/watchdog -t 5 /dev/watchdog
1373 root 1532 S udhcpc -p /var/run/udhcpc-wlan0.pid -s /lib/netifd/dhcp.script -f -t 0 -i wlan0 -C
1430 root 1152 S /usr/sbin/dropbear -P /var/run/dropbear.1.pid -p 22
1473 nobody 952 S /usr/sbin/dnsmasq -C /var/etc/dnsmasq.conf
1486 root 1524 S /usr/sbin/ntpd -n -p 0.openwrt.pool.ntp.org -p 1.openwrt.pool.ntp.org -p 2.openwrt.pool.ntp.org -p 3.openwrt.pool.ntp.org
1519 root 1216 R /usr/sbin/dropbear -P /var/run/dropbear.1.pid -p 22
cat /var/etc/dnsmasq.conf
# auto-generated config file from /etc/config/dhcp
conf-file=/etc/dnsmasq.conf
dhcp-authoritative
domain-needed
localise-queries
read-ethers
bogus-priv
expand-hosts
domain=lan
server=/lan/
except-interface=eth0
except-interface=wlan0
dhcp-leasefile=/tmp/dhcp.leases
resolv-file=/tmp/resolv.conf.auto
addn-hosts=/tmp/hosts
stop-dns-rebind
rebind-localhost-ok
no-dhcp-interface=eth0
no-dhcp-interface=wlan0
address=/ElIoT-Dragino-17459e.lan/192.168.240.1
ptr-record=1.240.168.192.in-addr.arpa,ElIoT-Dragino-17459e.lan
logread (after losing connection)
Jan 1 00:00:37 ElIoT-Dragino-17459e daemon.notice netifd: Interface 'loopback' is now up
Jan 1 00:00:38 ElIoT-Dragino-17459e daemon.notice netifd: wan (766): udhcpc (v1.19.4) started
Jan 1 00:00:38 ElIoT-Dragino-17459e daemon.notice netifd: wan (766): Sending discover...
Jan 1 00:00:39 ElIoT-Dragino-17459e kern.info kernel: [ 39.230000] eth0: link up (1000Mbps/Full duplex)
Jan 1 00:00:41 ElIoT-Dragino-17459e daemon.notice netifd: wan (766): Sending discover...
Jan 1 00:00:41 ElIoT-Dragino-17459e daemon.notice netifd: wan (766): Sending select for 192.168.35.67...
Jan 1 00:00:41 ElIoT-Dragino-17459e user.info sysinit: sh: auto: bad number
Jan 1 00:00:42 ElIoT-Dragino-17459e daemon.notice netifd: wan (766): Lease of 192.168.35.67 obtained, lease time 3600
Jan 1 00:00:42 ElIoT-Dragino-17459e daemon.notice netifd: Interface 'wan' is now up
Jan 1 00:00:43 ElIoT-Dragino-17459e user.notice firewall: Reloading firewall due to ifup of wan (eth0)
Jan 1 00:00:45 ElIoT-Dragino-17459e kern.info kernel: [ 45.590000] wlan0: authenticate with 90:17:c8:18:05:59
Jan 1 00:00:45 ElIoT-Dragino-17459e kern.info kernel: [ 45.600000] wlan0: send auth to 90:17:c8:18:05:59 (try 1/3)
Jan 1 00:00:45 ElIoT-Dragino-17459e kern.info kernel: [ 45.610000] wlan0: authenticated
Jan 1 00:00:45 ElIoT-Dragino-17459e kern.info kernel: [ 45.630000] wlan0: associate with 90:17:c8:18:05:59 (try 1/3)
Jan 1 00:00:45 ElIoT-Dragino-17459e kern.info kernel: [ 45.650000] wlan0: RX AssocResp from 90:17:c8:18:05:59 (capab=0x1631 status=0 aid=3)
Jan 1 00:00:45 ElIoT-Dragino-17459e kern.info kernel: [ 45.650000] wlan0: associated
Jan 1 00:00:46 ElIoT-Dragino-17459e kern.warn kernel: [ 46.440000] EXT2-fs (sda2): warning: mounting ext3 filesystem as ext2
Jan 1 00:00:46 ElIoT-Dragino-17459e daemon.notice netifd: wwan (1373): udhcpc (v1.19.4) started
Jan 1 00:00:46 ElIoT-Dragino-17459e daemon.notice netifd: wwan (1373): Sending discover...
Jan 1 00:00:48 ElIoT-Dragino-17459e authpriv.info dropbear[1430]: Running in background
Jan 1 00:00:49 ElIoT-Dragino-17459e user.notice dnsmasq: DNS rebinding protection is active, will discard upstream RFC1918 responses!
Jan 1 00:00:49 ElIoT-Dragino-17459e user.notice dnsmasq: Allowing 127.0.0.0/8 responses
Jan 1 00:00:49 ElIoT-Dragino-17459e daemon.info dnsmasq[1473]: started, version 2.66 cachesize 150
Jan 1 00:00:49 ElIoT-Dragino-17459e daemon.info dnsmasq[1473]: compile time options: IPv6 GNU-getopt no-DBus no-i18n no-IDN DHCP no-DHCPv6 no-Lua TFTP no-conntrack no-ipset no-auth
Jan 1 00:00:49 ElIoT-Dragino-17459e daemon.info dnsmasq[1473]: using local addresses only for domain lan
Jan 1 00:00:49 ElIoT-Dragino-17459e daemon.info dnsmasq[1473]: reading /tmp/resolv.conf.auto
Jan 1 00:00:49 ElIoT-Dragino-17459e daemon.info dnsmasq[1473]: using nameserver 192.168.35.1#53
Jan 1 00:00:49 ElIoT-Dragino-17459e daemon.info dnsmasq[1473]: using local addresses only for domain lan
Jan 1 00:00:49 ElIoT-Dragino-17459e daemon.info dnsmasq[1473]: read /etc/hosts - 1 addresses
Jan 1 00:00:49 ElIoT-Dragino-17459e user.info sysinit: setting up led wlan
Jan 1 00:00:49 ElIoT-Dragino-17459e user.info sysinit: uci: Entry not found
Jan 1 00:00:49 ElIoT-Dragino-17459e daemon.notice netifd: wwan (1373): Sending discover...
Jan 1 00:00:49 ElIoT-Dragino-17459e daemon.notice netifd: wwan (1373): Sending select for 192.168.43.29...
Jan 1 00:00:49 ElIoT-Dragino-17459e daemon.notice netifd: wwan (1373): Lease of 192.168.43.29 obtained, lease time 3600
Jan 1 00:00:50 ElIoT-Dragino-17459e daemon.notice netifd: Interface 'wwan' is now up
Jan 1 00:00:50 ElIoT-Dragino-17459e user.notice firewall: Reloading firewall due to ifup of wwan (wlan0)
Feb 16 22:51:14 ElIoT-Dragino-17459e authpriv.info dropbear[1519]: Child connection from 192.168.35.1:37240
Feb 16 22:52:25 ElIoT-Dragino-17459e authpriv.notice dropbear[1519]: Password auth succeeded for 'root' from 192.168.35.1:37240
Feb 16 22:53:27 ElIoT-Dragino-17459e authpriv.info dropbear[1529]: Child connection from 192.168.35.1:37242
Feb 16 22:53:31 ElIoT-Dragino-17459e authpriv.warn dropbear[1529]: Bad password attempt for 'root' from 192.168.35.1:37242
Feb 16 22:53:33 ElIoT-Dragino-17459e authpriv.notice dropbear[1529]: Password auth succeeded for 'root' from 192.168.35.1:37242
Feb 16 22:53:35 ElIoT-Dragino-17459e authpriv.info dropbear[1529]: Exit (root): Disconnect received
Feb 16 22:59:07 ElIoT-Dragino-17459e kern.info kernel: [ 532.480000] Custom GPIO-based SPI driver version 0.1
Feb 16 23:20:57 ElIoT-Dragino-17459e daemon.notice netifd: wan (766): Sending renew...
Feb 16 23:20:58 ElIoT-Dragino-17459e daemon.notice netifd: wan (766): Lease of 192.168.35.67 obtained, lease time 3600
Feb 16 23:20:58 ElIoT-Dragino-17459e daemon.info dnsmasq[1473]: reading /tmp/resolv.conf.auto
Feb 16 23:20:58 ElIoT-Dragino-17459e daemon.info dnsmasq[1473]: using nameserver 192.168.43.1#53
Feb 16 23:20:58 ElIoT-Dragino-17459e daemon.info dnsmasq[1473]: using nameserver 192.168.35.1#53
Feb 16 23:20:58 ElIoT-Dragino-17459e daemon.info dnsmasq[1473]: using local addresses only for domain lan
Feb 16 23:21:04 ElIoT-Dragino-17459e daemon.notice netifd: wwan (1373): Sending renew...
Feb 16 23:21:04 ElIoT-Dragino-17459e daemon.notice netifd: wwan (1373): Lease of 192.168.43.29 obtained, lease time 3600
Feb 16 23:50:58 ElIoT-Dragino-17459e daemon.notice netifd: wan (766): Sending renew...
Feb 16 23:50:59 ElIoT-Dragino-17459e daemon.notice netifd: wan (766): Lease of 192.168.35.67 obtained, lease time 3600
Feb 16 23:51:05 ElIoT-Dragino-17459e daemon.notice netifd: wwan (1373): Sending renew...
Feb 16 23:51:05 ElIoT-Dragino-17459e daemon.notice netifd: wwan (1373): Lease of 192.168.43.29 obtained, lease time 3600