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.
// 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'feature ntp vrf managementntp server 192.0.2.10 vrf managementntp server 192.0.2.11 vrf managementWhy: Both standard NTP servers are set.
ipv6 dns relayfeature ntp vrf managementfeature rsyslogWhy: NTP is on, but no NTP 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 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.
// 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'feature rsysloglogging remote server 192.0.2.20 5 port 1514 vrf managementlogging remote server 192.0.2.21 5 port 1514 vrf managementWhy: Both standard syslog servers are set.
feature rsysloglogging remote server 198.51.100.217 5 port 1514 vrf managementWhy: 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:
| 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 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.
// 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]*$/mqos enable!hostname dub-rtr01Why: dub-rtr01 matches the pattern.
qos enable!hostname core1Why: core1 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 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.
// 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/msnmp-server enable snmp vrf managementsnmp-server view all .1 included vrf managementsnmp-server location vrf management Dublin lab, rack 4Why: A location is set.
snmp-server enable snmp vrf managementsnmp-server view all .1 included vrf managementsnmp-server community lab7ro view all version v2c ro vrf managementWhy: There is no snmp-server location line.
snmp-server enable snmp vrf managementsnmp-server view all .1 included vrf managementsnmp-server location vrf managementWhy: The line names the VRF but gives no location.
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 1 | fail | FAIL |
| Failing config 2 | 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 OcNOS-SP 7.0.0. Minimum rConfig 8.0.0 (must_match_regex). Editions: Pro, Vector, Enterprise.
Related reference
- IP Infusion OcNOS policy templates: every rule in
ocnos-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.