Obtain DNS IP Address from ISP Using PPP

This article 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.

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.

Fig 1.1- DNS IP address from ISP using PPP
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.

RouteXP_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

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.

RouteXP_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.

RouteXP_CPE(config)#interface dialer 1
RouteXP_CPE(config-if)#ppp ipcp dns request

When all the above configurations are done:
  • 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.
  • 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.
  • 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.


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

*Jul 23 11:31:25.675: Vi3 CDPCP: Event[Receive CodeRej-] State[REQsent to Stopped]
* Jul 23 11:31:25.679: Vi3 IPCP: I CONFNAK [ACKsent] id 2 len 16
* Jul 23 11:31:25.679: Vi3 IPCP:    Address (0x030665656566)
* Jul 23 11:31:25.679: Vi3 IPCP:    PrimaryDNS (0x810604020202)
* Jul 23 11:31:25.679: Vi3 IPCP: O CONFREQ [ACKsent] id 3 len 16
* Jul 23 11:31:25.679: Vi3 IPCP:    Address (0x030665656566)
* Jul 23 11:31:25.679: Vi3 IPCP:    PrimaryDNS (0x810604020202)
* Jul 23 11:31:25.679: Vi3 IPCP: Event[Receive ConfNak/Rej] State[ACKsent to ACKsent]
* Jul 23 11:31:25.687: Vi3 IPCP: I CONFACK [ACKsent] id 3 len 16
* Jul 23 11:31:25.687: Vi3 IPCP:    Address (0x030665656566)
* Jul 23 11:31:25.687: Vi3 IPCP:    PrimaryDNS (0x810604020202)
* Jul 23 11:31:25.687: Vi3 IPCP: Event[Receive ConfAck] State[ACKsent to Open]
* Jul 23 11:31:25.707: Vi3 IPCP: State is Open
* Jul 23 11:31:25.707: Di1 IPCP: Install negotiated IP interface address

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

RouteXP_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     :
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 (0x030665656566)
Vi3 IPCP:   PrimaryDNS (0x810604020202)
Our Rejected options
Peer's Negotiated Options
Vi3 IPCP:    Address (0x03060101010A)