1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

HyperWRT 2.0 variant (G-only) with patched DHCP

Discussion in 'HyperWRT Firmware' started by afyfe, Feb 13, 2005.

  1. afyfe

    afyfe Network Guru Member

    I've built, starting from Avenger's HyperWRT 2.0, a variant that includes a patched udhcpd program. It does not provide static dhcp; instead it includes a corrected version of the patch I offered a couple of months ago to make the assigned addresses more predicable. I'm running it on my WRT54G, and it has currently assigned .111, .116, .128, .133, and .145 from the .100 - .149 range. The machines should continue to get these addesses consistently. So it offers some of the advantages of static dhcp, but not all.

    All the patch does is change the rule for searching for an available IP address. Instead of starting with the beginning address, it starts somewhere between the start and end, specifically the start plus (last 4 bytes of MAC) mod (size of the DHCP address range).

    With a range of 50 IPs and 5 random MACs, the 5 remainders should be different more than 80% of the time. Again with 5 random MACs, at least one of 49, 50 or 51 for the range should give 5 different remainders more than 99% of the time.


    The zip file includes the patch, as well as downloadable firmware. It's "G" only, as that's the type of box I own. Though I'm currently running this firmware, no one else has. Anyone is welcome to try it, but you should keep Avenger's version around should mine not work for you.
  2. norelidd

    norelidd Network Guru Member

    hey, great work on this. it's been working great for me since the day you posted it. any chance of an update to the newest hyperwrt core? i really loves me some static-ish ip
  3. madhatter

    madhatter Network Guru Member

    I have a static ip on my computer on the network using hyperwrt. I read it some where it already suppports this(undocumented feature). Just set up your computer with a static ip that is below the start of the dhcp numbers. i.e Has worked fine for me on my network of 5 computers. Mine is the only one with the static ip the rest are set via dhcp.
  4. MoinMan

    MoinMan Network Guru Member

    You are describing normal static IP. Static DHCP means that you can leave your pc configured to get its IP by DHCP and the router always assigns the same IP to the specific pc based on its MAC - and you configure that in your router(dhcp server).
    This is very comfortable for a notebook with WLAN: if your not at home(i.e. work) you get a correct ip via dhcp and at home you don't have to reconfigure to get the "correct IP" so all port forwardings you have configured work.
  5. madhatter

    madhatter Network Guru Member

    Thanks for putting me right on that one.

Share This Page