Lightning fried... udhcpd?!

All about firmwares for routers. Support for RouterTech firmwares is here too.
hyperair
Experienced
Experienced
Posts: 202
Joined: Sun Oct 14, 2007 4:04 pm

Lightning fried... udhcpd?!

Post by hyperair » Mon Jun 15, 2009 4:58 pm

So, my router (DSL-G604T) braved another thunderstorm, emerging barely alive. Prior to the thunderstorm, I had pulled the power plug, anticipating some rather violent electric activity overhead. I completely forgot I had to yank the telephone wire out as well.

Post-thunderstorm, I turned on the router to meet strange looking ethernet LEDs (1 and 3 are on, and blinking randomly; 2 and 4 remain off unless an ethernet cable is stuck in). Wireless still worked, as did the ADSL part, but dear lord, it partially fried my ethernet ports (they work on and off, and I can't seem to get the TI Remote app to talk to the modem, nor the DarkWolf modded D-Link firmware upgrader program).

So, it looks like I can't reflash the firmware save for using the web interface, which I frankly have ~0% success doing. Normally this wouldn't bother me much, but udhcpd has gone nuts, or so it seems. Running udhcpd manually seems to indicate that udhcpd is working properly, with one exception: none of the DHCP{OFFER,ACK,NAK} packets seem to be reaching the clients, even if udhcpd claims to have sent them. I was pretty curious about this, and set up some iptables rules:

Code: Select all

iptables -I INPUT -p udp --sport 67:68 --dport 67:68 -j LOG
iptables -I OUTPUT -p udp --sport 67:68 --dport 67:68 -j LOG
And sure enough, all the incoming DHCP packets are logged (in /proc/kmsg), but none of the outgoing DHCP packets. So, I'm wondering now, what else could be blocking these packets, since udhcpd claims to be sending them out? I'm currently running a separate DHCP server on my notebook temporarily until I get round to configuring the other computers to use static IP addresses (or get to the root of this matter), and the first iptables rule shown above picks all the packets from this said DHCP server up nicely.

My firmware version is 2.4, since I was away from home for some time and never got round to upgrading it, and my udhcpd.conf is as follows:

Code: Select all

start 192.168.1.2
end 192.168.1.254
inflease_time 604800
interface br0
opt router 192.168.1.1
opt dns 192.168.1.1
opt subnet 255.255.255.0
opt lease 3600
conflict_time 3600
lease_file /var/tmp/landhcps0.leases
User avatar
thechief
RouterTech Team
RouterTech Team
Posts: 12067
Joined: Wed Feb 01, 2006 10:22 pm
Location: England, the Centre of Africa
Contact:

Post by thechief » Mon Jun 15, 2009 5:34 pm

If the hardware is fried, why do you think flashing a firmware will help?

PS: I don't think you have firmware v2.4, which was only released for the 1350A wireless routers.
The Chief: :afro: Be sure to read the Firmware FAQ and do a Forum Search before posting!
No support via PM. Ask all questions on the open forum.
hyperair
Experienced
Experienced
Posts: 202
Joined: Sun Oct 14, 2007 4:04 pm

Post by hyperair » Mon Jun 15, 2009 5:41 pm

The dhcp server is a firmware-based thing, is it not? I really can't see how hardware issues can permit an external DHCP server to work using the same access point, while the internal DHCP server refuses to work properly.

As for the firmware version, you're right, it's actually 2.8. I didn't look properly.
User avatar
thechief
RouterTech Team
RouterTech Team
Posts: 12067
Joined: Wed Feb 01, 2006 10:22 pm
Location: England, the Centre of Africa
Contact:

Post by thechief » Mon Jun 15, 2009 11:25 pm

hyperair wrote:The dhcp server is a firmware-based thing, is it not? I really can't see how hardware issues can permit an external DHCP server to work using the same access point, while the internal DHCP server refuses to work properly.
The flash chip might be affected, so that the data is partly corrupted. If it is just corrupt data, then reflashing might sort it out (assuming that the part containing the bootloader is wholly unaffected). If the flash chip is actually damaged, reflashing might just convert something that is currently partly working to a worthless piece of junk.
The Chief: :afro: Be sure to read the Firmware FAQ and do a Forum Search before posting!
No support via PM. Ask all questions on the open forum.
hyperair
Experienced
Experienced
Posts: 202
Joined: Sun Oct 14, 2007 4:04 pm

Post by hyperair » Tue Jun 16, 2009 3:17 am

That... doesn't sound good. But either way, with my ethernet port working as erratically as that, I don't think I can get it to talk to the bootloader without, say, a JTAG (which I don't really feel up to building). Is there any way I can poke udhcpd to work properly short of reflashing the firmware?
User avatar
thechief
RouterTech Team
RouterTech Team
Posts: 12067
Joined: Wed Feb 01, 2006 10:22 pm
Location: England, the Centre of Africa
Contact:

Post by thechief » Tue Jun 16, 2009 7:03 am

hyperair wrote:Is there any way I can poke udhcpd to work properly short of reflashing the firmware?
Not that I know of.
The Chief: :afro: Be sure to read the Firmware FAQ and do a Forum Search before posting!
No support via PM. Ask all questions on the open forum.
hyperair
Experienced
Experienced
Posts: 202
Joined: Sun Oct 14, 2007 4:04 pm

Post by hyperair » Tue Jun 16, 2009 7:11 am

I guess I'll just run a DHCP server on one of my computers and statically configure the IP addresses of most of the computers then. Thanks anyway.
mstombs
RouterTech Team
RouterTech Team
Posts: 3753
Joined: Wed Jan 10, 2007 11:54 pm

Post by mstombs » Tue Jun 16, 2009 8:48 am

Does the switch work better if you force your lan to 10MBps?
Linksys WAG54GV2 suffer from failing capacitors around its switch chip (and a short term workaround is to reduce speed).

FWIW I don't think you have a firmware/flash problem, I don't see how it could cause such a subtle error.
hyperair
Experienced
Experienced
Posts: 202
Joined: Sun Oct 14, 2007 4:04 pm

Post by hyperair » Tue Jun 16, 2009 9:00 am

I tried that, but for some reason, it ended up disabling the whole switch. "Set Value" = Auto, "Fallback value = Disabled", and ethernet ports don't work.

As for the subtle error we're talking about, I don't see what could cause it on the hardware side at all. Especially when a separate DHCP server on the network can dish out IP addresses successfully. But the fact remains that prior to the storm, it worked perfectly, and after that, these errors appeared.
User avatar
thechief
RouterTech Team
RouterTech Team
Posts: 12067
Joined: Wed Feb 01, 2006 10:22 pm
Location: England, the Centre of Africa
Contact:

Post by thechief » Tue Jun 16, 2009 9:12 am

A fragmented environment can cause a great deal of woe. Do you have a serial console cable?
The Chief: :afro: Be sure to read the Firmware FAQ and do a Forum Search before posting!
No support via PM. Ask all questions on the open forum.
hyperair
Experienced
Experienced
Posts: 202
Joined: Sun Oct 14, 2007 4:04 pm

Post by hyperair » Tue Jun 16, 2009 10:28 am

No I don't, unfortunately.
User avatar
thechief
RouterTech Team
RouterTech Team
Posts: 12067
Joined: Wed Feb 01, 2006 10:22 pm
Location: England, the Centre of Africa
Contact:

Post by thechief » Tue Jun 16, 2009 5:57 pm

Have you tried the RRT?
The Chief: :afro: Be sure to read the Firmware FAQ and do a Forum Search before posting!
No support via PM. Ask all questions on the open forum.
hyperair
Experienced
Experienced
Posts: 202
Joined: Sun Oct 14, 2007 4:04 pm

Post by hyperair » Tue Jun 16, 2009 6:20 pm

What's that?
User avatar
thechief
RouterTech Team
RouterTech Team
Posts: 12067
Joined: Wed Feb 01, 2006 10:22 pm
Location: England, the Centre of Africa
Contact:

Post by thechief » Tue Jun 16, 2009 6:22 pm

The Router Repair Tool.
The Chief: :afro: Be sure to read the Firmware FAQ and do a Forum Search before posting!
No support via PM. Ask all questions on the open forum.
hyperair
Experienced
Experienced
Posts: 202
Joined: Sun Oct 14, 2007 4:04 pm

Post by hyperair » Tue Jun 16, 2009 6:24 pm

Er no, I haven't. Is that some kind of new PC-tool or something?
Post Reply