Switch DNS-server

Answered Question
Dec 17th, 2009

Is there any cisco IOS, perhaps IP services that can be configured as a dns server itself? this would be useful in a lab setup using Wireless LAN controllers so that APs can use DNS for WLC discovery without the need for an actual dns server

Correct Answer by Jerry Ye about 7 years 2 months ago

The ip dns server command is introduced in IOS 12.2(4)T, but not in the IOS 12.2SE.




  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 5 (2 ratings)
Reza Sharifi Thu, 12/17/2009 - 18:34


Cisco routers or switches can not be configure as DNS servers.



Ganesh Hariharan Thu, 12/17/2009 - 23:20


Cisco router can be configured to act as Authoritive DNS Server check out the below some configuration commands to configure cisco router to act as DNS, Hope this helps for your query !!

/* Style Definitions */ table.MsoNormalTable {mso-style-name:"Table Normal"; mso-tstyle-rowband-size:0; mso-tstyle-colband-size:0; mso-style-noshow:yes; mso-style-priority:99; mso-style-qformat:yes; mso-style-parent:""; mso-padding-alt:0in 5.4pt 0in 5.4pt; mso-para-margin-top:0in; mso-para-margin-right:0in; mso-para-margin-bottom:10.0pt; mso-para-margin-left:0in; line-height:115%; mso-pagination:widow-orphan; font-size:11.0pt; font-family:"Calibri","sans-serif"; mso-ascii-font-family:Calibri; mso-ascii-theme-font:minor-latin; mso-fareast-font-family:"Times New Roman"; mso-fareast-theme-font:minor-fareast; mso-hansi-font-family:Calibri; mso-hansi-theme-font:minor-latin;}

Enable DNS Server

From the Global configuration mode, enable the DNS server on your Cisco Router

    ciscorouter# conf term

    ciscorouter(config)# ip dns server

Configure as Primary DNS Server

Configures the router as the primary DNS name server for a domain (zone) and as the start of authority (SOA) record source. Unless Distributed Director is enabled, the TTL on locally defined resource records will always be ten seconds.

    ciscorouter(config)# ip dns primary test.com soa ns.test.com postmaster.test.com

The above command configures the Cisco Router as a Authoritative Primary DNS server for the domain "test.com" where ns.test.com is the Primary DNS Server and

postmaster.test.com is the email account for the postmaster (read as [email protected])

Create NS Records

Create NS resource record to be returned when the DNS server is queried for the associated domain. This configuration is needed only if the zone for which the system is authoritative will also be served by other name servers

    ciscorouter(config)# ip host test.com ns ns.test.com



MARVIN SPITERI Thu, 12/17/2009 - 23:31

hi thanks for your replies - I am trying to configure a 3750 switch with IP services IOS but now I notice it is ver 12.2(35)SE5 and the guide you sent lin of is of IOS ver 12.4. my switch does not recognise the command IP DNS .. could it be because of older IOS?

Ganesh Hariharan Thu, 12/17/2009 - 23:40

It can be i am not sure but the above commands is for making routers to act as DNS.

Hope this helps



Reza Sharifi Fri, 12/18/2009 - 07:54


Thanks for clarify that.  No wonder I could not find it in the 12.2SX version either.



This Discussion