Skip to content
Guides & References

IOS XR operational standards

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

Policy LibraryUpdated
Platform
cisco-ios-xr
Minimum version
rConfig 8.3.0
Editions
Pro, Vector, Enterprise
On this page

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.

Definition
// 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'
passPassing config: Hardened ASR 9901 sample (IOS XR 7.9.2, synthetic)
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.

failFailing config: Unhardened ASR 9901 sample (IOS XR 7.9.2, synthetic)
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:

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 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.

Definition
// 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'
passPassing config: Hardened ASR 9901 sample (IOS XR 7.9.2, synthetic)
logging buffered 10000000
logging 192.0.2.20 vrf MGMT severity info port default
logging 192.0.2.21 vrf MGMT severity info port default
logging source-interface MgmtEth0/RSP0/CPU0/0 vrf MGMT

Why: Both standard syslog servers are set.

failFailing config: Unhardened ASR 9901 sample (IOS XR 7.9.2, synthetic)
logging buffered 10000000
logging source-interface MgmtEth0/RSP0/CPU0/0 vrf MGMT

Why: No syslog server is set.

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 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.

Definition
// 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'
passPassing config: Hardened ASR 9901 sample (IOS XR 7.9.2, synthetic)
domain name example.com
domain name-server 192.0.2.30
domain name-server 192.0.2.31
domain lookup disable

Why: Both standard name servers are set.

failFailing config: Unhardened ASR 9901 sample (IOS XR 7.9.2, synthetic)
domain name example.com
domain lookup disable

Why: No name server is set.

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 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.

Definition
// A MOTD or login banner is set (banner motd or banner login, any text; nothing to replace)
#[must_match_regex]
/^banner (motd|login) \S/m
passPassing config: Hardened ASR 9901 sample (IOS XR 7.9.2, synthetic)
vty-pool default 0 9 line-template default
banner motd ^
Authorised access only.
All sessions are logged and monitored by the NOC.
^

Why: A MOTD banner is set.

failFailing config: Unhardened ASR 9901 sample (IOS XR 7.9.2, synthetic)
vty-pool default 0 9 line-template default
ntp
server vrf MGMT 192.0.2.1 prefer

Why: There is no banner.

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 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.

Definition
// 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)*!$/m
passPassing config: Hardened ASR 9901 sample (IOS XR 7.9.2, synthetic)
interface 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.

failFailing config: Unhardened ASR 9901 sample (IOS XR 7.9.2, synthetic)
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:

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 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.

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: Hardened ASR 9901 sample (IOS XR 7.9.2, synthetic)
hostname dub-rtr01
clock timezone IST Europe/Dublin

Why: dub-rtr01 matches the pattern.

failFailing config: Unhardened ASR 9901 sample (IOS XR 7.9.2, synthetic)
hostname dub1-pr-asr02
clock timezone IST Europe/Dublin

Why: dub1-pr-asr02 does not match the pattern.

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 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.

Definition
// An SNMP location is set (snmp-server location, any text; nothing to replace)
#[must_match_regex]
/^snmp-server location \S/m
passPassing config: Hardened ASR 9901 sample (IOS XR 7.9.2, synthetic)
snmp-server contact noc@example.com
snmp-server location Dublin POP 1, rack 4

Why: A location is set.

failFailing config: Unhardened ASR 9901 sample (IOS XR 7.9.2, synthetic)
snmp-server contact noc@example.com
key chain ISIS-KEY

Why: No location is set.

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 XR 7.9.2 (synthetic). Minimum rConfig 8.0.0 (must_match_regex). Editions: Pro, Vector, Enterprise.


Type to search.