Each autonomous system that a route passed through prepends it's AS number to the beginning of the AS path.
The origin information details the completeness of AS path information. An origin of igp indicates the route was learned from an interior routing protocol and is most likely complete. An origin of egp indicates the route was learned from an exterior routing protocol that does not support AS paths (EGP for example) and the path is most likely not complete. When the path information is definitely not complete, an origin of incomplete is used.
AS path regular expressions are defined in RFC 1164 section 4.2.
aspath aspath_regexp origin any | ( [ igp ] [egp ] [ incomplete ] )This specifies that an AS matching the aspath_regexp with the specified origin is matched.
autonomous_system . ( aspath_regexp )
*
or ?
works on a single element or on a
regular expression enclosed in parentheses
aspath_term {m,n} aspath_term {m} aspath_term {m,} aspath_term * aspath_term + aspath_term ? aspath_term | aspath_term
{m,n}
(where m
and n are both non-negative integers and m <= n) means at least
m and at most n repetitions.
{m}
(where m is
a positive integer) means exactly m repetitions.
{m,}
(where m is a
positive integer) means m or more repetitions.
*
means zero or
more repetitions. This is shorthand for {0,}
.
+
means one or
more repetitions. This is shorthand for {1,}
.
?
means
zero or one repetition. This is shorthand for
{0,1}
.