Contents

Introduction

Prerequisites

Requirements

Components Used

Conventions

Configure

Network Diagram

Configurations

Verify

Troubleshoot

Introduction

This document describes the configuration required on a Cisco Router to obtain Domain Name System (DNS) details from the Service Provider and passing it to the internal users using DHCP. The DNS protocol is used to resolve a Fully Qualified Domain Name (FQDN) to its corresponding IP address. Basically, the DNS protocol helps to resolve a human-readable hostname like www.cisco.com into its corresponding machine-readable IP address.

In most enterprise networks, where a local DNS server is not available, customers are required to make use of the DNS service provided by the ISP or configure a freely available public DNS server.

Prerequisites

Requirements

Cisco recommends that you have knowledge of these topics:

- How to enable PPP on the interface through the encapsulation ppp command.

- The debug ppp negotiation command output. Refer to Understanding debug ppp negotiation Output for more information.

- Ability to read and understand the information exchanged during the IPCP phase of the PPP negotiation.

Components Used

This document is not restricted to specific software and hardware versions.

The information in this document was created from the devices in a specific lab environment. All of the devices used in this document started with a cleared (default) configuration. If your network is live, make sure that you understand the potential impact of any command.

Conventions

For more information on document conventions, see the Cisco Technical Tips Conventions.

Configure

Network Diagram

Configurations

Configure local DHCP Server on the Cisco router

Configure basic DHCP parameters on a Cisco router and enable it for it to act as a DHCP server for the local area network.

First, enable DHCP service on the Cisco router.

CPE(config)#service dhcp

Next, create a DHCP pool defining the network subnet that would be leased out to the DHCP clients on the local area network.

ip dhcp pool LAN_POOL

network 192.168.1.0 255.255.255.0

default-router 192.168.1.1

dns-server 192.168.1.1

Here, the DHCP pool has been named as LAN_POOL.

network statement specifies the network subnet and the mask of the DHCP address pool.

default-router specifies the IP address of the default router for a DHCP client. This should be an IP address on the same subnet as the client.

dns-server specifies the IP address of a DNS server that is available to a DHCP client.

Enable DNS Server on a Cisco router

In the global configuration mode, enable the DNS service on the router.

CPE(config)#ip dns server

Configuration to relay Public DNS Service from the ISP through PPP

In order to request the Public DNS service from the ISP, configure ppp ipcp dns request under the Dialer interface.

CPE(config)#interface dialer 1

CPE(config-if)#ppp ipcp dns request

When all the above configurations are done:

1. The ppp ipcp dns request command first helps to get the Public DNS server information from the ISP via the IPCP phase of the PPP negotiation.

2. Next, the ip dns server command enables the router to start acting as a DNS server itself. Though, the router eventually makes use of the Public DNS service from the ISP to resolve the domain names.

3. Further, when the local DHCP server leases out the IP addresses to the clients, it will advertise itself as the DNS server. Any incoming DNS resolution requests from the clients will be processed by the router by making use of the Public DNS service.

Verify

Use this section in order to confirm that your configuration works properly.

1. Run debug ppp negotiation and carefully read through the IPCP phase to check whether DNS server information is provided by the ISP.

*Aug 11 16:31:25.675: Vi3 CDPCP: Event[Receive CodeRej-] State[REQsent to Stopped]

*Aug 11 16:31:25.679: Vi3 IPCP: I CONFNAK [ACKsent] id 2 len 16

*Aug 11 16:31:25.679: Vi3 IPCP:    Address 101.101.101.102 (0x030665656566)

*Aug 11 16:31:25.679: Vi3 IPCP:    PrimaryDNS 4.2.2.2 (0x810604020202)

*Aug 11 16:31:25.679: Vi3 IPCP: O CONFREQ [ACKsent] id 3 len 16

*Aug 11 16:31:25.679: Vi3 IPCP:    Address 101.101.101.102 (0x030665656566)

*Aug 11 16:31:25.679: Vi3 IPCP:    PrimaryDNS 4.2.2.2 (0x810604020202)

*Aug 11 16:31:25.679: Vi3 IPCP: Event[Receive ConfNak/Rej] State[ACKsent to ACKsent]

*Aug 11 16:31:25.687: Vi3 IPCP: I CONFACK [ACKsent] id 3 len 16

*Aug 11 16:31:25.687: Vi3 IPCP:    Address 101.101.101.102 (0x030665656566)

*Aug 11 16:31:25.687: Vi3 IPCP:    PrimaryDNS 4.2.2.2 (0x810604020202)

*Aug 11 16:31:25.687: Vi3 IPCP: Event[Receive ConfAck] State[ACKsent to Open]

*Aug 11 16:31:25.707: Vi3 IPCP: State is Open

*Aug 11 16:31:25.707: Di1 IPCP: Install negotiated IP interface address 101.101.101.102

2. Run the show ppp interface virtual-access command to learn about the various parameters successfully negotiated during PPP set-up.

CPE#show caller

Active    Idle

Line           User               Service       Time      Time

con 0          -                  TTY           00:03:04  00:00:00

Vi3            lac                PPPoE         00:01:57  00:00:02

CPE#show ppp interface virtual-access 3

PPP Serial Context Info

-------------------

Interface        : Vi3

PPP Serial Handle: 0xEE000005

PPP Handle       : 0x5B000005

SSS Handle       : 0x7E000006

AAA ID           : 26

Access IE        : 0xA3000005

SHDB Handle      : 0x0

State            : Up

Last State       : Binding

Last Event       : LocalTerm

PPP Session Info

----------------

Interface        : Vi3

PPP ID           : 0x5B000005

Phase            : UP

Stage            : Local Termination

Peer Name        : lac

Peer Address     : 1.1.1.10

Control Protocols: LCP[Open] IPCP[Open] CDPCP[Stopped]

Session ID       : 5

AAA Unique ID    : 26

SSS Manager ID   : 0x7E000006

SIP ID           : 0xEE000005

PPP_IN_USE       : 0x11

Vi3 LCP: [Open]

Our Negotiated Options

Vi3 LCP:    MagicNumber 0x023A6422 (0x0506023A6422)

Peer's Negotiated Options

Vi3 LCP:    MRU 1500 (0x010405DC)

Vi3 LCP:    AuthProto CHAP (0x0305C22305)

Vi3 LCP:    MagicNumber 0x52D1CDE4 (0x050652D1CDE4)

Vi3 IPCP: [Open]

Our Negotiated Options

Vi3 IPCP:    Address 101.101.101.102 (0x030665656566)

Vi3 IPCP:    PrimaryDNS 4.2.2.2 (0x810604020202)

Our Rejected options

SecondaryDNS

Peer's Negotiated Options

Vi3 IPCP:    Address 1.1.1.10 (0x03060101010A)

CPE#

Troubleshoot

This section provides information you can use in order  to troubleshoot your configuration.

Refer to Troubleshooting PPP Connections for information on how to troubleshoot issues.