...
| Code Block | ||
|---|---|---|
| ||
hostname R1 ! interface Ethernet1 description Uplink ip address 10.0.0.1/24 no shutdown ! interface Ethernet2 description LAN ip address 192.168.1.1/24 no shutdown !A table works well here. Something like: Common use cases The following are common scenarios where each match mode is particularly useful: Use case Match mode Rationale Baseline configuration — NTP, AAA, logging Loose Requirements are independent lines scattered across the config; only presence matters Security hardening — SSH, SNMPv3, management ACLs Loose Independent requirements with no meaningful ordering relative to each other Firewall and ACL rules Sequential Rules are evaluated top-down; specific denies must precede broader permits Route-maps Sequential Deny sequences must precede permit sequences; prefix-list definitions must precede their references Multiline MOTD banner Strict The complete banner block must be present and uninterrupted Switchport security block Strict Port-security, BPDU guard, and 802.1X settings must form a complete, consecutive block with no unrelated lines between them I'd go with the table over the bullet list. The three-column structure makes the why visible at a glance, which is the most useful thing for someone trying to decide which mode to pick. The prose version buries the rationale inside the bullets. interface Loopback0 description Management Loopback ip address 10.255.255.1 255.255.255.255 ! router ospf router-id 1.1.1.1 network 10.0.0.0/24 area 0 ! |
...
Common use cases:
The following are common some example scenarios where each match mode is particularly useful:
Loose Mode
| Use case | Match mode | Rationale |
|---|---|---|
| Baseline configuration |
...
| - |
...
| NTP, AAA, logging |
...
Security hardening - Verify SSH, SNMP, management ACLs, and other security requirements are configured.
Sequential Mode
Firewall and ACL rules - Verify rules appear in the required order while allowing other rules between them.
Route maps - Verify route-map clauses and their associated configuration appear in the required sequence.
Strict Mode
...
Multiline MOTD banners - Verify the complete banner definition appears as a contiguous block.
...
| ... | Loose | Requirements are independent lines scattered across the config, only presence matters |
| Security hardening - telnet disabled, no SNMPv2, management ACLs... | Loose | Independent requirements with no meaningful ordering relative to each other |
| Firewall and ACL rules | Sequential | Rules are evaluated top-down, specific denies must precede broader permits |
| Route-maps | Sequential | Deny sequences must precede permit sequences |
| Multiline MOTD banner | Strict | The complete banner block must be present and uninterrupted |
| Interface config blocks | Strict | Interface definition, port-security, BPDU guard, and 802.1X settings must form a complete, consecutive block |