Showing results for 
Search instead for 
Did you mean: 

DNS on Router which has interface using DHCP

Matthew Martin

Hello All,


We have about a dozen locations all using the same hardware and configuration (*mostly) except for their subnets. Each location has a T1 MPLS interface and a Local Broadband interface for Internet access. Since there's a few of our own websites which on the internal DNS server route to their local IP Addresses, in these remote offices we wanted them to route to their Public IP so they go through the local broadband instead of back over the T1 line. So we setup the ISR as a DNS server, and added a few "ip host <hostname> <public ipAddr>". So any DNS request not found on their ISR's local host table gets forwarded to our internal DNS server.

All the locations are working correctly except for one. The only difference with this one location is that their local Broadband won't allow me to set a static ip address on the interface going to the broadband modem. Instead, it's configured for DHCP. And with this, it appears they can't reach any internal hostname unless its explicitly configured on their ISR with an "ip host ..." command.

Also, since BGP handles all the internal routes back over the MPLS, there's a default route in each location pointing to the local broadband router's ip address. And in this one location, I had to use the following since it's DHCP, "ip route  dhcp".


Any idea why this is working this way? I assume its a product of the interface being DHCP. But, I don't know why?


Thanks in Advance,


12 Replies 12

Hi @Matthew Martin,

So you when using DHCP to get the WAN address, does the Router receive the DNS servers too?

Hey Hector,

Is there a Command I can use that will show if it receives a DNS server? I would assume it does. But, this company doesn't allow us Admin access to their Router, which is why this is the only problem location...

Thanks Again,

Try with:

show ip dns servers
show ip dns view


Found this command to attempt to ignore the DNS server information received via DHCP on IOS

interface GigabitEthernetx/x
 ip address dhcp
 no ip dhcp client request dns-nameserver

Give it a try!


Thanks Hector!

Yes, so with those first 2 commands, it does look like it is receiving a DNS server from that interface.

I'll give that other command a try and see if that works to disable DNS server from the dhcp interface.

Thanks Again,

Any idea if I'll need to reset the interface (*shut/no shut) after adding that command to the int?


Most likely since the DHCP negotiation needs to happen once again.

Ok that's what I figured. I'll perform that tonight.

Also, would the "release/renew dhcp Gi 0/0/0" do it as well? Or is that only for the dhcp server on the Router itself?


It should work too.

Hey Hector,

So this past weekend I attempted this fix for the dhcp interface. But, it appears to still be showing the DNS servers coming through for that interface.

I added the following to the interface:

#show run int Gi0/0/0
Building configuration...

Current configuration : 317 bytes
interface GigabitEthernet0/0/0
 description Broadband Internet Gateway
 no ip dhcp client request domain-name
 no ip dhcp client request dns-nameserver
 ip dhcp client client-id GigabitEthernet0/0/0
 ip address dhcp
 ip nat outside
 zone-member security INTERNET
 media-type rj45
 negotiation auto

I then did a "release dhcp GigabitEthernet 0/0/0", then I did "renew dhcp GigabitEthernet 0/0/0". And after that I ran the "show ip dns servers" command, and it was still showing that interface's DNS servers that its getting via DHCP. So I then tried to do a "shut", then "no shut" on the interface. And after the interface came back up, I'm still seeing those DNS servers...

Any idea what could be going wrong here?


Thanks Again,


Any ideas why this wouldn't be working and I'm still seeing a DNS Server once its connected via DHCP?


Hi, Mathrew,


It seems like a bug.

My ISR1921 also has this problem, the "no ip dhcp client request ..." commands take no effect.

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community:

Recognize Your Peers