Setup DNS server in your lab

If you do a lot of telnetting in your lab, you could set up an internal DNS server to be able to use router names instead of IP addresses.

Select a router that will act as the DNS server and configure it on all other routers in your lab. For example, if your DNS server has IP address 10.0.0.1, use the following configuration commands:

ip domain-lookup
ip name-server 10.0.0.1

On the DNS server, disable DNS lookup and DNS forwarding (it has nowhere else to go) and define all the routers as IP host names:

no ip domain lookup
!
ip dns view default
 no dns forwarding
!
ip dns server
!
ip host Core-1 10.0.0.1
ip host Core-2 10.0.0.2
ip host POP 192.168.2.1
ip host Ext 192.168.1.5
ip name-server 10.0.0.1

If you also define IP addresses for the WAN links, for example:

ip host serial-1-0.X1 10.0.1.6
ip host serial-1-0.Core-1 10.0.1.1
… you'll get correct hop-by-hop information from the traceroute command:
POP#trace Ext
Translating "Ext"...domain server (10.0.0.1) [OK]
Type escape sequence to abort.
Tracing the route to Ext (192.168.1.5)
  1 serial-1-0.Core-1 (10.0.1.1) 36 msec 24 msec 16 msec
  2 serial-1-0.X1 (10.0.1.6) 24 msec 28 msec 4 msec
  3 Ext (192.168.1.5) 20 msec * 24 msec

3 comments:

  1. Also it's looks like DNS forwarder is broken since 12.4(15) it's just sometimes return empty records. In debug it claims sending NS records but that's just empty dns reply. And it not even asking forwarders about these records.
  2. Well, a lot of things are broken in DNS forwarder in late 12.4T.

    I've managed to configure my access router as split DNS for my Windows XP home LAN and it works great as long as it only handles A/SRV records. MX records are already a problem; my outbound mail was stuck for several weeks while IIS SMTP server was trying to resolve MX records.

    When I've added a Fedora 8 Linux box that insists on running IPv6 (even though it's been turned off in every possible place I found), I've experienced huge startup delays in some applications (most notably Firefox) as they try to use IPv6 name resolution (AAAA records plus some other stuff) and Cisco IOS is less than perfect in forwarding them. In the end, I've used an external DNS for the Linux box ... and moved my SMTP server from IIS to Postfix.
  3. nope never seen problems myself with mx records but with A records few times in week. clear hosts all * - only solution to make it work again.
    ps
    and yeah I love postfix very much too ;)
Add comment
Sidebar