At a customer site, i meet a strange a problem about dhcpc. the wan is dhcp, and the wan cable is always plugged in. normally, wan ip obtained by dhcpc request is '192.168.8.x', then, the customer site
s networking is disconnected for some reason(cable always plugged in), 4-5days later, the networking recovery， But OP cannt get the latest IP information(wan, by dhcpc)， from the luci web, i see the wan ip is '192.168.0.x'，i can`t understand why happens this? (when i reboot or replug the cable or resetting wan dhcp by web, it will be ok)
Sounds like there is some other dhcp server on the wan. Either the ISP equipment is rebooting and has some temporary dhcp server to allow tftp connections during boot, or bridge mode is not working properly until it fully boots. You'll need to provide more information about the infrastructure.
Maybe none of the several situations you mentioned. because the first time the network was normal, the problem only appeared later. so you said these are not exist
you notice that the ip becomes "192.168.0.x", why this ip becomes?? someone nerver set it
any other problem?
Have you looked at the lease time on the original DHCP supplied settings, and does it go wrong during renewal when the lease expires?
One problem you will have is that if there is a rogue DHCP server on the WAN side of the network you can't really fix that.
What IP range is being used on the LAN? I'm wondering if there might be some strange bridge / loop where you're getting an assignment from that side.
What is on the upstream side of the WAN? If it is PPPoE then adding this to the wan section in /etc/config/network will get more info into the logs, but you may need to tune things as the perfectly normal ECHO packets will quickly be the main things in there:
option pppd_options 'debug kdebug 7'
That takes you into territory that I don't really understand about how PPPoE, CHAP, DHCP, etc interoperate on that type of link - in my logs it looks like CHAP is assigning the WAN IP address, but I'm not sure...
EDIT: You might find something like this useful when the link is up to explore what DHCP servers are available to give a response: https://github.com/CyberShadow/dhcptest
No other thing in WAN ，the choice of WAN network access method is dhcp, And The upper-level router dhcp is closed
I wonder if the network cable always not plugged out, could the wan dhcp detect a change in the network environment How OP realize it?
Dmesg would show if there's a change in the ethernet port status.