AristaColorHighlight: A SecureCRT Keyword Highlighting Profile for Arista EOS

 



If you work with Arista EOS switches through SecureCRT, you've probably noticed that most of the popular keyword-highlighting .ini files floating around online are written for Cisco IOS. They light up "show" output nicely, but the moment you connect to an EOS device, half the coloring is either wrong or missing — MLAG, VXLAN, EVPN, VARP/VRRP, and CVX simply don't exist in the Cisco world, so nothing highlights them.


I built AristaColorHighlight to fix that: a from-scratch SecureCRT keyword list built specifically around EOS syntax, cross-checked line by line against the official EOS User Guide, and — after a lot of trial and error — hardened against a couple of SecureCRT quirks that aren't documented anywhere.


WHAT IT COVERS


• Interfaces — Ethernet/Et, Management/Ma, Port-Channel/Po, Loopback/Lo, Vlan/Vl, Vxlan, all abbreviation styles


• Redundancy protocols — MLAG, VARP, and standard VRRP (most Cisco-derived lists only have HSRP, which EOS doesn't support)


• Overlay/Underlay — VXLAN, EVPN (route-target, route-distinguisher, ESI, etc.), BGP, OSPF


• STP — rapid-pvst/MSTP, bpduguard/bpdufilter/portfast, port roles


• CVX — "show cvx" / "show management cvx" and its actual output fields (Registration Complete, Heartbeat interval, etc.)


• EOS daemons — ProcMgr, Sysdb, TerminAttr, Netstack, and friends


• Status words — a clean Good/Bad split (up, enabled, active vs. down, error, mismatch, errdisabled)


• Syslog facility codes — %SPANTREE-, %AAA-, %BGP-, %OSPF-, plus a generic catch-all for anything else


• Standard stuff too — IPv4/IPv6, MAC addresses, ACL hit-counters (with a zero vs. non-zero distinction so you're not drowning in gray), NTP/DNS, QoS, BFD, hardware/serial info, file extensions, and command prompts


THE PART THAT ACTUALLY TOOK THE LONGEST: FIGHTING SECURECRT ITSELF


Building the keyword list was the easy part. Getting SecureCRT to actually apply it was the real project. Two failure modes, in case you run into the same thing:


1) The whitespace shorthand doesn't mean "whitespace" in every SecureCRT install.

In one environment, entries using the regex whitespace shorthand simply never matched — not a coloring bug, not a priority issue, just silently ignored. Everything else (word boundaries, digit classes, non-capturing groups, repetition counts) worked fine. Swapping every whitespace shorthand for a literal space-plus-quantifier fixed it immediately.


2) "Whole words" match style forbids spaces — anywhere, even inside a character class.

If your session's Match Style is locked to "Whole words" (and you can't change it), SecureCRT will flat-out reject any keyword containing a space character, including one buried inside a character class like [^) ]. The practical fix: stop trying to match multi-word phrases like "show vxlan vni" as one colored span. Instead, color "show" (optional) and the individual nouns (vxlan, vni, vrrp, ...) separately — under this match style that's the only thing that will actually work.


If your keyword list "looks right" in the editor but nothing lights up on a real session, check these two things before you assume the file is broken.


DOWNLOAD


"Since Blogger doesn't support direct file uploads, I am attaching them via links instead."

https://bingbongbang.tistory.com/30



The .ini file goes in your SecureCRT Keywords config folder (on Windows: AppData\Roaming\VanDyke\Config\Keywords). Import it from Session Options → Terminal → Appearance → Keyword Highlighting.


(Attach AristaColorHighlight.ini here)


If something doesn't highlight the way you'd expect, it's almost certainly one of the two match-style issues above — check your session's Match Style setting first.


댓글

가장 많이 본 글