DHCP issues with TP-Link AX5400 VX420-G2v #3511
|
My Mongoose client is running on a PicoW (MG_ENABLE_TCPIP 1), based on the tutorials->http->device-dashboard example and not using Mongoose Wizard. The device is having trouble with DHCP DORA handshake on one particular router (TP-Link AX5400 VX420-G2v). It works perfectly fine with three other routers I have tried and the same device worked using different software built on LWIP stack. Observations using Wireshark, Mongoose debug output and router logs.
I suspect the DISCOVER retry may be happening too soon for the router's state machine which is waiting for any ARP responses and then gets confused and drops the ACK and doesn't bother with a NACK. Can I increase the DISCOVER retry interval? If I change I don't have easy access to this router, so I thought I would ask this question in case I'm on the wrong track. |
Replies: 8 comments 18 replies
|
Since the same PicoW build works on other routers, I would first compare the failing router's DHCPOFFER against the fields Mongoose actually requires before it sends the REQUEST. In the current built-in DHCP client, Mongoose sends DISCOVER once per second while the interface is in msgtype == 2
state == MG_TCPIP_STATE_UP
yiaddr is non-zero
router/gateway option is present
lease-time option is presentIf one router sends an OFFER without option 3 (router) or option 51 (lease time), or with a transaction ID that does not match Mongoose's MAC-derived xid, Mongoose will ignore it and keep sending DISCOVER. That would look exactly like "DISCOVER, DISCOVER, no REQUEST" from the router side. The useful trace for the issue is the full OFFER options from the bad router versus a working router. If the bad OFFER has |
|
@rossack Please attach a Wireshark capture, I can't follow a description of the traffic. PS: 1 sec should be enough, lots of stuff is linked to that, so I can't guarantee you won't mess up some other stuff if you change it. You with this server are the only one in all our user base having such an issue. |
|
Hi Sergio, This router (TTP-Link VX420-G2v) appears to follow:
Can you confirm if Mongoose will respond to the ARP's in this instance? If so, maybe taking too long? |
|
Reporting on progress, sorry this is long, but writing this down helps clarify my thinking.
On with my report. Changes made:
I tested this build on my home network and can see: Then I visited the rouge network. Result:
During my monitoring I noticed most other devices when joining the network perform INIT-REBOOT and just send REQUEST directly (no DISCOVER), so I forced my Google Pixel7 to rejoin the network to watch what it's doing:
While I didn't see the ARP reply, the Pixel7 joined the network ok.
I noticed there is 802.3 LLC control frame from the CYW43 sent before the initial DISCOVER but I assume this is ignored by the router and not related to the problem. Wireshark snippet attached. PicoW One other thing, the ISP provider have said they will look into this and get back to me - so maybe a chance they can help. |
Also your comment re lease memory:
Should I upgrade to 7.21 or HEAD code? |
|
Watching the PicoW connect to my network, I notice the following:
I would expect the PicoW to respond to the ARP in sequence, but it doesn't.
Weird that it didn't log the ARP Request which arrived just after 1e74, and the ARP response is sent after the ACK and it all works just fine. The more I look at this the more I'm convinced the problem is not related to XID's, Options etc, it is the bad router unwilling to send the ACK until it gets an ARP response and the PicoW is unable to respond to the ARP until it gets the ACK. And, I think this behaviour was introduced in the latest OTA firmware update from the ISP some months ago (which Im currently following up with iiNet). |
|
Well, I'm not fond of ChatGPT and AIs in general, feel like using them takes the fun out of discovering stuff. That frame resembles some LLC after the proprietary ethertype, though. WRT your last comment, remember Mongoose is a bit different. The hacked ARP response won't be logged, I think, don't remember now but I think I saw that when checking the path for the hack. WRT xid, my understanding of the word "retransmission" in that phrase is that applies to re-sends of the same datagram, not to new negotiations. So, keep in touch. WRT that beer... I don't think I'll go to Australia in this life, my aussie friend is now American and he lives in the US, so I'll keep listening to AC-DC, Madness, and of course Men at Work, though my closest approach to down under was dinner at Outback... Tried a Foster and liked it. Google me up and feel free to PM me, nice meeting you, g'donya mate. |
|
I got a reply from the ISP that supplies the modem. In response to what I have observed they said:
They did suggest to disable features such as Smart Connect (band steering) and test using a dedicated 2.4 GHz SSID, so I will give that a go and see what happens. Re our off topic conversation. I'm recently retired, but have taken up a new role as Chief Scientist to my grand children. My mission is to ensure these kids develop inquisitive minds and find out stuff on their own. |
@rossack Please attach a Wireshark capture, I can't follow a description of the traffic.
I know how Mongoose works and what it does, we only take offers that we can actually use, we're not a full-blown computer but a small embedded system. What I need to see is why the dialog with your DHCP server is not working. Please attach the requested sniff capture, we've already have issues with cheap boxes doing foul play.
Thank you.
PS: 1 sec should be enough, lots of stuff is linked to that, so I can't guarantee you won't mess up some other stuff if you change it. You with this server are the only one in all our user base having such an issue.
PS: ARP replies are usually faster than 1s. All I ca…