DNS

 

Introduction

 

The Domain Name System makes it possible to assign domain names to groups of Internet users in a meaningful way, independent of each user's physical location. This sample configuration demonstrates the use of Okapi as DNS server. Here, the objective is to verify that a client can properly query a DNS Server for IP Address.

 

Network Diagram

 

Configuration

Configure Okapi router for DNS server functionality as indicated below:

 

On Router B

To start the DNS Server and to enable DNS Lookup services and configure upstream name server (Okapi DNS Server).


Okapi(config)# service dns
Okapi(config)# ip domain-lookup
Okapi(config)# ip name-server 4.2.2.2


To define a list of domain names in order to complete an unqualified host name(without dotted-decimal domain name).

Okapi(config)# ip domain-name okapi.zebra.in

Use this command to add a new domain for the DNS. The command make an entry for the zone in the named.conf file and creates a zone file in the named directory.

Okapi(config)# zone okapi.zebra.in. create primary gateway.okapi.zebra.in. root.okapi.zebra.in.
Okapi(config)# zone okapi.zebra.in. allow-transfer 192.168.1.9

Add an address record in the zone file.

Okapi(config)# zone okapi.zebra.in. addRR sigma A 192.168.1.1

Using this command we add another zone for reverse translation and add an address record in the zone file for reverse translation.

Okapi(config)# zone 1.168.192.in-addr.arpa. create primary gateway.okapi.zebra.in. root.1.168.192.in-addr.arpa.
Okapi(config)# zone 1.168.192.in-addr.arpa allow-transfer 192.168.1.9
Okapi(config)# zone 1.168.192.in-addr.arpa. addRR 192.168.1.1 PTR sigma.okapi.zebra.in.

Use this command to add server address to forward name resolution queries.

Okapi(config)# dns addForwarder 18.70.0.160



On Router A

At this point, we have DNS server running on Okapi router. To verify, configure the name server on client machine to be Okapi router and enable DNS Lookup services.

client# ip name-server 192.168.1.2
client# ip domain-lookup

Finally ping google.com form this client. This will raise a DNS query to the configured name-server, which in this case is Okapi router. Okapi will forward the query to upstream name-server to resolve the host name.