12-20-2007 12:05 PM - edited 03-05-2019 08:06 PM
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
Solved! Go to Solution.
12-21-2007 10:43 AM
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
12-21-2007 10:08 AM
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
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
12-21-2007 10:34 AM
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
12-21-2007 10:43 AM
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
12-21-2007 10:59 AM
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
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