What's new

Bootp dhcp broadcast flag

  • SNBForums Code of Conduct

    SNBForums is a community for everyone, no matter what their level of experience.

    Please be tolerant and patient of others, especially newcomers. We are all here to share and learn!

    The rules are simple: Be patient, be nice, be helpful or be gone!

Tom_Hall

Occasional Visitor
Hi - (I have an ASUS RT-AC87U), and I'm having a problem with one of the devices on my network (an EE/T-Mobile Signal Box), which I think may be related to a recent firmware rolled-out to my ISP's cablemodem/router (VirginMedia SuperHub2)

(here's a link to the discussion thread in VirginMedia's forum)

http://community.virginmedia.com/t5...o-v2-01-03-broke-modem-only-mode/td-p/2860733

Is there any way that I can view/set the bootp dchp broadcast flag on my router, via the gui, or ssh ?
 
You will need to redirect the packets to a computer with a sniffer. Sniffers are not provided by default on consumer routers.

Or install tcpdump on the router through Entware.
 
I don't claim to understand how this works but you could try manually adding the "-B" flag to udhcpc.
Code:
BusyBox v1.20.2 (2015-07-14 17:08:44 MST) multi-call binary.

Usage: udhcpc [-fbqaRB] [-t N] [-T SEC] [-A SEC/-n]
     [-i IFACE] [-s PROG] [-p PIDFILE]
     [-oC] [-r IP] [-V VENDOR] [-F NAME] [-x OPT:VAL]... [-O OPT]...

     -i,--interface IFACE       Interface to use (default eth0)
     -s,--script PROG   Run PROG at DHCP events (default /tmp/udhcpc)
     -p,--pidfile FILE  Create pidfile
     -B,--broadcast             Request broadcast replies
     -t,--retries N             Send up to N discover packets (default 3)
     -T,--timeout SEC   Pause between packets (default 3)
     -A,--tryagain SEC  Wait if lease is not obtained (default 20)
     -n,--now           Exit if lease is not obtained
     -q,--quit          Exit after obtaining lease
     -R,--release               Release IP on exit
     -f,--foreground            Run in foreground
     -b,--background            Background if lease is not obtained
     -S,--syslog                Log to syslog too
     -a,--arping                Use arping to validate offered address
     -r,--request IP            Request this IP address
     -o,--no-default-options    Don't request any options (unless -O is given)
     -O,--request-option OPT    Request option OPT from server (cumulative)
     -x OPT:VAL         Include option OPT in sent packets (cumulative)
                        Examples of string, numeric, and hex byte opts:
                        -x hostname:bbox - option 12
                        -x lease:3600 - option 51 (lease time)
                        -x 0x3d:0100BEEFC0FFEE - option 61 (client id)
     -F,--fqdn NAME             Ask server to update DNS mapping for NAME
     -V,--vendorclass VENDOR    Vendor identifier (default 'udhcp VERSION')
     -C,--clientid-none Don't send MAC as client identifier
Signals:
     USR1       Renew lease
     USR2       Release lease

Code:
# ps w | grep udhcpc
1195 admin     1444 S    udhcpc -i eth0 -p /var/run/udhcpc0.pid -s /tmp/udhcpc -t2 -T5 -A160 -O33 -O249

# killall udhcpc

# udhcpc -i eth0 -p /var/run/udhcpc0.pid -s /tmp/udhcpc -B -t2 -T5 -A160 -O33 -O249
udhcpc (v1.20.2) started
eth0: No such process
Sending discover...
Sending select for 81.102.xxx.yyy...
Lease of 81.102.xxx.yyy obtained, lease time 480826
Nothing to flush.
Nothing to flush.

# ps w | grep udhcpc
1269 admin     1444 S    udhcpc -i eth0 -p /var/run/udhcpc0.pid -s /tmp/udhcpc -B -t2 -T5 -A160 -O33 -O249
 
Last edited:
@ColinTaylor Thanks for this code. I'm suffering the same problem and there is very little inof out there apart from this thread. Would you mind explaining how to use this code in Merlin's firmware to test if it solves the problem? I've tried to find some documentation about udhcpc and broadcast/unicast flags but no luck.
 
@ColinTaylor Thanks for this code. I'm suffering the same problem and there is very little inof out there apart from this thread. Would you mind explaining how to use this code in Merlin's firmware to test if it solves the problem? I've tried to find some documentation about udhcpc and broadcast/unicast flags but no luck.
First you need to enable telnet or ssh access to the router through its web interface. Then log on to the router as "admin" using your preferred client software (i.e. PuTTY).

Issue the command "ps w | grep udhcpc" so that you can see the currently running command.

Kill the current process with "killall udhcpc"

Restart the udhcpc process using the same parameters as before but adding the "-B" option.

If it fixes your problem you should see the message saying that it has obtained a lease.

To make the change permanent you would have to write a custom script to issue that command automatically at boot time.
 
Thanks so much for getting back to me so quickly and for your help. I'll give this a spin later. Is there anywhere you can get full documentation on udhcpc? Also when I ssh in is there a ipconfig/ifconfig command I can run to check which interface I wanna start playing with - looks like eth0 on your code but will this be the same for me?
 
All the information I'm aware of is in my original post. There are different versions of udhcpc so we can only go by the built-in help and Google! (From Google we can find the original request to add the broadcast flag back in 2011 - http://lists.busybox.net/pipermail/busybox/2011-February/074823.html)

As for the interface. That is why we issue the "ps w | grep udhcpc" command. So we can see not only the parameters but the interface.

I know that the WAN interface on the N66U is eth0 but I don't know if that's true for all routers or for people with non-standard setups (i.e. dual-WAN). You can run an "ifconfig -a" if you want to confirm.
 
@ColinTaylor ... I'm suffering the same problem ...

If you really do have the same problem as I had ...
i.e. you're on VirginMedia, and things not working properly using your SuperHub2 in modem-mode, with your own router ...

The problem (in my case), was caused by Virgin's recent "dodgy" SH2 firmware update

The fix is simply to ask Virgin (via the forums), to swap-out your SH2 for a SH2ac model (the SH2ac has different firmware and is unaffected)
 
But this is whats weird I was only set up yesterday and was give a SHac model......

I would suggest also posting in the Virgin>Broadband>Set up forum (if you haven't already), and see what Virgin's forum staff suggest - they can also remotely run checks on your line & signal levels etc.
 
I will do that if a little bit more experimenting doesn't help. I really do think this is the issue though, because as the user m01 found in the Virgin forums, when I plug in my mac or laptop to the SHac in modem mode without the router, the mac happily grabs the lease from Virgin so it really has to be something to do with the dhcp handshake.
 
Got it working last night without messing with udhcpc. I decided to upgrade my merlin build (it was old) factory reset the asus, turn off Virgin SHac for 15mins and then reboot everything together hooked up. It would seem that Virgin gave a new lease and the Asus grabbed it fine. I wonder if they lease the IP to the mac and won't let that change unless its a new/expired lease? That would explain why it was working with my laptop directly plugged in but not the router - shoulda tested spoofing the laptop's mac and seen what happened. Oh well, thanks for the help everyone and if anyone else stumbles into here with similar issues it really is worth shutting down the SHac for 10-15mins to force a new leased address.
 

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!
Top