Sunday, February 16, 2014

Configuring Cisco Router as DNS Server

Lab Topology and Configuration




-------------------------------------------------------------------------------
Configuration on Router R1
-------------------------------------------------------------------------------
enable
configure terminal
! Assigning name to the Router
hostname R1
! Assigning ip address on the interface FastEthernet 0/0
interface fa0/0
no shutdown
ip add 7.7.7.1 255.0.0.0
! Pointing default route towards Router R2
ip route 0.0.0.0 0.0.0.0 7.7.7.2
! Shows ip address on the interfaces
do sh ip int br
! Defining location of DNS Server
ip name-server 7.7.7.2
! Specifying source interface for DNS queries
ip domain-lookup source-interface FastEthernet 0/0
!

-------------------------------------------------------------------------------
Configuration on Router R2
-------------------------------------------------------------------------------
enable
config t
! Assigning name to the Router
host R2
! Assigning ip address on the interface FastEthernet 0/0
int fa0/0
no sh
ip add 7.7.7.2 255.0.0.0
! Assigning ip address on the interface FastEthernet 0/1
int fa0/1
no sh
ip add 8.8.8.1 255.0.0.0
! Shows ip address on the interfaces
do sh ip int br
! Enables DNS Service on the Router
ip dns server 
! Configuring R1 and R3 ip address with their hostnames 
ip host r1.com 7.7.7.1
ip host r3.com 8.8.8.2
!
-------------------------------------------------------------------------------
Configuration on Router R3
-------------------------------------------------------------------------------
enable
config t
! Assigning name to the Router
host R3
! Assigning ip address on the interface FastEthernet 0/0
int fa0/0
no sh
ip add 8.8.8.2 255.0.0.0
! Pointing default route towards Router R2
ip route 0.0.0.0 0.0.0.0 8.8.8.1
! Shows ip address on the interfaces
do sh ip int br
! Defining location of DNS Server
ip name-server 8.8.8.1
! Specifying source interface for DNS queries
ip domain-lookup source-interface FastEthernet 0/0

!
-------------------------------------------------------------------------------
Verification Commands
-------------------------------------------------------------------------------
ping r3.com ! to be used on Router R1
ping r1.com ! to be used on Router R3




0 comments:

Post a Comment