12-21-2007 06:16 AM
Hi,
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
network 192.168.123.0 255.255.255.0
default-router 192.168.123.1
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?
Thanks
Mehdi
12-21-2007 07:28 AM
! 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
12-21-2007 07:38 AM
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!!!
12-21-2007 07:43 AM
Ah, I see what you're saying: You want to use the DHCP-assigned DNS server(s).
12-21-2007 09:06 AM
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.
http://ioshints.blogspot.com/2007/05/dns-resolver-in-cisco-ios-is-auto.html
12-21-2007 03:59 PM
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 10.0.0.34 (0x03060A000022)
Dialer1/0 IPCP: PrimaryDNS 10.0.0.10 (0x81060A00000A)
Dialer1/0 IPCP: I CONFACK [ACKsent] id 3 len 16
Dialer1/0 IPCP: Address 10.0.0.34 (0x03060A000022)
Dialer1/0 IPCP: PrimaryDNS 10.0.0.10 (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 10.0.0.10
01-02-2008 10:03 AM
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
network 192.168.1.0 255.255.255.0
domain-name somedomain.local
default-router 192.168.1.254
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.
HTH
Andy
01-02-2008 10:46 AM
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:
http://www.cisco.com/en/US/docs/routers/access/800/850/software/configuration/guide/857sg_bk.pdf
which might be helpful?
Andy
01-02-2008 04:37 PM
Hi Andy,
Yes, finally that worked for me also.
Thanks for your post.
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide