[SOLVED] 2 different dhcp settings with different gateways

Post new topic   Reply to topic    DD-WRT Forum Forum Index -> Broadcom SoC based Hardware
Author Message
raiXer
DD-WRT Novice


Joined: 15 Mar 2009
Posts: 4

PostPosted: Fri May 01, 2009 5:06    Post subject: [SOLVED] 2 different dhcp settings with different gateways Reply with quote
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
Sponsor
raiXer
DD-WRT Novice


Joined: 15 Mar 2009
Posts: 4

PostPosted: Fri May 01, 2009 7:21    Post subject: Reply with quote
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.
Display posts from previous:    Page 1 of 1
Post new topic   Reply to topic    DD-WRT Forum Forum Index -> Broadcom SoC based Hardware All times are GMT

Navigation

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum