Change name-server order

Unanswered Question
May 31st, 2008


I have some local name-servers configured on a router using the ip name-server command.

The router also knows about some external DNS servers that were supplied via DHCP - the WAN interface uses DHCP to obtain its IP address and gets some DNS servers as well.

However these external servers have never actually been used because the configured local servers were always used first.

Unfortunately the router lost contact with the local servers recently and is now using the external servers first, by default - if a lookup fails it then does not try the others. A lot of local lookups are obviously failing for hostnames that are local, that don't have public DNS entries.

So my question is - is there a way of clearing this name-server priority without shutting the WAN interface or reloading the router? I have tried removing the local DNS servers and re-adding them (no ip name-server, ip name-server, switching off the lookup service (no ip domain-lookup, ip domain-lookup), clearing the hosts table (clear host *) but the router is still stubbornly using the external DNS servers that it failed over to during the internal outage.


I have this problem too.
0 votes
  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 0 (0 ratings)
jamesl0112 Thu, 06/05/2008 - 14:27

Well - in the end I shut / no shut the outside interface, which forced it to release the DHCP-learned DNS servers:

098312: Jun 5 23:18:34.236 BST: Clearing default gateway and route to x.x.x.x

098313: Jun 5 23:18:34.236 BST: Removing old default route x.x.x.x

098314: Jun 5 23:18:34.240 BST: Clearing route to DHCP server y.y.y.y

098315: Jun 5 23:18:34.240 BST: DHCP: Removing static route to via x.x.x.x

098316: Jun 5 23:18:34.240 BST: Clearing DNS address a.a.a.a

098317: Jun 5 23:18:34.240 BST: Clearing DNS address b.b.b.b


This Discussion