Skip to content
Guides & References

IOS-XE operational standards

Worked examples for Cisco IOS-XE operational standards: your NTP, syslog and DNS servers, a login banner, interface descriptions, hostnames and SNMP location.

Policy LibraryUpdated
Platform
Cisco IOS-XE
Minimum version
rConfig 8.3.0
Editions
Pro, Vector, Enterprise
On this page

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.

Definition
// 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'
passPassing config: Operational standards sample (IOS 15.7, synthetic)
ntp source Loopback0
ntp server 192.0.2.10 prefer
ntp server 192.0.2.11

Why: Both standard servers are there.

failFailing config: Operational standards sample (IOS 15.7, synthetic), changed: 192.0.2.100 instead of 192.0.2.10
ntp source Loopback0
ntp server 192.0.2.100 prefer
ntp server 192.0.2.11

Why: 192.0.2.100 is not 192.0.2.10.

Expected result in rConfig, with this rule as the only rule in a definition:

ConfigRule resultOverall result
Passing configpassPASS
Failing configfailFAIL

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.

Definition
// 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'
passPassing config: Operational standards sample (IOS 15.7, synthetic)
logging trap informational
logging source-interface Loopback0
logging host 192.0.2.20
logging host 192.0.2.21

Why: Both standard servers are there.

failFailing config: Hardened Catalyst 9500 sample (IOS-XE 17.9, synthetic)
logging trap informational
logging source-interface Vlan99
logging host 192.0.2.50

Why: 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:

ConfigRule resultOverall result
Passing configpassPASS
Failing configfailFAIL

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.

Definition
// 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'
passPassing config: Operational standards sample (IOS 15.7, synthetic)
ip domain name example.com
ip name-server 192.0.2.30 192.0.2.31

Why: Both servers on one line.

failFailing config: Hardened Catalyst 9500 sample (IOS-XE 17.9, synthetic)
ip domain name example.com
ip name-server 192.0.2.53
ip name-server 198.51.100.53

Why: These are DNS servers, but not the standard ones.

Expected result in rConfig, with this rule as the only rule in a definition:

ConfigRule resultOverall result
Passing configpassPASS
Failing configfailFAIL

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.

Definition
// A login banner is set (banner login, any text; nothing to replace)
#[must_match_regex]
/^banner login .+/m
passPassing config: Operational standards sample (IOS 15.7, synthetic)
banner login ^C
Authorised access only. Activity is logged. Contact noc@example.com.
^C

Why: A banner login line is there.

failFailing config: Operational standards sample (IOS 15.7, synthetic), changed: login banner removed
banner motd ^C
Scheduled maintenance windows are published on the status page.
^C

Why: Only a MOTD banner. There is no banner login line.

Expected result in rConfig, with this rule as the only rule in a definition:

ConfigRule resultOverall result
Passing configpassPASS
Failing configfailFAIL

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.

Definition
// Every interface that is not shut down has a description (nothing to replace)
#[evaluate_block]
scope: ^interface
any:
- equals: shutdown
- regex: '/^\s*description \S/m'
passPassing config: Operational standards sample (IOS 15.7, synthetic)
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.

failFailing config: Cisco 1921 lab sample (IOS 15.7)
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:

ConfigRule resultOverall result
Passing configpassPASS
Failing configfailFAIL

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.

Definition
// 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}$/m
passPassing config: Operational standards sample (IOS 15.7, synthetic)
hostname dub-rtr01

Why: dub, rtr, 01: it fits the pattern.

failFailing config: Hardened Catalyst 9500 sample (IOS-XE 17.9, synthetic)
hostname core-sw02

Why: core has four letters, not three.

Expected result in rConfig, with this rule as the only rule in a definition:

ConfigRule resultOverall result
Passing configpassPASS
Failing configfailFAIL

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.

Definition
// An SNMP location is set (snmp-server location, any text; nothing to replace)
#[must_match_regex]
/^snmp-server location \S/m
passPassing config: Operational standards sample (IOS 15.7, synthetic)
snmp-server group NETOPS v3 priv
snmp-server location Example data centre, rack 12
snmp-server contact noc@example.com

Why: A location is set.

failFailing config: Operational standards sample (IOS 15.7, synthetic), changed: location line removed
snmp-server group NETOPS v3 priv
snmp-server contact noc@example.com

Why: There is no snmp-server location line.

Expected result in rConfig, with this rule as the only rule in a definition:

ConfigRule resultOverall result
Passing configpassPASS
Failing configfailFAIL

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.


Type to search.