Change Default Gateway/DNS that is sent out to DHCP Clients

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


Joined: 10 Aug 2006
Posts: 2

PostPosted: Thu Aug 10, 2006 5:39    Post subject: Change Default Gateway/DNS that is sent out to DHCP Clients Reply with quote
Hi All,

I have the following setup.

Cisco 2500
Ethernet0 to Internet
Ethernet1 to Cisco 2900

Cisco 2900 Port 24 to Linksys WRT54Gv5

Computers plug into the other 22 Cisco Ports

Cisco 2500 IP x.x.x.251
WRT54G IP x.x.x.252

Now my thinking is that the WRT54G can work as my DHCP Server / WAP because at this point the Cisco 2500 cannot.

What I am wanting to do is have the WRT54G send out x.x.x.251 as the default gateway instead of x.x.x.252 and the static dns server IPs that I get from my ISP.

I have loaded DD-WRTx23 SP2 on to the WRT54G, and in the Basic Setup page I gave the router a gateway of x.x.x.251 and static dns 1/2 my ISPs DNS Servers however these are not sent out in the DHCP, when I do an IPCONFIG /ALL on my client the Default Gateway and DNS Server are x.x.x.252.

Anyone know how to configure/setup this situation?

Thank you much,
Brian
Sponsor
Eko
DD-WRT Developer/Maintainer


Joined: 07 Jun 2006
Posts: 5771

PostPosted: Thu Aug 10, 2006 6:04    Post subject: Reply with quote
No problem:

On setup page: uncheck "Use DNS masq for DNS"

On "Administration" -> "Services": DNSMasq: add
Code:
dhcp-option=3,x.x.x.x
to "Additional DNS Options" (x.x.x.x is your gateway)
shipmb
DD-WRT Novice


Joined: 10 Aug 2006
Posts: 2

PostPosted: Thu Aug 10, 2006 6:31    Post subject: Reply with quote
Awsome, works great!!! Thanks
mac913
DD-WRT Guru


Joined: 02 May 2008
Posts: 1848
Location: Canada

PostPosted: Sun Oct 09, 2011 7:11    Post subject: Reply with quote
Eko wrote:
No problem:

On setup page: uncheck "Use DNS masq for DNS"

On "Administration" -> "Services": DNSMasq: add
Code:
dhcp-option=3,x.x.x.x
to "Additional DNS Options" (x.x.x.x is your gateway)


This fixed my Gateway address issues to my network devices.

Basically I have a E3000 as a Gateway (192.168.1.254) with wireless disabled connected (wired) to a WRT320 for 5Ghz WDS Host (192.168.1.1) with DHCP services. I use this setup for 2 reasons; 1st WDSing 320, 610v1 & E2000 works (WDS with E3000 does not work with 610v1). 2nd I needed more Gigabit Ports on the Gateway, this setup gave me 7 LAN ports.

Having the 320 as the WDS Host and DHCP Server means that I can experiment with the E3000 Gateway without loosing my local network (less 3 LAN Ports).

My only problem was that every device was given the wrong Gateway address (192.168.1.1), internet access worked but didn't look right.....

IP Address 192.168.1.xxx
Subnet Mask 255.255.255.0
Default Gateway 192.168.1.1
DHCP Server 192.168.1.1
DNS Server 192.168.1.254

All WDS router are configured with Gateway and Local DNS as 192.168.1.254. I also checked the Routing Table and the Gateway shows as 192.168.1.254. But all network devices where given 192.168.1.1 as the Gateway.

I came across this post after 2 days of searching. I added
dhcp-option=3,192.168.1.254
to the DHCP serving router (192.168.1.1) and my devices show network settings as...

IP Address 192.168.1.xxx
Subnet Mask 255.255.255.0
Default Gateway 192.168.1.254
DHCP Server 192.168.1.1
DNS Server 192.168.1.254

Thanks EKO!!!!!

_________________
Home Network on Telus 1Gb PureFibre - 10GbE Copper Backbone
2x R7800 - Gateway & WiFi & 3xWireGuard - DDWRT r53562 Std k4.9

Off Site 1

R7000 - Gateway & WiFi & WireGuard - DDWRT r54517 Std
E3000 - Station Bridge - DDWRT r49626 Mega K4.4

Off Site 2

R7000 - Gateway & WiFi - DDWRT r54517 Std
E2000 - Wired ISP IPTV PVR Blocker - DDWRT r35531


YAMon 3.4.6 | DNSCrypt-Proxy V2
Display posts from previous:    Page 1 of 1
Post new topic   Reply to topic    DD-WRT 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