Skip to content
Guides & References

EOS operational standards

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

Policy LibraryUpdated
Platform
arista-eos
Minimum version
rConfig 8.3.0
Editions
Pro, Vector, Enterprise
On this page

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.

Definition
// 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'
passPassing config: Hardened DCS-7280CR3 sample (EOS 4.32.2F, synthetic)
ntp local-interface vrf MGMT Management1
ntp server vrf MGMT 192.0.2.10 prefer
ntp server vrf MGMT 192.0.2.11

Why: Both standard servers are there.

failFailing config: Unhardened DCS-7280CR3 sample (EOS 4.32.2F, synthetic)
ntp local-interface vrf MGMT Management1
ntp server vrf MGMT 192.0.2.1 prefer
ntp server vrf MGMT 192.0.2.2

Why: These are NTP servers, but 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 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>.

Definition
// 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'
passPassing config: Hardened DCS-7280CR3 sample (EOS 4.32.2F, synthetic)
logging buffered 10000
logging trap informational
logging vrf MGMT host 192.0.2.20
logging vrf MGMT host 192.0.2.21
logging format timestamp high-resolution

Why: Both standard syslog hosts are there.

failFailing config: Unhardened DCS-7280CR3 sample (EOS 4.32.2F, synthetic)
logging buffered 10000
logging trap informational
logging vrf MGMT source-interface Management1

Why: There is no syslog host at all.

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

Definition
// 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'
passPassing config: Hardened DCS-7280CR3 sample (EOS 4.32.2F, synthetic)
hostname dub-sw01
ip domain lookup vrf MGMT source-interface Management1
ip name-server vrf MGMT 192.0.2.30
ip name-server vrf MGMT 192.0.2.31
dns domain example.com

Why: Both standard name servers are there.

failFailing config: Unhardened DCS-7280CR3 sample (EOS 4.32.2F, synthetic)
hostname dub-dc1-sp02
ip domain lookup vrf MGMT source-interface Management1
ip name-server vrf MGMT 192.0.2.53
ip name-server vrf MGMT 192.0.2.54
dns domain example.com

Why: The name 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 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.

Definition
// A login banner is set (banner login, any text; nothing to replace)
#[must_match_regex]
/^banner login$/m
passPassing config: Hardened DCS-7280CR3 sample (EOS 4.32.2F, synthetic)
banner login
Authorised 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.

failFailing config: Unhardened DCS-7280CR3 sample (EOS 4.32.2F, synthetic)
!
management ssh
idle-timeout 15
cipher aes256-cbc aes256-ctr
authentication protocol password

Why: There is no banner login line.

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

Definition
// Every interface that is not shut down has a description (nothing to replace)
#[evaluate_block]
scope: ^interface
any:
- equals: shutdown
- regex: '/^\s*description \S/m'
passPassing config: Hardened DCS-7280CR3 sample (EOS 4.32.2F, synthetic)
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.

failFailing config: Unhardened DCS-7280CR3 sample (EOS 4.32.2F, synthetic)
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:

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

Definition
// 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}$/m
passPassing config: Hardened DCS-7280CR3 sample (EOS 4.32.2F, synthetic)
hostname dub-sw01
ip domain lookup vrf MGMT source-interface Management1

Why: dub-sw01 fits the pattern.

failFailing config: Unhardened DCS-7280CR3 sample (EOS 4.32.2F, synthetic)
hostname dub-dc1-sp02
ip domain lookup vrf MGMT source-interface Management1

Why: dub-dc1-sp02 does not fit 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 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.

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 DCS-7280CR3 sample (EOS 4.32.2F, synthetic)
snmp-server contact NetOps <netops@example.com>
snmp-server location Dublin DC1, Hall A
snmp-server group NMS v3 priv

Why: A location is set.

failFailing config: Unhardened DCS-7280CR3 sample (EOS 4.32.2F, synthetic)
snmp-server contact NetOps <netops@example.com>
snmp-server community dc1-ro ro SNMP-MGMT
snmp-server group NMS v3 auth

Why: There is no snmp-server location line.

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


Type to search.