IOS XR operational standards
Rules that check a router matches your standard, not a security benchmark. They catch drift: a router someone set up by hand with the wrong NTP server or hostname. They come from the iosxr-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.
All the rules come from iosxr-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 XR templates page lists the file’s known limitations. Run the rules against show running-config.
| Rule | Method | Since |
|---|---|---|
| Standard NTP servers | evaluate_block |
8.3.0 |
| Standard syslog servers | evaluate_block |
8.3.0 |
| Standard DNS servers | evaluate_block |
8.3.0 |
| MOTD or login banner | must_match_regex |
8.0.0 |
| Interface descriptions | must_not_match_regex |
8.0.2 |
| Hostname pattern | must_match_regex |
8.0.0 |
| SNMP location | must_match_regex |
8.0.0 |
Standard NTP servers
Every router should take time from the same servers so logs line up. This rule needs a server line for 192.0.2.10 and one for 192.0.2.11, with or without vrf and ipv4. It checks that both are there, not that no other server is.
// NTP servers are set to your standard (replace 192.0.2.10 and 192.0.2.11)#[evaluate_block]all: - regex: '/^ server (vrf \S+ )?(ipv4 )?192\.0\.2\.10(?= |$)/m' - regex: '/^ server (vrf \S+ )?(ipv4 )?192\.0\.2\.11(?= |$)/m'ntp server vrf MGMT 192.0.2.10 prefer server vrf MGMT 192.0.2.11 source vrf MGMT MgmtEth0/RSP0/CPU0/0 update-calendar!Why: Both standard NTP servers are set.
ntp server vrf MGMT 192.0.2.1 prefer server vrf MGMT 192.0.2.2 source vrf MGMT MgmtEth0/RSP0/CPU0/0 update-calendar!Why: The NTP servers are 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 XR 7.9.2 (synthetic). Minimum rConfig 8.3.0 (evaluate_block). Editions: Pro, Vector, Enterprise.
Standard syslog servers
Logs should go to your standard collectors. This rule needs a logging 192.0.2.20 line and a logging 192.0.2.21 line.
// Syslog servers are set to your standard (replace 192.0.2.20 and 192.0.2.21)#[evaluate_block]all: - regex: '/^logging 192\.0\.2\.20(?= |$)/m' - regex: '/^logging 192\.0\.2\.21(?= |$)/m'logging buffered 10000000logging 192.0.2.20 vrf MGMT severity info port defaultlogging 192.0.2.21 vrf MGMT severity info port defaultlogging source-interface MgmtEth0/RSP0/CPU0/0 vrf MGMTWhy: Both standard syslog servers are set.
logging buffered 10000000logging source-interface MgmtEth0/RSP0/CPU0/0 vrf MGMTWhy: No syslog server is set.
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 XR 7.9.2 (synthetic). Minimum rConfig 8.3.0 (evaluate_block). Editions: Pro, Vector, Enterprise.
Standard DNS servers
This rule needs the exact lines domain name-server 192.0.2.30 and domain name-server 192.0.2.31.
// DNS servers are set to your standard (replace 192.0.2.30 and 192.0.2.31)#[evaluate_block]all: - regex: '/^domain name-server 192\.0\.2\.30$/m' - regex: '/^domain name-server 192\.0\.2\.31$/m'domain name example.comdomain name-server 192.0.2.30domain name-server 192.0.2.31domain lookup disableWhy: Both standard name servers are set.
domain name example.comdomain lookup disableWhy: No name server is set.
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 XR 7.9.2 (synthetic). Minimum rConfig 8.3.0 (evaluate_block). Editions: Pro, Vector, Enterprise.
MOTD or login banner
Every router should show a banner. This rule passes on a banner motd or banner login line with any text, so there is nothing to replace.
// A MOTD or login banner is set (banner motd or banner login, any text; nothing to replace)#[must_match_regex]/^banner (motd|login) \S/mvty-pool default 0 9 line-template defaultbanner motd ^Authorised access only.All sessions are logged and monitored by the NOC.^Why: A MOTD banner is set.
vty-pool default 0 9 line-template defaultntp server vrf MGMT 192.0.2.1 preferWhy: There is no banner.
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 XR 7.9.2 (synthetic). Minimum rConfig 8.0.0 (must_match_regex). Editions: Pro, Vector, Enterprise.
Interface descriptions
A description tells the next engineer what a port is for. This rule fails on any top-level interface block that has neither a description nor a shutdown line before its closing !. Ports that are shut down do not need one. interface preconfigure blocks are skipped.
// Every top-level interface that is not shut down has a description (nothing to replace)#[must_not_match_regex]/^interface (?!preconfigure )\S+\n(?: (?!description |shutdown$)[^\n]*\n)*!$/minterface TenGigE0/0/0/2 description IXP peering LAN mtu 1514 ipv4 address 203.0.113.131 255.255.255.128 load-interval 30!interface TenGigE0/0/0/3 description Spare shutdown!Why: Every interface has a description.
interface TenGigE0/0/0/2 description IXP peering LAN mtu 1514 ipv4 address 203.0.113.131 255.255.255.128 ipv4 directed-broadcast proxy-arp ipv4 redirects load-interval 30!interface TenGigE0/0/0/6 ipv4 address 203.0.113.250 255.255.255.252!Why: TenGigE0/0/0/6 is in service with 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 XR 7.9.2 (synthetic). Minimum rConfig 8.0.2 (must_not_match_regex). Editions: Pro, Vector, Enterprise.
Hostname pattern
A naming pattern makes devices easy to find and sort. The example pattern is three letters, a dash, rtr or sw, and two digits, for example dub-rtr01.
// 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-rtr01clock timezone IST Europe/DublinWhy: dub-rtr01 matches the pattern.
hostname dub1-pr-asr02clock timezone IST Europe/DublinWhy: dub1-pr-asr02 does not match the pattern.
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 XR 7.9.2 (synthetic). Minimum rConfig 8.0.0 (must_match_regex). Editions: Pro, Vector, Enterprise.
SNMP location
The SNMP location tells your monitoring tools where the router is. This rule passes on any snmp-server location line with text.
// An SNMP location is set (snmp-server location, any text; nothing to replace)#[must_match_regex]/^snmp-server location \S/msnmp-server contact noc@example.comsnmp-server location Dublin POP 1, rack 4Why: A location is set.
snmp-server contact noc@example.comkey chain ISIS-KEYWhy: No location is set.
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 XR 7.9.2 (synthetic). Minimum rConfig 8.0.0 (must_match_regex). Editions: Pro, Vector, Enterprise.
Related reference
- Cisco IOS XR policy templates: every rule in
iosxr-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.