WRT1900ACS V2 no WAN DHCP after power outage

Post new topic   Reply to topic    DD-WRT Forum Index -> Marvell MVEBU based Hardware (WRT1900AC etc.)
Goto page Previous  1, 2, 3  Next
Author Message
kernel-panic69
DD-WRT Guru


Joined: 08 May 2018
Posts: 14126
Location: Texas, USA

PostPosted: Tue Jul 19, 2022 12:02    Post subject: Reply with quote
HapHazardly wrote:
When I run "udhcpc -i eth0" from a telnet session this is all the output I get:

udhcpc: started, v1.33.1
udhcpc: sending discover
udhcpc: sending discover

And then it just sits there forever.

The problem may or may not have something to do with an upstream fix which was not implemented for whatever reason, either to use certain featuress present in 1.33.1 busybox udhcp code or use patched code with extra features (no comment on that "explanation"). This information now gives me a specific point of reference.

_________________
"Life is but a fleeting moment, a vapor that vanishes quickly; All is vanity"
Contribute To DD-WRT
Pogo - A minimal level of ability is expected and needed...
DD-WRT Releases 2023 (PolitePol)
DD-WRT Releases 2023 (RSS Everything)

----------------------
Linux User #377467 counter.li.org / linuxcounter.net
Sponsor
SurprisedItWorks
DD-WRT Guru


Joined: 04 Aug 2018
Posts: 1446
Location: Appalachian mountains, USA

PostPosted: Tue Jul 19, 2022 15:33    Post subject: Reply with quote
HapHazardly wrote:
"You say you are on build 39884, which is ancient. Try the current build," and "but as was already stated above, if you are not on the current DD-WRT release, then the likelihood of finding a solution isn't that great."

I guess you guys missed the part in my original post where I said "I have tried multiple DD-WRT releases up to r49392 without success."

Yes, I certainly did miss that. Apologies for my sloppiness!

FWIW, the VLANs sticky post linked in my sig should give you enough background, if you don't have it already, to follow up on your idea of moving the WAN function to a different back-panel port, in case you have a damaged hardware port. My instinct leans away from this being the problem, but you never know.

_________________
2x Netgear XR500 and 3x Linksys WRT1900ACSv2 on 53544: VLANs, VAPs, NAS, station mode, OpenVPN client (AirVPN), wireguard server (AirVPN port forward) and clients (AzireVPN, AirVPN, private), 3 DNSCrypt providers via VPN.
kernel-panic69
DD-WRT Guru


Joined: 08 May 2018
Posts: 14126
Location: Texas, USA

PostPosted: Tue Jul 19, 2022 17:01    Post subject: Reply with quote
Only thing left to do is a hard reset aka nvram erase && reboot and start fresh, re-configuring manually from defaults without loading an nvram backup file. I did a proof test with various modems and mock-ups of ISP systems with both native DD-WRT udhcp code and current / patched upstream code and haven't found a smoking gun that points to DD-WRT being the issue. Something seems to be corrupted or askew, or there is text missing from the larger picture here.
_________________
"Life is but a fleeting moment, a vapor that vanishes quickly; All is vanity"
Contribute To DD-WRT
Pogo - A minimal level of ability is expected and needed...
DD-WRT Releases 2023 (PolitePol)
DD-WRT Releases 2023 (RSS Everything)

----------------------
Linux User #377467 counter.li.org / linuxcounter.net
HapHazardly
DD-WRT Novice


Joined: 04 Apr 2018
Posts: 22

PostPosted: Sat Jul 23, 2022 20:53    Post subject: Reply with quote
Update: I can only work on this problem on the weekends because I can't have my internet down during the week when I'm working my day job. Today I am trying to get r49544 working and I am still getting the same results. However, thanks to this comment "Found perhaps something interesting: https://forum.archive.openwrt.org/viewtopic.php?id=38487" by egc I have some additional information which might help someone more knowledgeable than me. Firstly, it looks like the most recent version of dd-wrt has a new version of udhcpc. This is the output I get when running udhcpc:
root@DD-WRT:~# udhcpc -i eth0
udhcpc: started, v1.35.0
udhcpc: sending discover
udhcpc: sending discover
udhcpc: sending discover

