Cisco IOS Configure Router as DNS Server Network Topology To create this topology, I used GNS3 instead of Cisco Packet Tracer because Packet Tracer routers do not simulate the "ip dns server" command.  In the above network Router0 is being configured as a DNS server.  Through the configuration of Router0 I wanted to not only demonstrate the ability for the router to resolve local hosts on the network, but I also wanted to show how DNS resolution that Router0 was unable to do could be forwarded to a real DNS server (1.1.1.1) on the Internet.  In this way Router0 has been configured to forward unknown requests to the Cloudflare and APNIC's DNS server at 1.1.1.1.  I also decided to use a real Windows 2016 Server appliance in the topology.  I could have just as easily used another VPCS QEMU device, but it gave me an opportunity to revisit GNS3 Windows appliances. Also, it is not the best practice to use a networking router as the DNS server, but it can be done as this shows. Router0 Configuration Commands Router0>enableRouter0#configure terminalRouter0(config)# interface gigabitEthernet 0/0Router0(config-if)#ip address 192.168.10.1 255.255.255.0Router0(config-if)#no shutdownRouter0(config-if)#interface gigabitEthernet 0/1Router0(config-if)#ip address 172.16.1.1 255.255.255.248Router0(config-if)#no shutdownRouter0(config-if)#exitRouter0(config)#ip dns serverRouter0(config)#ip domain-name localRouter0(config)#ip name-server 1.1.1.1Router0(config)# ip host fileserver.local 192.168.10.2Router0(config)# ip host pc1.local 192.168.10.3Router0(config)# ip host pc2.local 192.168.10.4Router0(config)# ip host router0.local 192.168.10.1Router0(config)# ip host router1.local 172.16.1.2Router0(config)# ip host router2.local 172.16.2.1Router0(config)# ip default-network 192.168.2.0Router0(config)# router ospf 1Router0(config-router)# network 172.16.1.0 0.0.0.7 area 0Router0(config-router)# network 192.168.10.0 0.0.0.255 area 0 Router1 Configuration Commands Router1>enableRouter1#configure terminalRouter1(config)# interface gigabitEthernet 0/0Router1(config-if)#ip address 172.16.1.2 255.255.255.248Router1(config-if)#no shutdownRouter1(config-if)#interface gigabitEthernet 0/1Router1(config-if)#ip address 172.16.2.2 255.255.255.248Router1(config-if)#no shutdownRouter1(config-if)#exitRouter1(config)#ip name-server 172.16.1.1Router1(config)# ip default-network 192.168.2.0Router1(config)# router ospf 1Router1(config-router)# network 172.16.1.0 0.0.0.7 area 0Router1(config-router)# network 172.16.2.0 0.0.0.7 area 0 Router2 Configuration Commands Router2>enableRouter2#configure terminalRouter2(config)# interface gigabitEthernet 0/0Router2(config-if)#ip address dhcpRouter2(config-if)#no shutdownRouter2(config-if)#ip nat outsideRouter2(config-if)#interface gigabitEthernet 0/1Router2(config-if)#ip address 172.16.2.1 255.255.255.248Router2(config-if)#no shutdownRouter2(config-if)#ip nat insideRouter2(config-if)#exitRouter2(config)#ip nat inside source list 1 interface gigabitEthernet0/0 overloadRouter2(config)#access-list 1 permit anyRouter2(config)# router ospf 1Router2(config-router)# network 192.168.2.0 0.0.0.255 area 0Router2(config-router)# network 172.16.2.0 0.0.0.7 area 0 The configuration of nat on Router2 is so that the network can communicate to the connected network and then to the Internet through the GNS3 cloud object.  I did this to demonstrate the DNS forwarder on Router0 to 1.1.1.1  Also, the IP address on gigabitEthernet 0/0 is set for DHCP as it is getting an address from my network DHCP server.  You could also make this a static address if desired. If you do set a static IP address, remember to configure a gateway of last resort.  The DHCP setting configures that for the interface automatically. Check DNS (a few ping examples) PC1>ping fileserver.local PC1>ping router2.local PC1>ping www.google.com Check the configured DNS Hosts on Router0 Router0#show hosts GNS3 File net11 cisco router dns server.gns3