raiXer DD-WRT Novice
Joined: 15 Mar 2009 Posts: 4
|
Posted: Fri May 01, 2009 5:06 Post subject: [SOLVED] 2 different dhcp settings with different gateways |
|
Hello,
I have a linksys router with dd-wrt micro and I would like to know if it is possible to create a dhcp setting that gives a static ip to certain mac addresses but with different gateway address than the rest.
My router has a WAN which is connected to a cable ISP which is the default gateway for all the computers. DHCP is configured as 172.16.51.0/24 and gateway 172.16.51.1. Then I have a Linux desktop server connected to one of the lan ports in the router. This linux server has a second card with internet access and is already configured to share the connection. The linux server has an ip of 172.16.51.2 on the LAN side. I got two mac addresses in my network that I want to configure so that it still gets the same subnet ip but gets 172.16.51.2 as gateway instead of 172.16.51.1.
Any ideas?
Last edited by raiXer on Fri May 01, 2009 7:25; edited 1 time in total |
|
raiXer DD-WRT Novice
Joined: 15 Mar 2009 Posts: 4
|
Posted: Fri May 01, 2009 7:21 Post subject: |
|
well nevermind, I found a solution by reading the DNSmasq manpage.
Here is the solution for anyone else who wants to do it:
dhcp-range=net:2,172.16.51.0,255.255.255.0,static
dhcp-option=net:2,3,172.16.51.2
then use dhcp-host=<hwaddr>, net:2, <ipaddr>
this works even if it is in the same subnet of my main dhcp settings probably because I have set the secondary dhcp as static which means it won't be used as dynamic dhcp. |
|