IOS-XE operational standards
Rules that check a device matches your standard, not a security benchmark. They catch drift: a device someone built by hand with the wrong NTP server or hostname. They come from the ios-operational-standards policy template.
Every example on this page was checked with rConfig Pro's policy engine on Each of the 14 configs below was run through rConfig Pro’s evaluator with the rule above it, and gave the result shown. The configs are sanitised excerpts of the sample configs that come with the template. A card marked changed has one line edited to show a failure.
All the rules come from ios-operational-standards.policy in the policy templates (v1.5.0). Import the whole file with Import Templates (see importing a policy template), or copy one rule into your own definition. The Cisco IOS templates page lists the file’s known limitations. Run the rules against show running-config.
| Rule | Method | Since |
|---|---|---|
| NTP servers | evaluate_block |
8.3.0 |
| Syslog servers | evaluate_block |
8.3.0 |
| DNS servers | evaluate_block |
8.3.0 |
| Login banner | must_match_regex |
8.0.0 |
| Interface descriptions | evaluate_block |
8.3.0 |
| Hostname pattern | must_match_regex |
8.0.0 |
| SNMP location | must_match_regex |
8.0.0 |
NTP servers
Every device should get its time from the same servers, or log times will not line up. This rule needs both standard servers. The address must match as a whole, so 192.0.2.100 does not count as 192.0.2.10. prefer and vrf are allowed.
// NTP servers are set to your standard (replace 192.0.2.10 and 192.0.2.11)#[evaluate_block]all: - regex: '/^ntp server (vrf \S+ )?192\.0\.2\.10(?= |$)/m' - regex: '/^ntp server (vrf \S+ )?192\.0\.2\.11(?= |$)/m'ntp source Loopback0ntp server 192.0.2.10 preferntp server 192.0.2.11Why: Both standard servers are there.
ntp source Loopback0ntp server 192.0.2.100 preferntp server 192.0.2.11Why: 192.0.2.100 is not 192.0.2.10.
Expected result in rConfig, with this rule as the only rule in a definition:
| Config | Rule result | Overall result |
|---|---|---|
| Passing config | pass | PASS |
| Failing config | fail | FAIL |
Framework mapping. The rule provides evidence towards these controls. It does not certify anything.
| Framework | Reference |
|---|---|
| None recorded | See Compliance frameworks |
Tested with: sample excerpts from IOS 15.7 (synthetic). Minimum rConfig 8.3.0 (evaluate_block). Editions: Pro, Vector, Enterprise.
Syslog servers
Both standard syslog servers must be there. The rule does not mind other logging host lines as well.
// Syslog servers are set to your standard (replace 192.0.2.20 and 192.0.2.21)#[evaluate_block]all: - regex: '/^logging host 192\.0\.2\.20(?= |$)/m' - regex: '/^logging host 192\.0\.2\.21(?= |$)/m'logging trap informationallogging source-interface Loopback0logging host 192.0.2.20logging host 192.0.2.21Why: Both standard servers are there.
logging trap informationallogging source-interface Vlan99logging host 192.0.2.50Why: 192.0.2.50 is a syslog server, but not one of the standard ones.
Expected result in rConfig, with this rule as the only rule in a definition:
| Config | Rule result | Overall result |
|---|---|---|
| Passing config | pass | PASS |
| Failing config | fail | FAIL |
Framework mapping. The rule provides evidence towards these controls. It does not certify anything.
| Framework | Reference |
|---|---|
| None recorded | See Compliance frameworks |
Tested with: sample excerpts from IOS 15.7 (synthetic) and IOS-XE 17.9 (synthetic). Minimum rConfig 8.3.0 (evaluate_block). Editions: Pro, Vector, Enterprise.
DNS servers
Both standard DNS servers must be there. They can be on one ip name-server line or on separate lines.
// DNS servers are set to your standard (replace 192.0.2.30 and 192.0.2.31)#[evaluate_block]all: - regex: '/^ip name-server( \S+)* 192\.0\.2\.30(?= |$)/m' - regex: '/^ip name-server( \S+)* 192\.0\.2\.31(?= |$)/m'ip domain name example.comip name-server 192.0.2.30 192.0.2.31Why: Both servers on one line.
ip domain name example.comip name-server 192.0.2.53ip name-server 198.51.100.53Why: These are DNS servers, but not the standard ones.
Expected result in rConfig, with this rule as the only rule in a definition:
| Config | Rule result | Overall result |
|---|---|---|
| Passing config | pass | PASS |
| Failing config | fail | FAIL |
Framework mapping. The rule provides evidence towards these controls. It does not certify anything.
| Framework | Reference |
|---|---|
| None recorded | See Compliance frameworks |
Tested with: sample excerpts from IOS 15.7 (synthetic) and IOS-XE 17.9 (synthetic). Minimum rConfig 8.3.0 (evaluate_block). Editions: Pro, Vector, Enterprise.
Login banner
The same check as the management access login banner rule, repeated here so this file can stand alone. Any banner text passes.
// A login banner is set (banner login, any text; nothing to replace)#[must_match_regex]/^banner login .+/mbanner login ^CAuthorised access only. Activity is logged. Contact noc@example.com.^CWhy: A banner login line is there.
banner motd ^CScheduled maintenance windows are published on the status page.^CWhy: Only a MOTD banner. There is no banner login line.
Expected result in rConfig, with this rule as the only rule in a definition:
| Config | Rule result | Overall result |
|---|---|---|
| Passing config | pass | PASS |
| Failing config | fail | FAIL |
Framework mapping. The rule provides evidence towards these controls. It does not certify anything.
| Framework | Reference |
|---|---|
| None recorded | See Compliance frameworks |
Tested with: sample excerpts from IOS 15.7 (synthetic). Minimum rConfig 8.0.0 (must_match_regex). Editions: Pro, Vector, Enterprise.
Interface descriptions
The same check as the interface security description rule: each interface must be shut down or described.
// Every interface that is not shut down has a description (nothing to replace)#[evaluate_block]scope: ^interfaceany: - equals: shutdown - regex: '/^\s*description \S/m'interface GigabitEthernet0/1 description LAN core ip address 192.0.2.1 255.255.255.0 no ip proxy-arp!interface GigabitEthernet0/2 no ip address shutdown!Why: Gi0/1 has a description. Gi0/2 is shut down.
interface Loopback60 description This is Interface Loopback60 ip address 192.0.2.60 255.255.255.255!interface Loopback70 ip address 192.0.2.70 255.255.255.255!Why: Loopback70 is up and has no description.
Expected result in rConfig, with this rule as the only rule in a definition:
| Config | Rule result | Overall result |
|---|---|---|
| Passing config | pass | PASS |
| Failing config | fail | FAIL |
Framework mapping. The rule provides evidence towards these controls. It does not certify anything.
| Framework | Reference |
|---|---|
| None recorded | See Compliance frameworks |
Tested with: sample excerpts from IOS 15.7 (lab) and IOS 15.7 (synthetic). Minimum rConfig 8.3.0 (evaluate_block). Editions: Pro, Vector, Enterprise.
Hostname pattern
A naming pattern makes devices easy to find and sort. The example pattern is three letters for the site, then rtr or sw, then two digits, such as dub-rtr01. The whole hostname must match.
// The hostname follows your naming pattern (replace the example pattern [a-z]{3}-(rtr|sw)[0-9]{2}, for example dub-rtr01)#[must_match_regex]/^hostname [a-z]{3}-(rtr|sw)[0-9]{2}$/mhostname dub-rtr01Why: dub, rtr, 01: it fits the pattern.
hostname core-sw02Why: core has four letters, not three.
Expected result in rConfig, with this rule as the only rule in a definition:
| Config | Rule result | Overall result |
|---|---|---|
| Passing config | pass | PASS |
| Failing config | fail | FAIL |
Framework mapping. The rule provides evidence towards these controls. It does not certify anything.
| Framework | Reference |
|---|---|
| None recorded | See Compliance frameworks |
Tested with: sample excerpts from IOS 15.7 (synthetic) and IOS-XE 17.9 (synthetic). Minimum rConfig 8.0.0 (must_match_regex). Editions: Pro, Vector, Enterprise.
SNMP location
The SNMP location tells your monitoring tools where the device is. This rule passes when snmp-server location has any text.
// An SNMP location is set (snmp-server location, any text; nothing to replace)#[must_match_regex]/^snmp-server location \S/msnmp-server group NETOPS v3 privsnmp-server location Example data centre, rack 12snmp-server contact noc@example.comWhy: A location is set.
snmp-server group NETOPS v3 privsnmp-server contact noc@example.comWhy: There is no snmp-server location line.
Expected result in rConfig, with this rule as the only rule in a definition:
| Config | Rule result | Overall result |
|---|---|---|
| Passing config | pass | PASS |
| Failing config | fail | FAIL |
Framework mapping. The rule provides evidence towards these controls. It does not certify anything.
| Framework | Reference |
|---|---|
| None recorded | See Compliance frameworks |
Tested with: sample excerpts from IOS 15.7 (synthetic). Minimum rConfig 8.0.0 (must_match_regex). Editions: Pro, Vector, Enterprise.
Related reference
- Cisco IOS policy templates: every rule in
ios-operational-standards.policy, its references and known limitations. - Policy Definitions: the definition file format and every method.
- Policy Assignments: run a definition against your devices.
- Policy Compliance Results: read the pass and fail results.