05-03-2023 09:37 PM
Hi expert
I want to change google DNS server (8.8.8.8 and 8.8.4.4) to openDNS 208.67.222.222 for all my network. so I made this configuration in my router to forward all google DNS requests to openDNS servers.
# ip route 8.8.8.8 255.255.255.255 208.67.222.222
this configuration is in (show running) but it doesn`t seem in the routing table (show ip route)
how can I fix this?
05-03-2023 11:13 PM
- Check the sequence of the routing commands, perhaps the default route has higher priority ,
M.
05-03-2023 11:36 PM
thanks a lot for your replay
defult route has administrative number of 10, while this static route has AD number of 1
05-03-2023 11:34 PM
Hello @Samiullah Osman ,
>> I want to change google DNS server (8.8.8.8 and 8.8.4.4) to openDNS 208.67.222.222 for all my network
Then you need to change the DNS server settings on the router to achieve this.
your static route is not installed because the IP next-hop is not known to the router.
You would need another static route for host OpenDNS pointing to the ISP gateway, but even if the static route would be installed your DNS requests would be still sent to 8.8.8.8 .
This is why you need to change the DNS server settings on your router
Hope to help
Giuseppe
05-03-2023 11:58 PM
thanks a lot for your helpful advice
so can you please tell me how I can disable Google DNS in my entire network and use openDNS instead.
05-04-2023 05:29 AM
Hello @Samiullah Osman ,
refer to the following link
the key command is
ip name-server 208.67.222.222
you may need to remove the commands related to google servers with
no ip name-server 8.8.8.8
these commands are to be entered in global configuration mode.
if your router acts as a DHCP server you may need to update the configuration of DHCP address pools
Hope to help
Giuseppe
05-05-2023 09:41 PM
Thanks a lot for your help. I am learning from your messages.
I change the router ip name-server to 208.67.222.222 and remove google DNS server. but still, my router can receive google DNS server through ISP and ISP`s DHCP server.
I used
ip route 8.8.8.8 255.255.255.255 208.67.222.222
ip route 208.67.222.222 255.255.255.255 gig 0/1
and I totally lost my internet connection
can I use access list to forward all pakets comes for 8.8.8.8 to 208.67.222.222?
regards.
05-15-2023 01:03 AM - edited 05-15-2023 01:04 AM
Hello @Samiullah Osman ,
>> but still, my router can receive google DNS server through ISP and ISP`s DHCP server.
So your WAN interface gi0/1 has a dynamic IP address and it gets dynamically from ISP's DCHP server .
As a result of this the Google DNS is sent to your router via DHCP.
And you have seen that this dynamic config is preferred over the static name server settings ?
I mean do you see DNS requests sent from your router with destination = Google DNS or destination = OpenDNS ?
if it is the first case I'm afraid there is little you can do.
A line with a static public IP address is more expensive but it could give you the freedom to choice the DNS server.
Hope to help
Giuseppe
05-13-2023 11:06 PM
I think this is impossible to translate the destination IP address. same as we do with source addresses in NAT.
I researched a lot but can't find any thing to translate the destenation IP address.
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