↪️
ccie.nyquist.eu
  • Table of Contents
  • Layer 2 Technologies
    • Ethernet Switching
      • L2 Switch Operations
      • Spanning Tree
        • 802.1d – STP
        • 802.1w – RSTP
        • 802.1s – MSTP
      • VTP 101
      • Private VLANs
      • VLANs
      • EtherChannel 101
    • Layer 2 WAN Protocols
      • HDLC
        • HDLC 101
      • PPP
        • PPP 101
        • PPP Authentication - PAP
        • PPP Authentication – CHAP
        • PPP Authentication – EAP
        • PPP Multilink
        • PPPoFR – PPP over Frame Relay
        • PPPoE – PPP over Ethernet
      • Frame Relay
        • Frame Relay 101
        • Frame Relay 102
        • Frame Relay Encapsulations – IETF vs Cisco
        • Multilink Frame Relay
        • Frame Relay Switching
        • Routing over Frame Relay
      • Bridging
        • Bridging on a router
        • MTU 101
    • Wireless
      • Wireless Principles
      • Wireless Implementations
      • Wireless Roaming
      • Wireless Authentication
        • WPA2 PSK
        • WPA2 802.1X
  • IPv4
    • IPv4 Addressing
      • Backup Interfaces
      • FHRP 101
      • DHCP 101
      • DNS 101
      • ARP 101
      • IPv4 101
      • Tunnel Interfaces
        • GRE Tunnels
      • BFD – Bidirectional Forwarding Detection
    • IPv4 Routing
      • How the routing table is built
        • How CEF works
        • Routing Order of Operations
        • NSF – Non Stop Forwarding
      • RIP
        • RIP 101
      • EIGRP
        • EIGRP 101
        • EIGRP Metric
        • More EIGRP Features
      • OSPF
        • OSPF 101
        • OSPF Areas
        • OSPF LSAs
        • OSPF Mechanics
      • IS-IS
        • IS-IS 101
        • IS-IS Mechanics – CLNP
      • BGP
        • BGP 101
        • BGP Attributes
        • More BGP
      • Route Redistribution
      • Policy based Routing
      • PfR 101 – Perfromance Routing
      • ODR
  • IPv6
    • IPv6-101
    • IPv6 Routing
    • Interconnecting IPv6 and IPv4
  • MPLS
    • MPLS 101
    • MPLS L3 VPN
  • Multicast
    • Multicast 101
    • PIM 101
    • IGMP 101
    • Inter Domain Multicast
    • IPv6 Multicast
    • Multicast features on switches
  • Security
    • NAT 101
    • NAT for Overlapping Networks
    • ACLs 101
    • ACLs 102
    • Cisco IOS Firewall
    • Zone Based Firewall
    • AAA 101
    • Controlling CLI Access
    • Control Plane
    • Switch Security
      • Switchport Traffic Control
      • Switchport Port Security
      • DHCP Snooping and DAI
      • 802.1x
      • Switch ACLs
    • IPSec VPN 101
      • IKE / ISAKMP 101
      • IPSEC Crypto Maps 101
      • IPSEC VTI 101
      • DMVPN 101
    • EAP 101
  • Network Services
    • NTP 101
    • HTTP 101
    • File Transfer 101 – TFTP & FTP
    • WCCP 101
  • QoS
    • QoS 101
    • Classification and Marking
    • Congestion Management
      • Legacy Congestion Management
      • SPD – Selective Packet Discard
      • CBWFQ
      • IP RTP Priority
    • Congestion Avoidance – WRED
    • Policing and Shaping
      • CAR 101
    • Compression and LFI
      • Header and Payload Compression
      • LFI for MultiLink PPP
    • Frame Relay QoS
      • Per VC Frame Relay QoS
    • RSVP 101
    • Switching QoS
  • Network Optimization
    • NetFlow 101 – TNF – Traditional NetFlow
    • NetFlow 102 – FNF – Flexible NetFlow
    • IP SLA 101
    • IP Accounting 101
    • Logging 101
    • SNMP and RMON 101
    • Cisco CLI Tips and Tricks
    • AutoInstall
    • Enhanced Object Tracking
    • Troubleshooting 101
    • SPAN, RSPAN, ERSPAN
  • Network Architecture
    • Hierarchical Network Architecture
    • SD Access
    • SD WAN
Powered by GitBook
On this page
  • Defining hosts and domains locally
  • Using a DNS Server
  • Making the router a DNS Server

Was this helpful?

  1. IPv4
  2. IPv4 Addressing

DNS 101

Defining hosts and domains locally

To define a static host name to address mapping, use the following command:

R(config)# ip host NAME [TELNET-PORT] ADDRESS

For hosts that are accessed without a domain name at the end, (hostname.domain-name), you can define a default domain name or a list of domain names to be used, using one of the following commands:

R(config)# ip domain name DOMAIN
R(config)# ip domain list DOMAIN
! Domain list is preferred over domain name. 

Using a DNS Server

To define a DNS server and make the router work as a DNS client, use:

R(config)# ip name-server SERVER1 [SERVER2 ...]

The local mappings will be used first, and if there is no match, the name-server will be queried.

For DNS lookups you can define:

R(config)# ip domain timeout SEC
R(config)# ip domain retry NUMBER

By default, if there are multiple DNS servers defined, the first one will be used by default, while the other servers will only be used in case of failure of the previous servers. For one host a router can have multiple IP addresses that it is resolved to. By default, only the first one is used. You can use each IP address in a round-robin fashion if you enable

R(config)# ip domain round-robin

To see the current dns cache, use:

R# show ip hosts

Of course, lookups can be disabled altogether, using:

R(config)# no ip domain-lookup

Making the router a DNS Server

To configure the router as a server, use:

R(config)# ip dns server

The router will respond to DNS requests with data from its statically configured hosts or from the responses cached from the other DNS servers.

DNS Spoofing is an option that is enabled only if the domain lookups are disabled, if no name servers are configured, or if there is no route to them. The router will respond to all DNS requests with the configured IP or with the interface IP:

R(config)# ip dns spoofing [IP-ADDRESS]
PreviousDHCP 101NextARP 101

Last updated 3 years ago

Was this helpful?