02 Advanced BGP Features
02 Advanced BGP Features
02 Advanced BGP Features
Page 1 Copyright © 2020 Huawei Technologies Co., Ltd. All rights reserved.
Foreword
⚫ Border Gateway Protocol (BGP) is usually deployed on large-scale networks. Compared with
an Interior Gateway Protocol (IGP), BGP has more flexible route control capabilities. Each
BGP route can carry multiple path attributes. Special route matching tools, such as AS_Path
and community filters, are available for matching the route attributes. Routing policies can
be used to control route advertisement and acceptance according to the actual networking
requirements.
⚫ In addition, BGP provides various advanced features and networking deployment solutions to
improve network performance.
⚫ This course describes the fundamentals and configurations of BGP route control, common
advanced BGP features, such as ORF, peer group, and security, as well as the networking
modes of BGP route reflectors (RRs).
Page 2 Copyright © 2020 Huawei Technologies Co., Ltd. All rights reserved.
Objectives
⚫ On completion of this course, you will be able to:
Use regular expressions during the configurations of AS_Path and community filters.
Use AS_Path and community filters to control BGP routes.
Apply the ORF and peer group functions of BGP.
Perform basic configurations of BGP security.
Learn about the networking modes of BGP RRs.
Page 3 Copyright © 2020 Huawei Technologies Co., Ltd. All rights reserved.
Contents
1. BGP Route Control
Page 4 Copyright © 2020 Huawei Technologies Co., Ltd. All rights reserved.
Overview AS_Path Filter Community Filter
Page 5 Copyright © 2020 Huawei Technologies Co., Ltd. All rights reserved.
▫ R1 and R2 reside in AS 101, and establish an IBGP peer relationship with each
other. R3 and R4 reside in AS 102, and each establishes an EBGP peer relationship
with R2.
▫ R2 can filter out the Net2 route through BGP route control so that R2's BGP
routing table does not contain the Net2 route.
▫ R3 and R4 can implement BGP route control by modifying the attributes of the
Net1 and Net3 routes, respectively. In this way, when a device in AS 102 accesses
Net1, R3 is preferentially selected as the egress device; when the device accesses
Net3, R4 is preferentially selected as the egress device.
• Note: For details about the ACL, IP prefix list, filter-policy, route-policy, and BGP path
attributes, see the "HCIP-Datacom-Core Technology" course.
Overview AS_Path Filter Community Filter
Regular Expression
⚫ A regular expression (regex) is a formula used to match character strings based on a specific template.
It consists of common characters (for example, letters from a to z) and special characters.
⚫ Common characters are used to match themselves in a string:
Include all upper-case and lower-case letters, digits, punctuations, and special symbols.
For example, the regex a matches the letter "a" in "abc", the regex 10 matches the digits "10" in
"10.113.25.155", and the regex @ matches the symbol "@" in "xxx@xxx.com".
⚫ Special characters, together with common characters, are used to match complex or special character
strings:
A special character that precedes or follows a common character is used to restrict or extend the independent
control character or placeholder of the common character.
A special character describes how the character that precedes the special character is reused.
A special character specifies a complete range.
Page 6 Copyright © 2020 Huawei Technologies Co., Ltd. All rights reserved.
▫ Checks and obtains the sub-character string that matches a specific rule in the
character string.
^ Matches the start position of a character string. ^10 matches 10.1.1.1 but not 20.1.1.1.
$ Matches the end position of a character string. 1$ matches 10.1.1.1 but not 10.1.1.2.
Underscore, which matches any separator.
Matches a comma (,), left brace ({), right brace (}), left parenthesis ((), or right parenthesis
()). _10 matches (10, {10, space10, and so on.
_ (Same as ^) Matches the start position of an input character string. 10_ matches 10), 10}, 10space, and so on.
(Same as $) Matches the end position of an input character string.
Matches a space.
| Pipeline character, which is a logical OR operator. x|y matches x or y. 100|200 matches 100 or 200.
Defines an escape character, which is used to mark the next character (common or special
\ character) as a common character.
\* matches *.
• Type 2
Matches a sub-regular expression that it
* follows zero or multiple times.
10* matches 1, 10, 100, 1000, and so on. (10) * matches null, 10, 1010, 101010, and so on.
Page 7 Copyright © 2020 Huawei Technologies Co., Ltd. All rights reserved.
• Note: The parentheses () can be used to define the scope and priority of an operator.
For example, gr(a|e)y is equivalent to gray|grey.
Overview AS_Path Filter Community Filter
[xyz] Matches any character contained in a regex. [123] matches the character 2 in 255.
[^xyz] Matches any character that is not contained in a regex. [^123] matches any character except 1, 2, and 3.
[a-z] Matches any character within a specified range in a regex. [0-9] matches all digits in the range from 0 to 9.
[^0-9] matches all non-digit characters (matching
[^a-z] Matches any character beyond the range specified in a regex.
any characters except digits 0 to 9).
• Think about character strings that can be matched against the regexes of the following types.
Type 1 Type 2 Type 3
^a.$ abc*d [abcd]
^100_ abc+d [a-c 1-2]$
^100$ abc?d [^act]$
100$|400$ a(bc)?d [123].[7-9]
^\(65000\)$
Page 8 Copyright © 2020 Huawei Technologies Co., Ltd. All rights reserved.
• Quiz:
• Type 1:
▫ ^a.$: matches a character string that starts with the character a and ends with
any single character, for example, a0, a!, ax, and so on.
▫ ^100_: matches a character string starting with 100, for example, 100, 100 200,
100 300 400, and so on.
▫ ^100$: matches only 100.
▫ 100$|400$: matches a character string ending with 100 or 400, for example, 100,
1400, 300 400, and so on.
▫ ^\(65000\)$: matches (65000) only.
• Type 2:
▫ abc*d: matches the character c zero or multiple times, for example, abd, abcd,
abccd, abcccd, abccccdef, and so on.
▫ abc+d: matches the character c once or multiple times, for example, abcd, abccd,
abcccd, abccccdef, and so on.
▫ abc?d: matches the character c zero times or once, for example, abd, abcd,
abcdef, and so on.
▫ a(bc)?d: matches the character string bc zero times or once, for example, ad,
abcd, aaabcdef, and so on.
• Type 3:
▫ [abcd]: matches any character in the string abcd, for example, ax, b!, abc, d0,
and so on.
▫ [a-c 1-2]$: matches a character string ending with any of a, b, c, 1, and 2, for
example, a, a1, 62, xb, 7ac, and so on.
▫ [^act]$: matches a character string that does not end with a, c, or t, for example,
ax, b!, d, and so on.
▫ [123].[7-9]: matches the character strings such as 1 7, 2x9, and 348.
Overview AS_Path Filter Community Filter
Page 9 Copyright © 2020 Huawei Technologies Co., Ltd. All rights reserved.
• The AS_Path attribute is a well-known mandatory attribute of BGP. All BGP routes
must carry this attribute. This attribute records the numbers of all the ASs that a BGP
route traversed during transmission.
Regex: ^103, ^103_, and so on. R1 receives many BGP routes, each of which has
its own AS_Path value.
• Other examples: To meet a specific requirement, R1 needs to apply
a policy to the routes carrying the AS number 101
Matches the AS_Path list that does not contain any AS number, that is,
^$ matching routes in the local AS.
in their AS_Path attribute. In this case, you can
associate an AS_Path filter with a regex to match
.* Match all or any routes. routes, regardless of the route prefixes.
^10[012349]$ Matches the AS numbers 100, 101, 102, 103, 104, and 109.
^10[^0-6]$ Matches the AS_Path lists that exclude the AS numbers 100 to 106.
You can use different regexes to meet different
^10. Matches the AS numbers 100 to 109 and 10. requirements, for example, using ^101$ to
match AS 101, and _101$ to match the AS_Path
^12(_34)?_56$ Matches the AS_Path lists 12 56 and 12 34 56.
lists ending with AS 101.
Page 10 Copyright © 2020 Huawei Technologies Co., Ltd. All rights reserved.
Overview AS_Path Filter Community Filter
A matching rule based on the AS_Path filter is created in the route-policy view.
Page 11 Copyright © 2020 Huawei Technologies Co., Ltd. All rights reserved.
• Multiple matching rules (each in permit or deny mode) can be specified in an AS_Path
filter. These rules are in the OR relationship, which means that if a route matches one
of the matching rules, the route is considered to match the AS_Path filter.
▫ regular-expression: specifies a regex for the AS_Path filter. The value is a string of
1 to 255 characters and can contain spaces.
• The default behavior of an AS_Path filter is deny. That is, if a route is not permitted in
a filtering, the route fails to match the AS_Path filter. If all matching rules in an
AS_Path filter work in deny mode, all BGP routes are denied by the filter. To prevent
this problem, configure a matching rule in permit mode after one or more matching
rules in deny mode so that the routes except for those denied by the preceding
matching rules can match the filter.
Overview AS_Path Filter Community Filter
Page 12 Copyright © 2020 Huawei Technologies Co., Ltd. All rights reserved.
Overview AS_Path Filter Community Filter
Page 13 Copyright © 2020 Huawei Technologies Co., Ltd. All rights reserved.
Overview AS_Path Filter Community Filter
Page 14 Copyright © 2020 Huawei Technologies Co., Ltd. All rights reserved.
Overview AS_Path Filter Community Filter
Page 15 Copyright © 2020 Huawei Technologies Co., Ltd. All rights reserved.
• The community attribute is an optional transitive attribute. It can identify the routes
with the same characteristics, regardless of the scattered route prefixes and various AS
numbers. That is, a specific community value can be assigned to some routes so that
these routes can be matched against the community value instead of the network
number or mask. Then, a corresponding routing policy can be applied to the matched
routes.
Overview AS_Path Filter Community Filter
Community Attributes
⚫ Well-known community attributes
Name Number Description
After a device receives a route with this attribute, the device can
Internet 0 (0x00000000) advertise this route to any BGP peer. By default, all routes belong to the
Internet community.
After a device receives a route with this attribute, the device does not
No_Advertise 4294967042 (0xFFFFFF02)
advertise this route to any BGP peer.
After a device receives a route with this attribute, the device does not
No_Export 4294967041 (0xFFFFFF01)
advertise this route outside the local AS.
After a device receives a route with this attribute, the device does not
advertise this route outside the local AS. If a confederation is used, the
No_Export_Subconfed 4294967043 (0xFFFFFF03)
device does not advertise this route to the other sub-ASs in the
confederation.
Page 16 Copyright © 2020 Huawei Technologies Co., Ltd. All rights reserved.
Overview AS_Path Filter Community Filter
2. Configure the device to advertise the community attribute(s) to a specified peer or peer group.
Page 17 Copyright © 2020 Huawei Technologies Co., Ltd. All rights reserved.
▫ internet: allows the matched routes to be advertised to any peers. By default, all
routes belong to the Internet community.
▫ no-advertise: prevents the matched routes from being advertised to any peer.
After a device receives a route with this attribute, it cannot advertise this route to
any other BGP peers.
▫ no-export: prevents the matched routes from being advertised outside the local
AS but allows them to be advertised to other sub-ASs in the local AS. After a
device receives a route with this attribute, it cannot advertise this route outside
the local AS.
▫ additive: adds community attributes to the routes that match the filtering
conditions.
Overview AS_Path Filter Community Filter
The number of a basic community filter ranges from 1 to 99. Only the community number or well-known
community attribute can be specified in a basic community filter.
The number of an advanced community filter ranges from 100 to 199. A regex can be specified as a matching
condition in an advanced community filter.
Page 18 Copyright © 2020 Huawei Technologies Co., Ltd. All rights reserved.
A matching rule based on the community filter is created in the route-policy view.
Page 20 Copyright © 2020 Huawei Technologies Co., Ltd. All rights reserved.
▫ whole-match: indicates complete matching. That is, all the community attributes
in the specified community filter must be matched. This parameter applies only
to basic community filters.
Overview AS_Path Filter Community Filter
Match the routes carrying community value [100:1] or community values [200:1, 300:1]. (The relationship
between different groups of community values is OR. A set of community values in a command configuration is
called a group.)
Page 21 Copyright © 2020 Huawei Technologies Co., Ltd. All rights reserved.
Overview AS_Path Filter Community Filter
Page 22 Copyright © 2020 Huawei Technologies Co., Ltd. All rights reserved.
Page 23 Copyright © 2020 Huawei Technologies Co., Ltd. All rights reserved.
Overview AS_Path Filter Community Filter
Page 24 Copyright © 2020 Huawei Technologies Co., Ltd. All rights reserved.
Overview AS_Path Filter Community Filter
Page 25 Copyright © 2020 Huawei Technologies Co., Ltd. All rights reserved.
Overview AS_Path Filter Community Filter
Page 26 Copyright © 2020 Huawei Technologies Co., Ltd. All rights reserved.
Overview AS_Path Filter Community Filter
Page 27 Copyright © 2020 Huawei Technologies Co., Ltd. All rights reserved.
Contents
1. BGP Route Control
Page 28 Copyright © 2020 Huawei Technologies Co., Ltd. All rights reserved.
ORF Peer Group Security
Page 29 Copyright © 2020 Huawei Technologies Co., Ltd. All rights reserved.
ORF Peer Group Security
2. Enable the prefix-based ORF capability on the local device for the peer or peer group.
Note: The ORF function must be enabled on both ends of a peer relationship.
Page 30 Copyright © 2020 Huawei Technologies Co., Ltd. All rights reserved.
▫ export: applies the routing policy to the routes to be advertised to the peer or
peer group.
▫ both: enables the local device to both send and accept ORF packets.
Page 31 Copyright © 2020 Huawei Technologies Co., Ltd. All rights reserved.
ORF Peer Group Security
Page 32 Copyright © 2020 Huawei Technologies Co., Ltd. All rights reserved.
ORF Peer Group Security
Page 33 Copyright © 2020 Huawei Technologies Co., Ltd. All rights reserved.
• Each peer in a peer group can be configured with its own policies for route
advertisement and acceptance.
ORF Peer Group Security
A peer group is created in the BGP view, BGP-VPN instance IPv4 address family view, or BGP-VPN instance IPv6
address family view.
2. (Optional) Configure an AS number for the specified peer group.
An AS number is configured for the EBGP peer group. The AS number of an IBGP peer group is the local AS
number of the device with the IBGP peer group configured.
4. Specify the source interface for sending BGP messages and the source address for initiating a BGP connection.
Page 34 Copyright © 2020 Huawei Technologies Co., Ltd. All rights reserved.
Page 35 Copyright © 2020 Huawei Technologies Co., Ltd. All rights reserved.
• As shown in the figure, assume that static routes are used or OSPF is used to ensure
internal network reachability in AS 102. The configuration details are not provided
here.
ORF Peer Group Security
Page 36 Copyright © 2020 Huawei Technologies Co., Ltd. All rights reserved.
ORF Peer Group Security
BGP Security
⚫ Common BGP attacks are as follows:
A rogue BGP peer relationship is established, and invalid routes are advertised to disturb the normal routing
table.
A router receives a large number of bogus BGP messages and sends them to the CPU. As a result, the CPU
usage goes excessively high.
Establishes a rogue
AS 101 BGP routing table
1 IBGP peer relationship
and advertise the *> Net1
Rogue router invalid Net1 route. R1 R2
IBGP
The routing table of
the authorized
The CPU
router is disturbed.
usage surges.
Attacker R3
• BGP uses authentication and Generalized TTL Security Mechanism (GTSM) to ensure the security of message
exchange between BGP peers.
Page 37 Copyright © 2020 Huawei Technologies Co., Ltd. All rights reserved.
ORF Peer Group Security
BGP Authentication
BGP authentication is classified as MD5 authentication or keychain authentication. Authenticating BGP peer
relationships can prevent rogue BGP peer relationships from being established.
MD5 Authentication Keychain Authentication
• Keychain is a set of key IDs. A key ID uniquely identifies authentication
R1 R2 information, including the authentication password and algorithm.
BGP peer relationship
Page 38 Copyright © 2020 Huawei Technologies Co., Ltd. All rights reserved.
• BGP uses TCP as its transport layer protocol and considers a TCP packet valid only if
the source IP address, destination IP address, source port number, destination port
number, and TCP sequence number in the packet are correct. Most of the preceding
parameters in a TCP packet can be easily obtained by attackers. To protect BGP from
attacks, use MD5 authentication or keychain authentication between BGP peers to
reduce the possibility of attacks.
▫ The MD5 algorithm is easy to configure and generates a single password, which
can only be manually changed.
• Note: BGP MD5 authentication and BGP keychain authentication are mutually
exclusive.
ORF Peer Group Security
BGP GTSM
BGP GTSM can check whether the time to live (TTL) value in the IP packet header is within a preset
range, and drop the packets whose TTL values are not within the preset range. This prevents bogus BGP
messages from attacking the device.
The bogus BGP messages • If BGP GTSM is enabled on R2 and the valid TTL range
have excessively small TTL
values after reaching R2 for messages sent by the IBGP peer is set to [255, 255],
and are therefore dropped. the system checks the TTL values of all BGP messages
Attacker
and drops the bogus messages whose TTL values are
smaller than 255. This prevents the bogus messages
from consuming CPU resources.
Page 39 Copyright © 2020 Huawei Technologies Co., Ltd. All rights reserved.
• As shown in the figure, if BGP GTSM is not enabled, the device finds that the received
numerous bogus BGP messages are destined for itself, and directly sends them to the
control plane for processing. As a result, the control plane has to process a large
number of bogus messages, causing the CPU usage to go excessively high and the
system to be unexpectedly busy.
ORF Peer Group Security
2. Configure keychain authentication for the establishment of a TCP connection with a specified peer or peer group.
Page 40 Copyright © 2020 Huawei Technologies Co., Ltd. All rights reserved.
GTSM configurations are symmetrical. That is, you need to enable GTSM on both ends of BGP peer relationship.
2. (Optional) Set a default action to take on messages that do not match the GTSM policy.
By default, the messages that do not match a GTSM policy can pass filtering.
3. (Optional) Enable the logging function on all boards to record log information when GTSM discards messages.
By default, no log information is recorded on any board when GTSM drops messages.
You can run this command to enable the logging function so that the device can record information about the
messages dropped by GTSM in logs. The recorded logs facilitate fault locating.
Page 41 Copyright © 2020 Huawei Technologies Co., Ltd. All rights reserved.
▫ hops: specifies the number of TTL hops to be checked. The value is an integer
ranging from 1 to 255. The default value is 255. If you specify hops, the valid
range of TTL values in the messages to be checked is [255 – hops + 1, 255].
▫ drop: indicates that the messages that do not match the GTSM policy cannot
pass filtering and are dropped.
▫ pass: indicates that the messages that do not match the GTSM policy can pass
filtering.
10.1.23.0/24
relationship
[R1-bgp] peer 10.1.3.3 as-number 101
IBGP peer
[R1-bgp] peer 10.1.3.3 connect-interface Loopback 0
[R1-bgp] network 10.1.1.1 32
.3
[R2] bgp 101
R3 [R2-bgp] peer 10.1.1.1 as-number 101
[R2-bgp] peer 10.1.1.1 connect-interface Loopback 0
[R2-bgp] peer 10.1.3.3 as-number 101
R1, R2, and R3 all belong to AS 101 and use loopback0 [R2-bgp] peer 10.1.3.3 connect-interface Loopback 0
interfaces to establish full-mesh IBGP connections. GTSM
[R3] bgp 101
needs to be enabled on them to prevent CPU attacks.
[R3-bgp] peer 10.1.1.1 as-number 101
[R3-bgp] peer 10.1.1.1 connect-interface Loopback 0
Device Interface Interface Address
[R3-bgp] peer 10.1.2.2 as-number 101
R1 Loopback0 10.1.1.1/32 [R3-bgp] peer 10.1.2.2 connect-interface Loopback 0
R2 Loopback0 10.1.2.2/32
R3 Loopback0 10.1.3.3/32
Page 42 Copyright © 2020 Huawei Technologies Co., Ltd. All rights reserved.
▫ Assume that static routes are used or OSPF is used to ensure internal network
reachability in AS 101. The configuration details are not provided here.
▫ R1 advertises the route destined for the IP address of its loopback0 interface to
the BGP routing table.
ORF Peer Group Security
10.1.23.0/24
relationship
IBGP peer
[R2-bgp] peer 10.1.1.1 valid-ttl-hops 1
3. Enable GTSM between R2 and R3. As the two routers are
.3 directly connected, the valid TTL range of the messages from
one router to the other is [255, 255]. In this case, the value
R3
of valid-ttl-hops is 1.
[R2-bgp] peer 10.1.3.3 valid-ttl-hops 1
R1, R2, and R3 all belong to AS 101 and use loopback0
interfaces to establish full-mesh IBGP connections. GTSM [R3-bgp] peer 10.1.2.2 valid-ttl-hops 1
needs to be enabled on them to prevent CPU attacks. 4. Enable GTSM between R1 and R3. As the two routers are
connected through R2, the valid TTL range of the messages
Device Interface Interface Address from one end to the other is [254, 255]. In this case, the
R1 Loopback0 10.1.1.1/32 value of valid-ttl-hops is 2.
R2 Loopback0 10.1.2.2/32 [R1-bgp] peer 10.1.3.3 valid-ttl-hops 2
R3 Loopback0 10.1.3.3/32
[R3-bgp] peer 10.1.1.1 valid-ttl-hops 2
Page 43 Copyright © 2020 Huawei Technologies Co., Ltd. All rights reserved.
ORF Peer Group Security
Page 44 Copyright © 2020 Huawei Technologies Co., Ltd. All rights reserved.
Contents
1. BGP Route Control
Page 45 Copyright © 2020 Huawei Technologies Co., Ltd. All rights reserved.
RR
Using RRs can avoid the need for full-mesh IBGP connections and reduce the burden on the network and CPU.
▫ Client
R1
Client Non-client ▫ Non-client
EBGP
Page 46 Copyright © 2020 Huawei Technologies Co., Ltd. All rights reserved.
• RR-related roles:
▫ RR: BGP device that reflects the routes learned from an IBGP peer to other IBGP
peers. An RR is similar to the designated router (DR) on an OSPF network.
▫ Client: IBGP peer whose routes are reflected by the RR to other IBGP peers. In an
AS, clients only need to be directly connected to the RR.
▫ Non-client: IBGP device that is neither an RR nor a client. In an AS, full-mesh
connections still must be established between non-clients and RRs, and between
all non-clients.
▫ Originator: device that originates routes in an AS. The Originator_ID attribute is
used to prevent routing loops in a cluster.
▫ Cluster: a set of RRs and their clients. The Cluster_List attribute is used to prevent
routing loops between clusters.
• When configuring a BGP router as an RR, you also need to specify a client of the RR. A
client does not need to be configured because it is not aware that an RR exists on the
network.
• Rules for an RR to advertise routes:
▫ After learning routes from non-clients, the RR selects and advertises the optimal
route to all its clients.
▫ After learning routes from clients, the RR selects and advertises the optimal route
to all its non-clients and clients (except the originating client).
▫ After learning routes learned from EBGP peers, the RR selects and advertises the
optimal route to all its clients and non-clients.
Common Networking Modes: Backup RR
Networking
⚫ To improve network reliability and prevent a single point of failure (SPOF) from affecting the network, multiple RRs
need to be configured in a cluster.
⚫ Routers on a forwarding path establish IBGP peer relationships with all RRs. Any of the RRs has complete BGP
routes.
• RR1 and RR2 are in the same cluster and configured
AS 101 RR1
3
RR2
with the same cluster ID.
2 IBGP
• Route reflection in single-cluster RR networking (RR1 is
1 used as an example):
IBGP IBGP 1. When client 1 receives an updated route from an EBGP
peer, it advertises this route to RR1 and RR2 through
Cluster
IBGP peer relationships.
Client 1 Client 2
2. After RR1 and RR2 receive this route, they add the local
cluster ID to the top of the cluster list of the route, and
EBGP
then reflect the route to client 2 and to each other.
AS 102
3. After RR1 and RR2 receive the reflected route, they check
R1 the cluster list of the route, finding that the cluster list
IBGP peer relationship contains their local cluster ID. RR1 and RR2 discard this
10.1.1.1/32 BGP Update message route to prevent routing loops.
Page 47 Copyright © 2020 Huawei Technologies Co., Ltd. All rights reserved.
Common Networking Modes: Multi-Cluster
RR Networking (1)
⚫ If multiple clusters exist in an AS, RRs of the clusters establish IBGP peer relationships with each other.
⚫ When RRs reside at the same network layer, RRs of different clusters can establish full-mesh
connections to implement flat RR.
AS 101 • An AS on a backbone network may be divided into
Client 1 Client 2 Client 1 multiple clusters. RRs of the clusters are non-clients of
Cluster 2 each other and establish full-mesh IBGP connections
with each other.
Client 2
Cluster 1 RR
RR • Although each client in a cluster establishes an IBGP
IBGP connection only with the RR in the same cluster, each
RR and client can receive all the routing information.
RR RR • As shown in the figure, four RRs reside in cluster 1,
Cluster 3 Cluster 4
cluster 2, cluster 3, and cluster 4. IBGP connections are
Client
established between the four RRs. Each client in a
Client
cluster establishes an IBGP connection only with the RR
IBGP peer relationship
in the same cluster.
Page 48 Copyright © 2020 Huawei Technologies Co., Ltd. All rights reserved.
Common Networking Modes: Multi-Cluster
RR Networking (2)
⚫ If multiple clusters exist in an AS, RRs of the clusters establish IBGP peer relationships with each other.
⚫ When the RRs reside at different network layers, the RRs at the lower network layer can be configured
as clients to implement hierarchical RR.
reflection
• As shown in the figure, AS 101 is divided into three
Level-1
IBGP IBGP clusters:
Cluster 1 ▫ The four devices in cluster 1 are core routers and work
in master/backup mode to ensure high reliability. Two
reflection
Client 1/ Client 2/
Level-2
Level-2 RR Level-2 RR Level-1 RRs are deployed in cluster 1, and the other
Cluster 2 Cluster 3 two routers function as clients of the RRs.
Client Client cluster 3. The Level-2 RRs are also clients of the Level-
1 RRs. An IBGP connection does not need to be
established between the Level-2 RRs.
IBGP peer relationship
Page 49 Copyright © 2020 Huawei Technologies Co., Ltd. All rights reserved.
• The route advertisement rules for hierarchical RR networking are the same as those for
single-cluster RR networking.
▫ Number of alternate paths: This factor affects load balancing and resource
consumption. More layers reduce the number of links for load balancing but
require fewer router resources.
Single-Cluster Problem
To provide the desired redundancy in an RR-based architecture, it is important to properly
divide an AS into clusters.
• Scenario description:
AS 101 R1
▫ As shown in the figure, AS 101 uses the backup RR
networking. RR1 and RR2 use the same cluster ID, and
R2 R3 provide a redundant link for traffic from R1 to access
10.1.5.5/32.
RR1 RR2
▫ After R4 advertises the route 10.1.5.5/32, the two RRs
Cluster
advertise the route to R1 and to each other. Because RR1
and RR2 have the same cluster ID, the Update messages
R4 Client
exchanged between the RRs are discarded.
Route:
10.1.5.5/32 • An IBGP session failure causes the redundancy failure:
AS 102
▫ Assume that the IBGP session between R3 and R4 fails (for
R5
example, due to incorrect configurations). As R3 ignores
the route 10.1.5.5/32 advertised by R2, no redundant link is
10.1.5.5/32
available for traffic from R1 to access 10.1.5.5/32.
Page 50 Copyright © 2020 Huawei Technologies Co., Ltd. All rights reserved.
Multi-Cluster Design
Multi-cluster design not only provides physical redundancy in response to link failures, but also
provides logical redundancy in response to IBGP session failures between clients and RRs.
R5
10.1.5.5/32
Page 51 Copyright © 2020 Huawei Technologies Co., Ltd. All rights reserved.
Quiz
1. (Single) Which of the following AS_Path value is matched against the ip as-path-filter 1 permit ^(100|200)$ command? ( )
A. AS_Path 100
B. AS_Path 200
2. (TorF) Authenticate BGP peer relationships can prevent unauthorized BGP peer relationships from being established. ( )
A. True
B. False
3. (TorF) In the backup RR networking of BGP, the master and backup RRs discard the routes reflected by each other to prevent
routing loops. ( )
A. True
B. False
Page 52 Copyright © 2020 Huawei Technologies Co., Ltd. All rights reserved.
1. D
2. A
3. A
Summary
⚫ The AS_Path and community filters are dedicated route matching tools of BGP. You can use
them to match BGP routes based on the AS_Path and community attributes, respectively.
After routing policies are applied to the matched routes, BGP route control can be
implemented.
⚫ BGP also supports various advanced features, including ORF to achieve on-demand route
advertisement, peer group to simplify configurations, and BGP security features to prevent
the establishment of rogue peer relationships as well as attacks from bogus BGP messages.
⚫ BGP uses RRs to break the split horizon rule of IBGP, avoid the need for full-mesh IBGP
connections, and reduce the burden on the network and CPU. Common RR networking
modes include backup RR networking and multi-cluster RR networking.
Page 53 Copyright © 2020 Huawei Technologies Co., Ltd. All rights reserved.
Thank You
www.huawei.com
Page 54 Copyright © 2020 Huawei Technologies Co., Ltd. All rights reserved.