EOS operational standards
Rules that check a switch matches your standard, not a security benchmark. They catch drift: a switch someone set up by hand with the wrong NTP server or hostname. They come from the eos-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 eos-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 Arista EOS 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 switch should get its time from the same servers, or log times will not line up. This rule needs both standard NTP servers, with or without vrf <name>. It does not check that no other server is set.
// 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'ntp local-interface vrf MGMT Management1ntp server vrf MGMT 192.0.2.10 preferntp server vrf MGMT 192.0.2.11Why: Both standard servers are there.
ntp local-interface vrf MGMT Management1ntp server vrf MGMT 192.0.2.1 preferntp server vrf MGMT 192.0.2.2Why: These are NTP servers, but 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 EOS 4.32.2F (synthetic). Minimum rConfig 8.3.0 (evaluate_block). Editions: Pro, Vector, Enterprise.
Syslog servers
This rule needs both standard syslog hosts, with or without vrf <name>.
// Syslog servers are set to your standard (replace 192.0.2.20 and 192.0.2.21)#[evaluate_block]all: - regex: '/^logging (vrf \S+ )?host 192\.0\.2\.20(?= |$)/m' - regex: '/^logging (vrf \S+ )?host 192\.0\.2\.21(?= |$)/m'logging buffered 10000logging trap informationallogging vrf MGMT host 192.0.2.20logging vrf MGMT host 192.0.2.21logging format timestamp high-resolutionWhy: Both standard syslog hosts are there.
logging buffered 10000logging trap informationallogging vrf MGMT source-interface Management1Why: There is no syslog host at all.
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 EOS 4.32.2F (synthetic). Minimum rConfig 8.3.0 (evaluate_block). Editions: Pro, Vector, Enterprise.
DNS servers
This rule needs both standard name servers on ip name-server lines, with or without vrf <name>.
// DNS servers are set to your standard (replace 192.0.2.30 and 192.0.2.31)#[evaluate_block]all: - regex: '/^ip name-server (vrf \S+ )?192\.0\.2\.30(?= |$)/m' - regex: '/^ip name-server (vrf \S+ )?192\.0\.2\.31(?= |$)/m'hostname dub-sw01ip domain lookup vrf MGMT source-interface Management1ip name-server vrf MGMT 192.0.2.30ip name-server vrf MGMT 192.0.2.31dns domain example.comWhy: Both standard name servers are there.
hostname dub-dc1-sp02ip domain lookup vrf MGMT source-interface Management1ip name-server vrf MGMT 192.0.2.53ip name-server vrf MGMT 192.0.2.54dns domain example.comWhy: The name 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 EOS 4.32.2F (synthetic). Minimum rConfig 8.3.0 (evaluate_block). Editions: Pro, Vector, Enterprise.
Login banner
The same check as the management access banner rule: a banner login line with any text.
// A login banner is set (banner login, any text; nothing to replace)#[must_match_regex]/^banner login$/mbanner loginAuthorised access only. This device belongs to Example Ltd.All activity is logged and monitored. Disconnect now if you are not an authorised user.EOF!Why: A login banner is set.
!management ssh idle-timeout 15 cipher aes256-cbc aes256-ctr authentication protocol passwordWhy: There is no banner login line.
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 EOS 4.32.2F (synthetic). Minimum rConfig 8.0.0 (must_match_regex). Editions: Pro, Vector, Enterprise.
Interface descriptions
A description says what a port is for. This rule checks every interface block on its own: each must be shut down or have a description. EOS prints unused Ethernet ports as a bare interface block, so they fail until you shut them down or describe them. Loopback and Management interfaces are checked too.
// Every interface that is not shut down has a description (nothing to replace)#[evaluate_block]scope: ^interfaceany: - equals: shutdown - regex: '/^\s*description \S/m'interface Ethernet8/1 description P2P_LINK_TO_DUB-DC1-LF08_Ethernet49/1 mtu 9214 no switchport ip address 192.0.2.142/31!interface Ethernet9/1 shutdown!interface Ethernet31/1 description RESERVED_DCI_1 shutdown no switchport!interface Loopback0 description ROUTER_ID ip address 203.0.113.1/32!Why: Every interface is shut down or has a description.
interface Ethernet8/1 description P2P_LINK_TO_DUB-DC1-LF08_Ethernet49/1 mtu 9214 no switchport ip address 192.0.2.142/31!interface Ethernet9/1!interface Ethernet10/1!Why: Ethernet9/1 and Ethernet10/1 are unused ports with no description and no shutdown.
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 EOS 4.32.2F (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, a dash, rtr or sw, and two digits, for example dub-sw01. Replace it with your own.
// The hostname follows your naming pattern (replace the example pattern [a-z]{3}-(rtr|sw)[0-9]{2}, for example dub-sw01)#[must_match_regex]/^hostname [a-z]{3}-(rtr|sw)[0-9]{2}$/mhostname dub-sw01ip domain lookup vrf MGMT source-interface Management1Why: dub-sw01 fits the pattern.
hostname dub-dc1-sp02ip domain lookup vrf MGMT source-interface Management1Why: dub-dc1-sp02 does not fit 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 EOS 4.32.2F (synthetic). Minimum rConfig 8.0.0 (must_match_regex). Editions: Pro, Vector, Enterprise.
SNMP location
An SNMP location tells your monitoring system where the switch is. This rule needs an snmp-server location line with any text.
// An SNMP location is set (snmp-server location, any text; nothing to replace)#[must_match_regex]/^snmp-server location \S/msnmp-server contact NetOps <netops@example.com>snmp-server location Dublin DC1, Hall Asnmp-server group NMS v3 privWhy: A location is set.
snmp-server contact NetOps <netops@example.com>snmp-server community dc1-ro ro SNMP-MGMTsnmp-server group NMS v3 authWhy: There is no snmp-server location line.
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 EOS 4.32.2F (synthetic). Minimum rConfig 8.0.0 (must_match_regex). Editions: Pro, Vector, Enterprise.
Related reference
- Arista EOS policy templates: every rule in
eos-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.