Which regular expression will only allow prefixes that originated from AS 65000 and that are learned through AS 65001?
Correct Answer: D
Explanation/Reference:
Explanation:
The following table lists the regular expressions and their meanings:
+
|
+
------------------------------------------------------+
CHAR | USAGE |
------------------------------------------------------|
|
|
|
|
|
|
|
|
^ | Start of string |
------|-----------------------------------------------|
$ | End of string |
------|-----------------------------------------------|
[] | Range of characters |
------|-----------------------------------------------|
- | Used to specify range ( i.e. [0-9] ) |
------|-----------------------------------------------|
|
|
|
|
|
|
|
|
|
|
|
|
( ) | Logical grouping |
------|-----------------------------------------------|
. | Any single character |
------|-----------------------------------------------|
* | Zero or more instances |
------|-----------------------------------------------|
+ | One or more instance |
------|-----------------------------------------------|
? | Zero or one instance |
------|-----------------------------------------------|
_ | Comma, open or close brace, open or close |
| parentheses, start or end of string, or space |
+
------------------------------------------------------+
Some commonly used regular expressions include:
-------------+---------------------------+
+
|
|
|
|
|
|
|
|
|
|
|
|
|
Expression | Meaning |
-------------+---------------------------|
.* | Anything |
-------------+---------------------------|
^$ | Locally originated routes |
-------------+---------------------------|
^100_ | Learned from AS 100 |
-------------+---------------------------|
_100$ | Originated in AS 100 |
-------------+---------------------------|
_100_ | Any instance of AS 100 |
-------------+---------------------------|
^[0-9]+$ | Directly connected ASes |
+
-------------+---------------------------+
Reference: http://blog.ine.com/2008/01/06/understanding-bgp-regular-expressions/