OpenWrt Forum Archive

Topic: autoconfiguration of dhcp

The content of this topic has been archived on 9 Feb 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

i'm using the experimental code on a wrt54g v2.2, and, annoyed that the dhcp server tries to allocate numbers in the 192.168.1.x range regardless of my lan_ipaddr nvram setting, i hacked an autoconfig script for it. it doesn't have much smarts but it will at least give ips in the correct range for the most basic setups. see http://jcomeau.com/blog/?2005-03-15 if interested... gpl of course...

just noticed that my script won't work correctly for subnets shorter than /24, inasmuch as it may allocate beyond the end of the netblock (depending on how much smarts the dhcp server has)

The discussion might have continued from here.