Obtain DNS automatically from ISP by Cisco router 871

Unanswered Question
Dec 21st, 2007


I would like to obtain the DNS from ISP automatically.

I have the following DHCP configuration in my router :

ip dhcp pool guest

import all



and I added the following command on my Dialer interface :

ppp ipcp dns request

but still I do not get DNS. I can connect to Internet and ping a public address but can not browse.

Any idea please?



I have this problem too.
0 votes
  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 0 (0 ratings)
yjdabear Fri, 12/21/2007 - 07:28

! optional

[no ip domain-lookup]

[ip domain-name company.com]

! list your ISP DNS servers below

ip name-server xx.xx.1.xx

ip name-server xx.xx.2.xx

persepolis77 Fri, 12/21/2007 - 07:38

but by your solution, if ISP change the DNS server address, I will have to change my router configuration also.

I would like to have a dynamic configuration so that the router grab DNS information from ISP automatically!!!

yjdabear Fri, 12/21/2007 - 07:43

Ah, I see what you're saying: You want to use the DHCP-assigned DNS server(s).

yjdabear Fri, 12/21/2007 - 09:06

Well, according to this blog article, DHCP-supplied DNS parameteers are used automatically (in conjunction with any static "ip name-server" definition), but do not appear in the IOS config. So you may want to enable DHCP debugging and look at how your router sees your ISP's DHCP-supplies DNS parameters, if any.


yjdabear Fri, 12/21/2007 - 15:59

If you have "dns-server xx.xx.xx.xx" under "ip dhcp pool guest", try removing it and reboot the router.

You can see if DNS parameters are offered with "debug ppp negotiation".

Dialer1/0 IPCP: O CONFREQ [ACKsent] id 3 len 16

Dialer1/0 IPCP: Address (0x03060A000022)

Dialer1/0 IPCP: PrimaryDNS (0x81060A00000A)

Dialer1/0 IPCP: I CONFACK [ACKsent] id 3 len 16

Dialer1/0 IPCP: Address (0x03060A000022)

Dialer1/0 IPCP: PrimaryDNS (0x81060A00000A)

You can see the result with "show host"

#show host

Default domain is not set

Name/address lookup uses domain service

Name servers are

andrew.butterworth Wed, 01/02/2008 - 10:03

I previously hard-coded the DNS servers in the local DHCP Scope as I couldn't get this working when I first set this up on a home ADSL router. Anyway my ISP changed their DNS server IP addresses recently so I decided to try and sort it out, so here it is...

ip dhcp pool Local-DHCP-Pool

import all


domain-name somedomain.local


lease 3 0


interface Dialer1

ppp ipcp dns request accept


It was the 'ppp ipcp dns request accept' line that I needed. Anyway it works for me.



andrew.butterworth Wed, 01/02/2008 - 10:46

I just realised you have an 871 and not an ADSL router... If your WAN is using PPPoE then I think the same still applies (i.e. the Dialer Interface). If however the WAN is just a 'normal' Ethernet connection then I assume DHCP is used to lease an IP address?, unfortunately I haven't set anything like this up before.

I did find this on CCO though:


which might be helpful?



This Discussion