cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Announcements
420
Views
5
Helpful
11
Replies
Contributor

DNS on Router which has interface using DHCP

Hello All,

ISR4321

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 0.0.0.0  0.0.0.0  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,

Matt

11 REPLIES 11

Re: DNS on Router which has interface using DHCP

Hi @Matthew Martin,

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

Contributor

Re: DNS on Router which has interface using DHCP

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,
Matt

Re: DNS on Router which has interface using DHCP

Try with:

show ip dns servers
show ip dns view

Cheers.

Re: DNS on Router which has interface using DHCP

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!

Cheers.

Highlighted
Contributor

Re: DNS on Router which has interface using DHCP

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,
Matt
Contributor

Re: DNS on Router which has interface using DHCP

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

-Matt

Re: DNS on Router which has interface using DHCP

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

Contributor

Re: DNS on Router which has interface using DHCP

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?

-Matt

Re: DNS on Router which has interface using DHCP

It should work too.

Contributor

Re: DNS on Router which has interface using DHCP

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
end

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,

Matt

Contributor

Re: DNS on Router which has interface using DHCP

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

-Matt
CreatePlease to create content
Content for Community-Ad
July's Community Spotlight Awards