PrepAway - Latest Free Exam Questions & Answers

There is some confusion on this sim and what it is

There is some confusion on this sim and what it is. So I will tell you that it is a window with 4 squares on the left side. Click each one to see the question. Again, there are 4 questions and one topology. Click the topology button at the bottom of the sim to see it. There is only one topology for all 4 questions. You do NOT log into any routers. All configuration is provided as text in the question.

NOTE: The actual topology may vary with the routing protocol questions selected for the sim and the number of routers could be as high as R6

What of the routes will be advertized by R5 to R4?

For R4 they give some configuration that uses

router bgp X
neighbor 2.2.2.2 remote-as y
neighbor 2.2.2.2 route-map foo in
ip as-path access-list 10 permit ^10$ (Really it wasn’t clear what symbol they were dad image or probably my blind eyes

route-map foo permit 10
match as-path 10

PrepAway - Latest Free Exam Questions & Answers

A.
No Route will be received by R4

B.
All route will be seen by R4

C.
Combination of the three routes (3, 4 and 5)

Explanation:
+——————————————————+
| 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 |
+————-+—————————+
Lets break some of the above expressions down step-by-step. The first one .* says to match any single character (.), and then find zero or more instances of that single character (*). This means zero or more instances or any character, which effectively means anything.
The next string ^$ says to match the beginning of the string (^), and then immediately match the end of the string ($). This means that the string is null. Within the scope of BGP the only time that the AS-Path is null is when you are looking at a route within your own AS that you or one of your iBGP peers has originated. Hence this matches locally originated routes.
The next string ^100_ says to match the beginning of the string (^), the literal characters 100, and then a comma, an open or close brace, an open or close, a parentheses, the start or end of the string, or a space (_). This means that the string must start with the number 100 followed by any non-alphanumeric character. In the scope of BGP this means that routes which are learned from the AS 100 will be matched, as 100 will be the first AS in the path when AS 100 is sending us routes.
The next string _100$ is the exact opposite of the previous one. This string says to start with any non-alphanumeric character (_), followed by the literal characters 100, followed by the end of the string ($). This means that AS 100 is the last AS in the path, or in other words that the prefix in question was originated by AS 100.
The next string _100_ is the combination of the two previous strings with some extra matches. This string means that the literal characters 100 are set between any two non-alphanumeric characters. The first of these could be the start of the string, which would match routes learned from AS 100, while the second of these could be the end of the string, which would match routes originated in AS 100. Another case could be that the underscores represent spaces, in which the string would match any other AS path information as long as 100 is included somewhere. This would match any routes which transit AS 100, and therefore _ASN_ is generally meant to match routes that transit a particular AS as defined by the number ASN.
The final string ^[0-9]+$ is a little more complicated match. Immediately we can see that the string starts (^), and we can see later that it ends ($). In the middle we see a range of numbers 0-9 in brackets, followed by the plus sign. The numbers in brackets mean that any number from zero to nine can be matched, or in other words, any number. Next we have the plus sign which means one or more instances. This string [0-9]+ therefore means one or more instance of any number, or in other words any number including numbers with multiple characters (i.e. 1, 12, 123, 1234, 12345678, etc.). When we combine these all together this string means routes originated in any directly connected single AS, or in other words, the routes directly originated by the peers of your AS.
Now lets look at a more complicated match, and using the above character patterns we will see how we can construct the expression step by step. Suppose we have the following topology below, where we are looking at the network from the perspective of AS 100.
+——–+ +——–+ +——–+ +——–+
| AS 200 |-| AS 201 |-| AS 202 |-| AS 203 |
+——–+ +——–+ +——–+ +——–+

+——–+ +——–+ +——–+
| AS 300 |-| AS 301 |-| AS 302 |
+——–+ +——–+ +——–+ -+——–+
>–| AS 100 |
+——–+ +——–+ / -+——–+

 


Leave a Reply