12-28-2010 11:43 AM - edited 03-04-2019 10:54 AM
Hello,
I have cisco router C1700. Interface FastEthernet0 is connected to ISP and obtain public IP and DNS via dhcp.
On interface FastEthernet1 is connected private network. On router is configured dhcp pool that assigns addresses
to private network connected on FastEthernet1. Is there configuration that automatically add the DNS servers from my ISP into the DHCP pool?
Solved! Go to Solution.
12-28-2010 11:57 AM
Hello,
In your DHCP pool configuration, use the command import all - for example:
ip dhcp pool LAN
network 192.168.1.0 /24
default-router 192.168.1.1
import all
The "import all" will cause that the router will request a number of DHCP-configurable options from the DHCP server and it will import them into the pool. As you can see in this example, there is no DNS server configured, yet the router will request the DNS server setting from the DHCP server and feed it into this pool. There will be no visible command in the configuration but the stations shall be able to receive address of the DNS server.
You will need to shutdown and reactivate the interface configured with "ip address dhcp" after adding the "import all" to your DHCP pool configurations in order to make the router request additional options from the DHCP and feed them into the pools.
Best regards,
Peter
12-28-2010 11:49 AM
You can add those entries in your DHCP configuration and they will be handed to the workstations.
ip dhcp pool "dynamic(Pool Name)"
dns-server 'isp dns 1" "isp dns 2"
12-28-2010 11:57 AM
Hello,
In your DHCP pool configuration, use the command import all - for example:
ip dhcp pool LAN
network 192.168.1.0 /24
default-router 192.168.1.1
import all
The "import all" will cause that the router will request a number of DHCP-configurable options from the DHCP server and it will import them into the pool. As you can see in this example, there is no DNS server configured, yet the router will request the DNS server setting from the DHCP server and feed it into this pool. There will be no visible command in the configuration but the stations shall be able to receive address of the DNS server.
You will need to shutdown and reactivate the interface configured with "ip address dhcp" after adding the "import all" to your DHCP pool configurations in order to make the router request additional options from the DHCP and feed them into the pools.
Best regards,
Peter
12-28-2010 10:59 PM
Thank you Peter,
this is solution that I search for.
Best Regards,
Ilian Kostadinov
12-29-2010 10:49 AM
ip dhcp pool LAN-Address
import all
network 192.168.1.0 255.255.255.0
domain-name home.owa
default-router 192.168.1.1
dns-server xx.xx.xx.xxx xx.xx.xx.xxx
My looks like this but when I take off the dns-server line eventho i have import all my router wont translate dns, so I have to keep both link the import all and the dns-server line inorder for me to surf website, any reason that I am doing something wrong.
12-29-2010 11:02 AM
Hello,
If you remove the dns-server from your DHCP pool configuration and leave only the import all command in place, what DNS server will be assigned to your PC in the inside network by the DHCP running on your router? Is it the same DNS server as the one you have specified using the dns-server line?
If the PC is not assigned a DNS server then try shutting down and again reactivating your outside interface on the router to force it to reacquire its own IP address and other options via DHCP, and then try to release and renew the IP address on your PC. If still no DNS server is assigned then it is possible that this particular option is not supplied in DHCP by your ISP.
Note that neither of these two commands are instructing your router to perform DNS lookups on behalf of your PC. You should not expect your router to essentially behave as a resolving DNS server.
Best regards,
Peter
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