mrnx/network

BGP toolkit

Test Cisco-style AS-path regular expressions against real paths, decode standard, large and extended communities (no-export, blackhole, route targets…), and convert and classify AS numbers.

AS-path regex tester

Common

_ matches a space, comma, brace, parenthesis or the start or end of the path. ^ is the neighbour side, $ the origin.

    In config

    Common filters and their Junos equivalents
    Cisco-style regexMatchesJunos
    Routes from your own AS (empty path)"()"
    Learned from neighbour AS 65001"65001 .*"
    Originated by AS 65001".* 65001"
    Passed through AS 65001 anywhere in the path".* 65001 .*"
    Originated by neighbour 65001, prepends included"65001+"
    Originated by a directly connected AS (one hop)"."
    Contains a 16-bit private ASN (64512–65534)—

    Junos expressions work on whole AS numbers (. is any one AS) and are not interchangeable with the Cisco style.

    Community decoder

      AS numbers

      ASasdotSizeKindNotes

      Only 2-byte AS numbers fit a standard community (AS:value); 4-byte networks use large communities.

      ↑↓ move↵ openesc close