flint 3 DHCP issues

I have a flint 3 connected to the ISP router which has the DHCP enabled and provides a lease for 30 minutes.
This leads to a frequent IP update from the router which in turns leads to the Flint 3 shutting down the WAN interface for each update.
As a result of that, the internet for the LAN goes down for like 20 seconds.

I tried turning static IPv4 on (instead of DHCP), but the interface is still taken down by dhcp6.

I've changed /sbin/hotplug-call to this:
#!/bin/sh

Copyright (C) 2006-2016 OpenWrt.org

export HOTPLUG_TYPE="$1"

. /lib/functions.sh

PATH="/usr/sbin:/usr/bin:/sbin:/bin"
LOGNAME=root
USER=root
export PATH LOGNAME USER
export DEVICENAME="${DEVPATH##*/}"

if [ ! -z "$1" -a -d /etc/hotplug.d/$1 ]; then
for script in $(ls /etc/hotplug.d/$1/* 2>&-); do (
echo "BEFORE $$ ip r ps" >> /tmp/scr
[ -f $script ] && . $script
echo "$script -- $$ -- ip r -- ps" >> /tmp/scr
); done
fi

The output is here:
https://minisatip.org/tmp/scr.txt

Few notes:

  1. disabling ipv6 and static ipv4 leads to no issues
  2. static ipv4 & dhcp ipv6 -> internet stops for max 20s
  3. dhcp ipv4 & ipv6 -> internet stops for max 20s

During the outage, eth0 routes are completely gone, LAN works

An example of suspicious processes:
2692 root 1592 S {hotplug-call} /bin/sh /sbin/hotplug-call carrier
2693 root 1744 S {dhcpv6.script} /bin/sh /lib/netifd/dhcpv6.script et
2694 root 1616 R {dhcpv6.sh} /bin/sh ./dhcpv6.sh dhcpv6 teardown wan6
2695 root 1592 S {hotplug-call} /bin/sh /sbin/hotplug-call iface
2696 root 1760 S sh -c . /lib/functions/modem.sh && get_modem_bus
2699 root 1600 S {hotplug-call} /bin/sh /sbin/hotplug-call carrier
2701 root 1460 R ps
2703 root 1592 R {hotplug-call} /bin/sh /sbin/hotplug-call iface
2705 root 1744 S {dhcpv6.script} /bin/sh /lib/netifd/dhcpv6.script et

When the interface comes back up (with default route):
3635 root 1592 S {hotplug-call} /bin/sh /sbin/hotplug-call carrier
3636 root 1760 S sh -c . /lib/functions/modem.sh && get_modem_bus
3637 root 1752 R {dhcpv6.sh} /bin/sh ./dhcpv6.sh dhcpv6 setup wan6 {"
3639 root 1600 S {hotplug-call} /bin/sh /sbin/hotplug-call carrier
3643 root 1460 R ps
3645 root 1596 S {hotplug-call} /bin/sh /sbin/hotplug-call iface

If you have a ISP that only provides 30 min leases then you don't have a ISP. That's what needs to be changed. You're also probably 'double-NAT'd'. Set the modem as just a modem. Put the router on the modem's 'DMZ' or preferably the modem into 'bridged mode'. Revert to the stock hotplug script & install luci-app-watchcat.

(Use ``` before & after the first, last lines to post logs, code.)

Just to clarify, the isp touter provides a 30 minutes lease but still the same ip (192.168.100.2).

The 30 minutes lease makes the problem happen at 30 mins, but if the leade is 12h it happens every 12h.

Taking the interface down is not the right approach for reconfiguring the ip address of an interface especially when the ip is the same

You're absolutely correct. The upstream's DHCP offer should just be ignored if there's no change. I'd reflash with with latest stable build without saving settings.

... & yeah, based on that 192.168.100.2, you're probably double-NAT'd. That's not a IP I've ever seen from a ISP. They don't use Class C.

It is the latest version (4.7.14) and always had the issue. Saw some other reports as well in the flint 3 thread

IDK how many Flint v3's are 'out in the wild' but it can't just be a handful that people mention on this forum. Post logs. logread -e wan , netifd, dnsmasq, dhcp should turn something up if not just logread | grep 'DHCP'. Then try a beta build.

Flash via U-boot to ensure there's absolutely no chance of an old/errant conf still being present.

the log is empty except dnsmasq assigning IPs on br-lan, nothing about upstream DHCP

Is that the case even after rebooting & waiting for, say, 35 min? I doubt all those daemons aren't showing up in the logs. There should be more showing.

Hi,

  1. If the WAN port is physically disconnected, then the down/up of the WAN port should be printed in the Flint3 log.

  2. If the WAN port requests DHCP renewal, it should print "renew" in the Flint3 log every 30 minutes.

When the issue reproduced, please export the syslog and send it to us on PM.

BTW, please let me know what brand/model is your ISP router?

The issue is actually gone in 4.8.1 beta.

1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.