It still just hangs there but now the version is 1.35.1 instead of 1.33. I also used ps to get the command line for the udhcpc which is running when the router boots up:
udhcpc -i eth0 -p /var/run/udhcpc.pid -s /tmp/udhcpc

Interestingly /tmp/udhcp which is supposed to be the script which gets run when events happen in udhcp, actually points to /sbin/rc.

And finally I used tcpdump to capture traffic on eth0 and I see this:

01:38:00.940027 IP (tos 0x0, ttl 64, id 0, offset 0, flags [none], proto UDP (17), length 328)
0.0.0.0.68 > 255.255.255.255.67: [udp sum ok] BOOTP/DHCP, Request from 60:38:e0:10:62:23 (oui Unknown), length 300, xid 0x1ab60c60, Flags [none] (0x0000)
Client-Ethernet-Address 60:38:e0:10:62:23 (oui Unknown)
Vendor-rfc1048 Extensions
Magic Cookie 0x63825363
DHCP-Message (53), length 1: Discover
Client-ID (61), length 7: ether 60:38:e0:10:62:23
MSZ (57), length 2: 576
Parameter-Request (55), length 7:
Subnet-Mask (1), Default-Gateway (3), Domain-Name-Server (6), Hostname (12)
Domain-Name (15), BR (2Cool, NTP (42)
Vendor-Class (60), length 12: "udhcp 1.35.0"

All of that is sent over and over. The interesting thing to me is this bit at the end of the second line: xid 0x1ab60c60, Flags [none] (0x0000)

In the link egc posted it looked like maybe the (0x0000) needed to be (0x8000) but I have not had any luck getting that to happen. I have found various copies of the udhcpc source but none of them appear to be the version which is being used in the most recent dd-wrt release. The command line options don't match, the logging output doesn't match, etc. So at this point I am just guessing at what the udhcpc used by dd-wrt is doing. Does anyone on here know how to make it broadcast (0x8000) instead of unicast (0x0000)? Is there any other information I can provide to anyone to help troubleshoot this?
kernel-panic69
DD-WRT Guru


Joined: 08 May 2018
Posts: 14126
Location: Texas, USA

PostPosted: Sat Jul 23, 2022 21:52    Post subject: Reply with quote
HapHazardly wrote:

Firstly, it looks like the most recent version of dd-wrt has a new version of udhcpc. This is the output I get when running udhcpc:
root@DD-WRT:~# udhcpc -i eth0
udhcpc: started, v1.35.0
udhcpc: sending discover
udhcpc: sending discover
udhcpc: sending discover

Must be in-house (build server) changes, not public repo changes. Don't know if that is because of any emails I sent or any comments in this thread or what.

HapHazardly wrote:
Interestingly /tmp/udhcp which is supposed to be the script which gets run when events happen in udhcp, actually points to /sbin/rc.

Which is where it should point, if memory serves. There was a "discussion" about this between myself and another esteemed forum member where I pointed to exactly where in DD-WRT the "udhcpc script" was, but it's kind of lost at the moment (maybe those posts were removed, lol).

Back to the task at hand, I presume you are using a temporary router between troubleshooting periods. This will require the upstream modem to be taken offline to reset completely. There is a small possibility that your ISP may require human intervention (calling a tech and having them do whatever magic voodoo they must to get it to work). Did you do a full hard reset on the router in question after upgrading to current release?

_________________
"Life is but a fleeting moment, a vapor that vanishes quickly; All is vanity"
Contribute To DD-WRT
Pogo - A minimal level of ability is expected and needed...
DD-WRT Releases 2023 (PolitePol)
DD-WRT Releases 2023 (RSS Everything)

----------------------
Linux User #377467 counter.li.org / linuxcounter.net
HapHazardly
DD-WRT Novice


Joined: 04 Apr 2018
Posts: 22

PostPosted: Sat Jul 23, 2022 23:12    Post subject: Reply with quote
"I presume you are using a temporary router between troubleshooting periods."

Actually I am using the Factory firmware on the other boot partition. I can switch back and forth easily enough. Factory firmware works fine with the same MAC address but dd-wrt on the other partition will not work. I have also tried having dd-wrt installed on both partitions and switching the Factory firmware and dd-wrt installed partitions. And I have tried holding the reset button for a full minute. It comes down to my Windows laptop connected directly to modem gets dhcp id assigned, Factory firmware on WRT1900ACSv2 gets dhcp ip assigned but dd-wrt on the same router does not get dhcp ip address. I found another thread on the forum which mentioned Windows dhcp client tries with unicast (0x0000) first and if that fails, it switches to multicast (0x8000) and the person posting that info in the thread thought that was the difference maker.
kernel-panic69
DD-WRT Guru


Joined: 08 May 2018
Posts: 14126
Location: Texas, USA

PostPosted: Sun Jul 24, 2022 0:02    Post subject: Reply with quote
Try going to Security -> Firewall and unchecking "Filter Multicast", save, reboot in DD-WRT. Don't know why you'd need multicast to be working for this to work. Actually, while we're here, share what is checked on the Firewall page. I'm wondering if it's something else that needs to happen instead, like check or un-check "Filter TOS".
_________________
"Life is but a fleeting moment, a vapor that vanishes quickly; All is vanity"
Contribute To DD-WRT
Pogo - A minimal level of ability is expected and needed...
DD-WRT Releases 2023 (PolitePol)
DD-WRT Releases 2023 (RSS Everything)

----------------------
Linux User #377467 counter.li.org / linuxcounter.net
HapHazardly
DD-WRT Novice


Joined: 04 Apr 2018
Posts: 22

PostPosted: Sun Jul 24, 2022 15:16    Post subject: Reply with quote
Unchecked Filter Multicast and there was no change. The results from tcpdump are still the same and no success with udhcpc getting an ip address. These are the settings I have for Firewall:

SPI Firewall - enabled
Additional Filters - Proxy, Cookies, Java Applets, ActiveX, ToS/DSCP all off - ARP Spoofing Protection on
Block WAN Requests - Block Anonymous, Filter IDENT, Block WAN SNMP all on - Filter Multicast, Filter WAN NAT Redirection both off
Impede WAN DoS / Bruteforce all off
Connection Warning Notifier off
Firewall Log off

I tried setting/unsetting most of the options that seemed likely to have some effect but none of them changed anything at all with respect to udhcpc and tcpdump. Some of the versions of udhcpc I have come across while searching for source either have an entry which can go in the configuration file for broadcast enabling or a command like parameter for it. As far as I can tell the version of udhcpc used by dd-wrt does not have this parameter (or at least doesn't do anything with it). I am not sure where the config file lives which udhcpc uses (if it even exists) so I have not been able to test adding the broadcast setting to the config file. I think the next thing I will try to do is use wireshark to try to capture what my Windows box does for dhcp when connected directly to the modem. If I knew how to capture the traffic when the router is using factory firmware I would do that too.
dale_gribble39
DD-WRT Guru


Joined: 11 Jun 2022
Posts: 1899

PostPosted: Sun Jul 24, 2022 17:07    Post subject: Reply with quote
General rule of thumb when changing firewall configurations is that you should reboot when changes have been saved. Are you running any special startup, USB, firewall scripts? Does your ISP require IPv6 for uplink? Is your WAN MAC address correct in DD-WRT?
_________________
"The woods are lovely, dark and deep,
But I have promises to keep,
And miles to go before I sleep,
And miles to go before I sleep." - Robert Frost

"I am one of the noticeable ones - notice me" - Dale Frances McKenzie Bozzio

<fact>code knows no gender</fact>

This is me, knowing I've ruffled your feathers, and not giving a ****
Some people are still hard-headed.

--------------------------------------
Mac Pro (Mid 2012) - Two 2.4GHz 6-Core Intel Xeon E5645 processors 64GB 1333MHz DDR3 ECC SDRAM OpenSUSE Leap 15.5
HapHazardly
DD-WRT Novice


Joined: 04 Apr 2018
Posts: 22

PostPosted: Sun Jul 24, 2022 17:29    Post subject: Reply with quote
"Are you running any special startup, USB, firewall scripts?" No, not that I am aware of.

"Does your ISP require IPv6 for uplink?" As far as I know, no. Remember this router was working fine on dd-wrt r35681 with the same ISP then after power outage it could no longer get dhcp ip address. So maybe the ISP changed something some time back and as long as the router was just renewing the ip, the problem never presented?

"Is your WAN MAC address correct in DD-WRT?" Using the same MAC that works with the factory firmware on the same router.

The more I think about it, the more it seems like maybe something changed at the ISP which was not affecting me until there was a complete power reset of both router and modem. Unfortunately, since the router with factory firmware and my Windows PC can both obtain dhcp ip address from the modem, I am certain the ISP is going to tell me it's my problem and not theirs. At this point my plan is to try to find a very recent copy of source for udhcpc, modify it so it supports broadcast, compile it and somehow get it on my router (maybe via usb?) so I can try running it instead of the udhcpc included in dd-wrt.
dale_gribble39
DD-WRT Guru


Joined: 11 Jun 2022
Posts: 1899

PostPosted: Sun Jul 24, 2022 17:49    Post subject: Reply with quote
If you have not done a hard reset (nvram erase && reboot) in DD-WRT for fear of losing your stock firmware configurations, then you should consider biting the bullet, as SurprisedItWorks has already suggested. It seems to me that people who maintain a stock firmware partition on these wind up with issues from time to time, anyway; if they don't, they are lucky. As far as I know of, udhcpc in DD-WRT -does- support broadcast, so I think trying to recompile the binary for your platform is moot.
_________________
"The woods are lovely, dark and deep,
But I have promises to keep,
And miles to go before I sleep,
And miles to go before I sleep." - Robert Frost

"I am one of the noticeable ones - notice me" - Dale Frances McKenzie Bozzio

<fact>code knows no gender</fact>

This is me, knowing I've ruffled your feathers, and not giving a ****
Some people are still hard-headed.

--------------------------------------
Mac Pro (Mid 2012) - Two 2.4GHz 6-Core Intel Xeon E5645 processors 64GB 1333MHz DDR3 ECC SDRAM OpenSUSE Leap 15.5
egc
DD-WRT Guru


Joined: 18 Mar 2014
Posts: 12837
Location: Netherlands

PostPosted: Sun Jul 24, 2022 17:56    Post subject: Reply with quote
I think it is coming from busybox

The config:

# CONFIG_WHOIS is not set
# CONFIG_ZCIP is not set
# CONFIG_UDHCPD is not set
# CONFIG_FEATURE_UDHCPD_BASE_IP_ON_MAC is not set
# CONFIG_FEATURE_UDHCPD_WRITE_LEASES_EARLY is not set
CONFIG_DHCPD_LEASES_FILE=""
# CONFIG_DUMPLEASES is not set
# CONFIG_DHCPRELAY is not set
CONFIG_UDHCPC=y
# CONFIG_FEATURE_UDHCPC_ARPING is not set
# CONFIG_FEATURE_UDHCPC_SANITIZEOPT is not set
CONFIG_UDHCPC_DEFAULT_SCRIPT="/tmp/udhcpc"
# CONFIG_UDHCPC6 is not set
# CONFIG_FEATURE_UDHCPC6_RFC3646 is not set
# CONFIG_FEATURE_UDHCPC6_RFC4704 is not set
# CONFIG_FEATURE_UDHCPC6_RFC4833 is not set
# CONFIG_FEATURE_UDHCPC6_RFC5970 is not set

#
# Common options for DHCP applets
#
# CONFIG_FEATURE_UDHCP_PORT is not set
CONFIG_UDHCP_DEBUG=0
CONFIG_UDHCPC_SLACK_FOR_BUGGY_SERVERS=80
CONFIG_FEATURE_UDHCP_RFC3397=y
# CONFIG_FEATURE_UDHCP_8021Q is not set
CONFIG_IFUPDOWN_UDHCPC_CMD_OPTIONS=""

#

_________________
Routers:Netgear R7000, R6400v1, R6400v2, EA6900 (XvortexCFE), E2000, E1200v1, WRT54GS v1.
Install guide R6400v2, R6700v3,XR300:https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=316399
Install guide R7800/XR500: https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=320614
Forum Guide Lines (important read):https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=324087
HapHazardly
DD-WRT Novice


Joined: 04 Apr 2018
Posts: 22

PostPosted: Sun Jul 24, 2022 18:54    Post subject: Reply with quote
@dale_gribble39 - I have tried resetting nvram since at this point I am not running anything besides default configs and whatever custom configs I might have had are long gone. Also, I have tried installing dd-wrt on both partitions and resetting nvram all with no change in behavior. When I re-install factory firmware on one of the partitions it works right away.

@egc - that is some useful information. Where did you find it? Maybe I can edit that config to include the broadcast option.

If the udhcpc included in dd-wrt includes support for broadcast (0x8000) I have yet to find a way to enable it. After dumping my Windows PC traffic when connected directly to the modem (via wireshark), I am even more convinced the missing broadcast setting is the issue. The 0x8000 was present in the discover sent to the modem from my Windows PC and nothing I have tried with dd-wrt changes it from 0x0000. Comparing the captures is a bit difficult because wireshark and tcpdump output a little differently but as far as I can tell, the 0x0000 vs 0x8000 is the only significant difference between the two discover attempts.
HapHazardly
DD-WRT Novice


Joined: 04 Apr 2018
Posts: 22

PostPosted: Sun Jul 24, 2022 20:23    Post subject: Reply with quote
Update: I realized I had not tried the -B option (which should be broadcast) with the 1.35.0 version of udhcpc so I tried it and tcpdump showed the 0x8000! Unfortunately everything else remains unchanged. Still just repeating the discover and not getting an ip address from dhcp. Now that I have the 0x8000 working I am not sure where else to go from here. I guess udhcpc is just not going to work with my ISP while other proprietary dhcp clients (Windows PC and router factory firmware) will work with my ISP.
kernel-panic69
DD-WRT Guru


Joined: 08 May 2018
Posts: 14126
Location: Texas, USA

PostPosted: Sun Jul 24, 2022 20:34    Post subject: Reply with quote
I'm fairly certain, but not entirely sure that DD-WRT is *not* using the patches from OpenWRT/FreshTomato, but the only thing blatantly different is the slack for buggy servers (FT uses a value of 924, currently, I didn't look that closely at OpenWRT). The thing I really don't like about the build system is you have to go to a dozen different places to connect the dots (or not). What I have found/noticed so far tells me some things are not 100% in sync with whatever is on the build server, although I know that some things are visible only during the build script being run. But the thing is, if this device is "broken", then everyone's router would be "broken", right? I don't see where there is a definite pointer to "broadcast" in what you posted, @egc. Are you suggesting that lack of using FEATURE_UDHCPC_ARPING is to blame?

https://svn.dd-wrt.com/browser/src/router/rules/busybox.mk#L315

https://svn.dd-wrt.com/browser/src/router/busybox/networking/udhcp/Config.src

https://svn.dd-wrt.com/browser/src/router/busybox/.config_std#L801

https://svn.dd-wrt.com/browser/src/router/configs/mvebu/.config_wrt1900ac#L200

@HapHazardly: have you tried going to the Status -> WAN page and clicking release or renew after DD-WRT has booted up? Seriously don't understand how with the myriad of testing options I have that I am not seeing this happen. Also to note, you said you've reset, but you haven't said that you have performed 'nvram erase && reboot' via ssh/telnet at least once, if not 5-10 times for good measure. Anyhow, I'm at a loss. This is something above my paygrade, but I am hesitant to inquire with the boss man.

_________________
"Life is but a fleeting moment, a vapor that vanishes quickly; All is vanity"
Contribute To DD-WRT
Pogo - A minimal level of ability is expected and needed...
DD-WRT Releases 2023 (PolitePol)
DD-WRT Releases 2023 (RSS Everything)

----------------------
Linux User #377467 counter.li.org / linuxcounter.net
Goto page Previous  1, 2, 3  Next Display posts from previous:    Page 2 of 3
Post new topic   Reply to topic    DD-WRT Forum Index -> Marvell MVEBU based Hardware (WRT1900AC etc.) All times are GMT

Navigation

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum