Information Technology Reference
In-Depth Information
C H A P T E R
4
Effective BGP Policy Control
Throughout this topic, you have learned that BGP is first and foremost a policy tool. This
results in BGP's being used to build very complex policy-based architectures. The protocol
itself provides a list of attributes through which you can set policies. Additionally, Cisco
IOS software further expands and enhances what is available with additional tools and
knobs. This chapter examines these tools and how you can use them to build complex and
effective BGP policies.
Policy Control Techniques
BGP employs many common policy control techniques. This section starts with regular
expressions and then describes various forms of filter lists, route maps, and policy lists.
Regular Expression
A regular expression is a formula for matching strings that follow a certain pattern. It
evaluates text data and returns an answer of true or false. In other words, either the
expression correctly describes the data, or it does not.
A regular expression is foremost a tool. For example, a regular expression can help extract
the needed information from a large IOS output quickly, as shown in Example 4-1.
Regular Expression to Extract All Neighbors' Maximum Data Segment Sizes
Example 4-1
R2#show ip bgp neighbors | include max data segment
Datagrams (max data segment is 1460 bytes):
Datagrams (max data segment is 1460 bytes):
Datagrams (max data segment is 1460 bytes):
As a formula, a regular expression allows pattern matching in BGP AS_PATH and com-
munity policy settings. Example 4-2 shows the use of a regular expression to describe
an AS_PATH pattern that matches all AS_PATHs that are originated from the neighboring
AS 100.
Search WWH ::




Custom Search