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

Two Static Leases for One computer

Discussion in 'Tomato Firmware' started by ng12345, Nov 5, 2007.

  1. ng12345

    ng12345 LI Guru Member


    A lot of the computers on my network are laptops and thus have both wireless and wired capabilities. Since I use port forwarding, I want them to be able to forward correctly regardless of whether they are connected via wired or wireless.

    As such each computer has 2 static leases, one for their wired MAC and another for their wireless MAC. I was able to do this with the same hostname on dd-wrt but on tomato, it will not accept two leases being given to the same hostname.

    So for example:
    my static leases page looks like this:
    MAC 1 192.168.x.3 hostnamexyz
    MAC 2 192.168.x.4 hostnamexyz - 2

    my port forwarding page may look like this:
    Both 11111 3939 192.168.x.2
    Both 11112 3939 192.168.x.3

    Where MAC 1 & 2 are macs for the wired and wireless connections on the same computer. And as evidenced by the port forwarding page, both ip addresses will be able to access the same internal port.

    The only issue with this set up is that the logs show errors when giving out the leases such as this:
    daemon.warn dnsmasq[857]: not giving name hostnamexyz to the DHCP lease of 192.168.x.3 because the name exists in /etc/hosts.dnsmasq with address 192.168.x.4

    Is there a way to get around this? As I said dd-wrt did not have this same issue since it allowed you to save two MACs with two different leases to the same hostname
  2. roadkill

    roadkill Super Moderator Staff Member Member

    you can use UPNP on the computer to set your port forwards regardless of the IP.
  3. RonWessels

    RonWessels Network Guru Member

    Do they ever connect simultaneously with both wired and wireless? If so, why? If not, why not have both wired and wireless map to the same IP address? That way, one laptop gets the same IP address regardless of its access mechanism. It will also halve your port forwarding page.
  4. rizsher

    rizsher Network Guru Member

    Pretty sure you can't assign the same IP address twice, so that wouldn't work either.
  5. kbisanz

    kbisanz LI Guru Member

    I know it's not the optimal solution, but you could probably change the MAC address of either the wired or wireless card to be the same as the other.

    Obviously, if you connect both wireless and wired at the same time, you'll have problems. I've haven't actually tried it, so I'm just guessing it would work.
  6. ng12345

    ng12345 LI Guru Member

    Connecting simultaneously -- it is quite a hassle to disable my wireless connection every time I decide to use the lan.

    It seems to be working ok with different host names for the two leases -- but I don't understand the point of this restriction -- it should be restricting the MACs not the hostnames, right?
  7. ng12345

    ng12345 LI Guru Member

    Never mind I figured it out

    the hostname field is not required -- if you leave it blank then it works without errors

Share This Page