Skip to content

Instantly share code, notes, and snippets.

@zentavr
Last active August 16, 2019 07:16
Show Gist options
  • Save zentavr/a6d74b31e93964f51e771287be94283e to your computer and use it in GitHub Desktop.
Save zentavr/a6d74b31e93964f51e771287be94283e to your computer and use it in GitHub Desktop.

Revisions

  1. zentavr revised this gist Oct 21, 2017. 1 changed file with 2 additions and 0 deletions.
    2 changes: 2 additions & 0 deletions bgp.syntax
    Original file line number Diff line number Diff line change
    @@ -167,6 +167,8 @@ context exclusive ip \n
    keyword whole deny red

    keyword whole le black white
    keyword whole ge black white
    keyword whole lt black white
    keyword whole gt black white
    keyword whole eq black white

  2. zentavr revised this gist Oct 15, 2017. 1 changed file with 2 additions and 0 deletions.
    2 changes: 2 additions & 0 deletions bgp.syntax
    Original file line number Diff line number Diff line change
    @@ -33,6 +33,8 @@ context default
    keyword whole set brightcyan
    keyword whole call brightcyan
    keyword whole description brightcyan

    keyword whole on-match brightmagenta

    keyword whole permit brightgreen
    keyword whole deny red
  3. zentavr revised this gist Oct 15, 2017. 1 changed file with 1 addition and 0 deletions.
    1 change: 1 addition & 0 deletions bgp.syntax
    Original file line number Diff line number Diff line change
    @@ -31,6 +31,7 @@ context default
    keyword whole match brightcyan
    #keyword whole linestart \[\t\s\]set brightcyan
    keyword whole set brightcyan
    keyword whole call brightcyan
    keyword whole description brightcyan

    keyword whole permit brightgreen
  4. zentavr revised this gist Oct 15, 2017. 1 changed file with 5 additions and 0 deletions.
    5 changes: 5 additions & 0 deletions bgp.syntax
    Original file line number Diff line number Diff line change
    @@ -58,6 +58,11 @@ context exclusive match \n
    keyword whole community white
    keyword whole ip\saddress white
    keyword whole extcommunity white
    keyword whole metric white
    keyword whole origin white
    keyword whole peer white
    keyword whole tag white
    keyword whole probability white

    keyword whole prefix-list cyan

  5. zentavr revised this gist Oct 15, 2017. 1 changed file with 1 addition and 0 deletions.
    1 change: 1 addition & 0 deletions bgp.syntax
    Original file line number Diff line number Diff line change
    @@ -31,6 +31,7 @@ context default
    keyword whole match brightcyan
    #keyword whole linestart \[\t\s\]set brightcyan
    keyword whole set brightcyan
    keyword whole description brightcyan

    keyword whole permit brightgreen
    keyword whole deny red
  6. zentavr revised this gist Oct 15, 2017. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion bgp.syntax
    Original file line number Diff line number Diff line change
    @@ -2,7 +2,7 @@
    #
    # Author: Andrii Miroshnychenko <[email protected]>

    wholechars abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_-[]
    wholechars abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_-[]^$

    context default

  7. zentavr created this gist Oct 14, 2017.
    8 changes: 8 additions & 0 deletions Syntax
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,8 @@
    # Add to your Syntax file *BEFORE*:

    file .\* unknown
    include unknown.syntax

    # The next lines:
    file bgpd\.conf$ BGP\sSyntax
    include bgp.syntax
    168 changes: 168 additions & 0 deletions bgp.syntax
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,168 @@
    # BGP Syntax file
    #
    # Author: Andrii Miroshnychenko <[email protected]>

    wholechars abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_-[]

    context default

    keyword whole linestart hostname yellow
    keyword whole linestart agentx yellow
    keyword whole linestart password yellow
    keyword whole linestart enable\spassword yellow
    keyword whole linestart enable yellow
    keyword whole linestart router yellow
    keyword whole linestart neighbor yellow
    keyword whole linestart network yellow
    keyword whole linestart no\snetwork brightred
    keyword whole linestart ip yellow
    keyword whole linestart no\sip brightred
    keyword whole linestart route-map yellow
    keyword whole linestart log yellow
    keyword whole linestart line yellow
    keyword whole linestart distance yellow
    keyword whole linestart aggregate-address yellow
    keyword whole linestart no\saggregate-address brightred
    keyword whole linestart redistribute yellow

    #keyword whole linestart \[\t\s\]bgp brightcyan
    keyword whole bgp brightcyan
    #keyword whole linestart \[\t\s\]match brightcyan
    keyword whole match brightcyan
    #keyword whole linestart \[\t\s\]set brightcyan
    keyword whole set brightcyan

    keyword whole permit brightgreen
    keyword whole deny red

    # Comments
    context exclusive ! \n brown

    context exclusive bgp \n
    keyword whole router-id white
    keyword whole log-neighbor-changes white
    keyword whole bestpath white
    keyword whole dampening white
    keyword whole deterministic-med white
    keyword whole always-compare-med white
    keyword whole cluster-id white
    keyword whole multiple-instance white
    keyword whole route-reflector\sallow-outbound-policy white
    keyword whole as-path yellow
    keyword whole \[1234567890\].\[1234567890\].\[1234567890\].\[1234567890\] brightcyan
    keyword whole \[1234567890\] brightblue

    context exclusive match \n
    keyword whole as-path white
    keyword whole community white
    keyword whole ip\saddress white
    keyword whole extcommunity white

    keyword whole prefix-list cyan

    keyword whole exact-match yellow
    keyword whole rt yellow
    keyword whole soo yellow

    keyword whole \[1234567890\] brightblue

    context exclusive set \n
    keyword whole as-path white
    keyword whole community white
    keyword whole comm-list white
    keyword whole extcommunity white
    keyword whole weight white
    keyword whole local-preference white

    keyword whole prepend\slast-as yellow
    keyword whole prepend yellow

    keyword whole none brightblue black
    keyword whole additive brightmagenta
    keyword whole delete red

    keyword whole \[1234567890\] brightblue

    context exclusive router\sbgp \n
    keyword whole bgp green
    keyword whole view yellow
    keyword whole \[1234567890\] brightblue

    context exclusive distance\sbgp \n
    keyword whole bgp green

    context exclusive redistribute \n
    keyword whole kernel white
    keyword whole static white
    keyword whole connected white
    keyword whole rip white
    keyword whole ospf white

    context exclusive neighbor \n
    keyword whole description gray
    keyword whole remote-as brightgreen
    keyword whole timers\sconnect white
    keyword whole timers white
    keyword whole send-community white
    keyword whole soft-reconfiguration white
    keyword whole update-source white
    keyword whole next-hop-self white
    keyword whole ebgp-multihop white
    keyword whole peer-group white
    keyword whole version white
    keyword whole capability white
    keyword whole interface white
    keyword whole port white
    keyword whole weight white
    keyword whole maximum-prefix white
    keyword whole local-as white
    keyword whole ttl-security\shops white
    keyword whole peer-group white
    keyword whole strict-capability-match white
    keyword whole dont-capability-negotiate white
    keyword whole override-capability white
    keyword whole route-reflector-client white
    keyword whole shutdown red
    keyword whole default-originate brightred

    # Filtering
    keyword whole route-map yellow
    keyword whole distribute-list yellow
    keyword whole prefix-list yellow
    keyword whole filter-list yellow

    keyword whole in cyan
    keyword whole out magenta
    keyword whole \[1234567890\].\[1234567890\].\[1234567890\].\[1234567890\] brightcyan
    keyword whole \[1234567890\] brightblue

    context exclusive network \n
    keyword whole \[1234567890\].\[1234567890\].\[1234567890\].\[1234567890\]/\[1234567890\] brightcyan
    keyword whole \[1234567890\].\[1234567890\].\[1234567890\].\[1234567890\] brightcyan

    context exclusive log \n
    keyword whole file white

    context exclusive ip \n
    keyword whole as-path white
    keyword whole prefix-list white
    keyword whole community-list white
    keyword whole extcommunity-list white
    keyword whole description gray
    keyword whole access-list brightcyan

    keyword whole standard yellow
    keyword whole expanded yellow

    keyword whole permit brightgreen
    keyword whole deny red

    keyword whole le black white
    keyword whole gt black white
    keyword whole eq black white

    keyword whole seq magenta

    keyword whole \[1234567890\].\[1234567890\].\[1234567890\].\[1234567890\] brightcyan
    keyword whole \[1234567890\] brightblue