Obtain DNS from ISP by Cisco router 871

Answered Question
Dec 20th, 2007

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

Correct Answer by Brandon Buffin about 9 years 2 months ago

Mehdi,

If DNS is currently working properly for IP address info from your ISP, you should also be receiving DNS info from DHCP. In this case, you do not need the "ip name-server" command.

Brandon

  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 4 (1 ratings)
Loading.
Brandon Buffin Fri, 12/21/2007 - 10:08

Mehdi,

If you are using "ip address dhcp" on your interface, you should already be receiving DNS information. To allow clients to query the router for DNS which will in turn query your ISP DNS servers, do the following:

1. add "dns-server to your DHCP scope

2. add the global config command "ip dns server"

3. Make sure that DNS lookup is enabled with the command "ip domain-lookup"

Take a look at the following link for more details:

http://www.nil.com/ipcorner/RouterDNS/

Hope this helps. If so, please rate the post.

Brandon

persepolis77 Fri, 12/21/2007 - 10:34

Brandon,

Thanks for your reply.

I do not have "ip address dhcp" on my Dialer interface. I have DHCP on my Vlan.

The solution that you proposed works very good, but I have to set DNS server address in "ip name-server". In this case when ISP change the address, I will have to change my router configuration also.

The thing that I would like to do is to grab the DNS info from ISP automatically!

I've already added "ppp ipcp dns request" to my D1 Interface!

Mehdi

Correct Answer
Brandon Buffin Fri, 12/21/2007 - 10:43

Mehdi,

If DNS is currently working properly for IP address info from your ISP, you should also be receiving DNS info from DHCP. In this case, you do not need the "ip name-server" command.

Brandon

persepolis77 Fri, 12/21/2007 - 10:59

Brandon,

This is so rediculous, but I had forgotten the command "ip dns server"

Everything is working fine now.

Thanks alot for your help.

Mehdi

Actions

This Discussion