Skip to content
Guides & References

OcNOS operational standards

Worked examples for the OcNOS operational standards template: your NTP and syslog servers, a hostname pattern and an SNMP location.

Policy LibraryUpdated
Platform
ip-infusion-ocnos
Minimum version
rConfig 8.3.0
Editions
Pro, Vector, Enterprise
On this page

OcNOS 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 ocnos-operational-standards policy template.

Every example on this page was checked with rConfig Pro's policy engine on

Each of the 9 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 ocnos-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 IP Infusion OcNOS templates page lists the file’s known limitations. Run the rules against show running-config.

Rule Method Since
NTP servers are set to your standard evaluate_block 8.3.0
Syslog servers are set to your standard evaluate_block 8.3.0
The hostname follows your naming pattern must_match_regex 8.0.0
An SNMP location is set must_match_regex 8.0.0

NTP servers are set to your standard

Both standard NTP servers, 192.0.2.10 and 192.0.2.11 in the template, must be present. Each is matched by address, so any vrf or other options after it pass.

Definition
// NTP servers are set to your standard (replace 192.0.2.10 and 192.0.2.11)
#[evaluate_block]
all:
- regex: '/^ntp server 192\.0\.2\.10(?=[ \t]|$)/m'
- regex: '/^ntp server 192\.0\.2\.11(?=[ \t]|$)/m'
passPassing config: Hardened S9510-28DC-B sample (OcNOS-SP 7.0.0, edited copy of the lab router sample)
feature ntp vrf management
ntp server 192.0.2.10 vrf management
ntp server 192.0.2.11 vrf management

Why: Both standard NTP servers are set.

failFailing config: S9510-28DC-B lab router sample (OcNOS-SP 7.0.0, sanitised)
ipv6 dns relay
feature ntp vrf management
feature rsyslog

Why: NTP is on, but no NTP 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 OcNOS-SP 7.0.0. Minimum rConfig 8.3.0 (evaluate_block). Editions: Pro, Vector, Enterprise.


Syslog servers are set to your standard

Both standard syslog servers, 192.0.2.20 and 192.0.2.21 in the template, must be present. They are matched by address, so any severity, port or VRF passes.

Definition
// Syslog servers are set to your standard (replace 192.0.2.20 and 192.0.2.21)
#[evaluate_block]
all:
- regex: '/^logging remote server 192\.0\.2\.20(?=[ \t]|$)/m'
- regex: '/^logging remote server 192\.0\.2\.21(?=[ \t]|$)/m'
passPassing config: Hardened S9510-28DC-B sample (OcNOS-SP 7.0.0, edited copy of the lab router sample)
feature rsyslog
logging remote server 192.0.2.20 5 port 1514 vrf management
logging remote server 192.0.2.21 5 port 1514 vrf management

Why: Both standard syslog servers are set.

failFailing config: S9510-28DC-B lab router sample (OcNOS-SP 7.0.0, sanitised)
feature rsyslog
logging remote server 198.51.100.217 5 port 1514 vrf management

Why: A syslog server is set, but it is not one of the standard servers.

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 OcNOS-SP 7.0.0. Minimum rConfig 8.3.0 (evaluate_block). Editions: Pro, Vector, Enterprise.


The hostname follows your naming pattern

The template’s example pattern is three lower-case letters, a dash, rtr or sw, and two digits, for example dub-rtr01. Change the pattern to match your own naming standard.

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}[ \t]*$/m
passPassing config: Hardened S9510-28DC-B sample (OcNOS-SP 7.0.0, edited copy of the lab router sample)
qos enable
!
hostname dub-rtr01

Why: dub-rtr01 matches the pattern.

failFailing config: Hardened S9510-28DC-B sample (OcNOS-SP 7.0.0, edited copy of the lab router sample), changed: hostname core1 instead of dub-rtr01
qos enable
!
hostname core1

Why: core1 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 OcNOS-SP 7.0.0. Minimum rConfig 8.0.0 (must_match_regex). Editions: Pro, Vector, Enterprise.


An SNMP location is set

The location tells whoever reads an alert where the router is. The rule passes on snmp-server location with any text, with or without vrf management first. A line with only the VRF and no text fails.

Definition
// An SNMP location is set (snmp-server location, any text; nothing to replace)
#[must_match_regex]
/^snmp-server location (?:vrf \S+ )?(?!vrf \S+[ \t]*$)\S/m
passPassing config: Hardened S9510-28DC-B sample (OcNOS-SP 7.0.0, edited copy of the lab router sample)
snmp-server enable snmp vrf management
snmp-server view all .1 included vrf management
snmp-server location vrf management Dublin lab, rack 4

Why: A location is set.

failFailing config: S9510-28DC-B lab router sample (OcNOS-SP 7.0.0, sanitised)
snmp-server enable snmp vrf management
snmp-server view all .1 included vrf management
snmp-server community lab7ro view all version v2c ro vrf management

Why: There is no snmp-server location line.

failFailing config: Hardened S9510-28DC-B sample (OcNOS-SP 7.0.0, edited copy of the lab router sample), changed: location text removed, leaving only the VRF
snmp-server enable snmp vrf management
snmp-server view all .1 included vrf management
snmp-server location vrf management

Why: The line names the VRF but gives no location.

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

ConfigRule resultOverall result
Passing configpassPASS
Failing config 1failFAIL
Failing config 2failFAIL

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 OcNOS-SP 7.0.0. Minimum rConfig 8.0.0 (must_match_regex). Editions: Pro, Vector, Enterprise.


Type to search.