Netgear M5300-28G-POE+ (GSM7228PSv1h2) - 12-Port Managed Gigabit Switch Ratgeber Für Administratoren

Seite von 721
BGP 
193
 Managed Switches
If you want to filter routes from a specific neighbor, use the following command:
(Netgear Switch) (Config-router)#neighbor 36.1.1.2 prefix-list prefix1 in
If you want to filter routes that will be sent out to a neighbor, use the option <out>:
(Netgear Switch) (Config-router)#distribute-list prefix-list prefix1 out
Or 
(Netgear Switch) (Config-router)#neighbor 36.1.1.2 prefix-list prefix1 out
Example 6: Filter Routes with AS_PATH
Although filtering by prefix list is easy and fast, it is not practical to filter routes in the case of 
a large number of routes. In this case, BGP provides the AS_PATH filter to control routes 
based on AS_PATH instead of each specific address in a prefix list. It allows users to create 
an AS-PATH list using regular expressions. Regular expressions use special characters to 
find matches in the given texts.
The following special characters are supported in AS_PATH regular expressions.
Table 1.  Special characters supported in AS_PATH regular expressions 
 
Special 
Character
Symbol
Behavior
example
asterisk
*
Matches zero or more sequences of 
the pattern.
1* matches any occurrence of the number 1 
including none
12* matches the characters 12 and any 
characters that follow 12.
brackets
[ ]
Designates a range of 
single-character patterns.
[0123a-z] matches 0, 1, and w, but not 4, 8, or 
K
caret
^
Matches the beginning of the input 
string.
^123 matches 1234, but not 01234
dollar sign
$
Matches the end of the input string.
123$ matches 0123, but not 1234
hyphen
-
Separates the end points of a 
range.
[a-z] matches any character between a and z.
period
.
Matches any single character, 
including white space.
0.0 matches 0x0 and 020
t..t matches strings such as test, text, and tart
plus sign
+
Matches 1 or more sequences of 
the pattern.
2+ requires there to be at least one number 2 in 
the string to be matched