NAC Tip: Cisco NAC XML Configuration File


Before version 4.6, the Cisco NAC Agent used registry key settings to for configuration.  Starting with version 4.6, the Cisco NAC Agent uses an XML file for configuration.  This file is located in c:Program FilesCiscoCisco NAC AgentNACAgentCFG.xml.  This configuration file provides many options for customizing the behavior of the NAC Agent.  Full details can be viewed in the Cisco NAC Manager Configuration Guide.


For a campus deployment, it is common to use the NAC Agent to detect the default gateway and then issue a DHCP release/renew if the default gateway is not available.  The NAC Agent does this by either using ICMP or ARP to connect to the default gateway and then issue a DHCP release/renew if the ICMP or ARPs fail a configurable number of times.  For example, if you wanted to use ICMP every 5 seconds and then issue the DHCP release/renew after 3 failures, the configuration would look like the XML configuration snippet below.






The VlanDetectInterval defines the timing between pings.  The RetryDetection determines the number of failures required before the DHCP release/renew.  The PingArp defines that ICMP is being used.  One point of note is that the case of the parameters is important.  This means that vlandetectinterval will not work.  You must use the proper case of VlanDetectInterval.


This configuration is installed along with the NAC Agent installation.  It is possible to make changes to the NACAgentCFG.xml centrally through the NAC Manager.  For example, you could change the RetryDetection from 3 failures to 4 failures on all NAC Agents through one change on the NAC Manager.  When the NAC Agent connects to a NAC server for NAC authentication and posture assessment, the first thing the NAC Server does is send the NAC Agent configuration file that is on the NAC Server.  The NAC Agent compares this configuration file with the file that exists locally and makes changes.  In general, the central NAC Agent configuration file only updates the local NAC Agent configuration file if the entry does not in the local NAC Agent configuration file.  If the entry did not exist in the local NAC Agent configuration file it means that it was using the default settings.  For example, if the central NAC Agent configuration file had 4 and there was no local NAC Agent configuration file entry, then the value would be added.  If the local NAC Agent configuration file had 2, then the entry would not be updated in the local NAC Configuration file and the value of 2 would remain.  In order to force a modification of the entry, an additional parameter needs to be added.  This parameter is called mode=”overwrite”.  For example, if the central NAC Agent configuration file had 4 then the local file would be changed to use the value 4. This is shown below.


<RetryDetection mode=”overwrite”>4</RetryDetection>


The steps below show how this is done.

1.  Login to the NAC Manager and access “Device Management > Clean Access > Clean Access Agent > Installation”

2.  Click the Installation Options for Windows

3.  Look at the “Agent configuration XML file upload” section

4.  If you had previously uploaded a configuration file, the “Download” button will be available.  This is a excellent way to keep track of the existing NAC Agent XML configuration file that is being deployed to end clients.  If this exists, download this version to modify its contents and upload.

5.  If configuration file had never been uploaded, then the “Download” button will not exist.  Open up wordpad to prepare to create a new NACAgentCFG.xml file for upload.

6.  At this point, the new configuration file is created.  This configuration file only needs to include the customized parameters.  Any parameters, not included, will follow the default values.  As mentioned above, this is the only place where the extra mode=”merge” and mode=”overwrite” parameters are used.  If nothing is added it is the same as saying mode=”merge”.  For this reason, the only parameter that you really need to add is mode=”overwrite”.

7.  Save the new configuration file

8.  In the NAC Manager click Browse and select the file just created, then click “upload”.  At this point the NAC Manager parses the file and ensures that the syntax is correct.  If the syntax is correct it returns a success meassage.


The next time a user logs in the new configuration file will be downloaded to their computer.  The configuration file will be compared to their existing configuration files.  If any downloaded configuration entries have the mode=”overwrite” parameter, they will be modified.  If any downloaded ocnfiguration entries do not exist locally, they will also be added.

One response to “NAC Tip: Cisco NAC XML Configuration File

Leave a Reply


Nick Kelly

Cybersecurity Engineer, Cisco

Nick has over 20 years of experience in Security Operations and Security Sales. He is an avid student of cybersecurity and regularly engages with the Infosec community at events like BSides, RVASec, Derbycon and more. The son of an FBI forensics director, Nick holds a B.S. in Criminal Justice and is one of Cisco’s Fire Jumper Elite members. When he’s not working, he writes cyberpunk and punches aliens on his Playstation.


Virgilio “BONG” dela Cruz Jr.

CCDP, CCNA V, CCNP, Cisco IPS Express Security for AM/EE
Field Solutions Architect, Tech Data

Virgilio “Bong” has sixteen years of professional experience in IT industry from academe, technical and customer support, pre-sales, post sales, project management, training and enablement. He has worked in Cisco Technical Assistance Center (TAC) as a member of the WAN and LAN Switching team. Bong now works for Tech Data as the Field Solutions Architect with a focus on Cisco Security and holds a few Cisco certifications including Fire Jumper Elite.


John Cavanaugh

CCIE #1066, CCDE #20070002, CCAr
Chief Technology Officer, Practice Lead Security Services, NetCraftsmen

John is our CTO and the practice lead for a talented team of consultants focused on designing and delivering scalable and secure infrastructure solutions to customers across multiple industry verticals and technologies. Previously he has held several positions including Executive Director/Chief Architect for Global Network Services at JPMorgan Chase. In that capacity, he led a team managing network architecture and services.  Prior to his role at JPMorgan Chase, John was a Distinguished Engineer at Cisco working across a number of verticals including Higher Education, Finance, Retail, Government, and Health Care.

He is an expert in working with groups to identify business needs, and align technology strategies to enable business strategies, building in agility and scalability to allow for future changes. John is experienced in the architecture and design of highly available, secure, network infrastructure and data centers, and has worked on projects worldwide. He has worked in both the business and regulatory environments for the design and deployment of complex IT infrastructures.