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

hand out IP addresses in order?

Discussion in 'Tomato Firmware' started by schnikies79, Jun 12, 2008.

  1. schnikies79

    schnikies79 LI Guru Member

    Why does tomato set a random IP address within the possible range (192.168.1.100 - 192.168.1.254) instead of picking the next avail address?

    I used to use thibor 15c and it would always give next avail. If had computers using 192.168.1.100 - 192.168.1.105, it would give the next computer 192.168.1.106 instead of something like 192.168.1.137.

    Is it possible to make tomato do this? I connect a lot of headless boxes and it would be nice knowing what address it's going to get instead of having to research after the fact.
     
  2. LLigetfa

    LLigetfa LI Guru Member

    Predictability is the first weakness in security. Why not do DHCP reservations if you really want predictability?
     
  3. fyellin

    fyellin LI Guru Member

    Looking at the source code (address_allocate in dnsmasq/src/dhcp.c), it appears that the code is doing what it's doing on purpose.

    It's purposely hashing the hardware address, and then uses that as a starting point to find an available address. I suppose it's goal is so that a dhcp client is likely to get the same address every time it's on the network.

    I found this very confusing the first time I saw it. Why does this computer have an IP address near the end of my DHCP range when it's the first computer I've offered a lease to? Has my network been hacked?

    I don't see any obvious flags to get around it.
     
  4. mstombs

    mstombs Network Guru Member

Share This Page