Beruflich Dokumente
Kultur Dokumente
The border gateway protocol (BGP) has been developed from BGP1 (initial version in 1989) to BGP4. As the Internet expands, BGP functions are increased and strengthened from the basic routing among autonomous systems to community, reflection, confederation, and multi-protocol extension. The current number of BGP routes on the Internet has exceeded 100,000 entries. Such a wide deployment proves that BGP has a powerful support for large and complicated networks.
Page 1
Upon completion this course, you will be able to: [ Understand the advanced applications of BGP [ Optimize the path selection and convergence time of BGP [ Understand the network planning of BGP
Page 2
Chapter 1 BGP Theories Chapter 2 BGP Network Planning Chapter 3 BGP Performance Optimization
Page 3
Page 4
BGP Principle
BGP Overview
l BGP is an external routing protocol for transmission of routing
protocols. [ Reliable route update mechanism [ Rich metric measurement methods [ Free from loops by protocol design
l Carrying attributes for routes l Supporting classless inter-domain routing (CIDR) l Rich route filter and routing policies
HUAWEI TECHNOLOGIES CO., LTD. All rights reserved Page 5
BGP Principle
BGP Neighbor Relation
AS 100
RTA EBGP
AS 300
RTE
AS 200
IBGP RTB RTC RTD
EBGP
Page 6
BGP Principle
BGP Route Notification Principles
l When there are several paths, BGP Speaker selects only the optimal one. l BGP Speaker notifies only the routes used by itself to neighbor entities. l Once the connection is established, BGP Speaker notifies its all BGP routes
neighbor entities.
l Whether BGP Speaker notifies the routes obtained from IBGP to its EBGP
Page 8
BGP
!"#
Page 9
Page 10
BGP skips a route if its next hop is unreachable. BGP firstly selects the route of highest Local-Preference. BGP selects routes originated by local routers (which have a same priority). BGP evaluates the AS path length and selects firstly the shortest path. BGP compares the attributes of Origin and selects the path of the lowest attribute of Origin. The Origin attribute of IGP is lower than that of EGP, and that of EGP lower than Incomplete. BGP selects the route of smaller MED. BGP selects EBGP prior to than IBGP routes. BGP firstly selects the path with shortest IGP metric to the next BGP hop. BGP compares the Originator_ID (Router ID if Originator_ID is unavailable) and selects the path of smaller Originator_ID. BGP compares the peer IP address and selects the path with smallest value of IP address.
l l l l
Page 11
Chapter 1 BGP Theories Chapter 2 BGP Network Planning Chapter 3 BGP Performance Optimization
Page 12
Page 13
Questions
l When is BGP needed? l Is BGP suitable for the current network? l What are BGP's advantages and disadvantages?
Page 14
Page 15
destination router.
l If the core IGP has several paths to the destination router, BGP
selects the one with the smallest IGP metric and keeps others in BGP route table in form of copies.
l If the core IGP has several equivalent paths to a destination
router, these paths are used as entries and added to the routing table for load sharing.
Page 16
l IBGP path selection depends on the IGP metric. l IBGP path convergence time depends on the IGP working mechanism.
HUAWEI TECHNOLOGIES CO., LTD. All rights reserved Page 17
Page 18
RT3 10.1.3.1
RT5 10.1.5.1
AS65104
Page 19
l Because physical topology and link bandwidth are invisible to BGP path
and AS-PATH list. (Before changing default BGP attributes, you must completely understand their meanings to avoid side effects.)
Page 20
takes place one hop after another, till all BGPs in all affected BGP autonomous systems announce that the all routers are updated.
l The IGP that is unable to respond quickly to network changes
Page 21
AS65102 RT6
192.168.4.0/24
RT11 AS65104
HUAWEI TECHNOLOGIES CO., LTD.
192.168.4.0/24
Page 22
RT1 RT4 AS65101 RT3 RT2 AS65100 RT10 RT8 RT5 RT7 RT9 AS65103
RT11 AS65104
HUAWEI TECHNOLOGIES CO., LTD. All rights reserved Page 23
RT1 RT4 AS65101 RT3 RT2 AS65100 RT10 RT8 RT5 RT7 RT9 AS65103
RT11 AS65104
HUAWEI TECHNOLOGIES CO., LTD. All rights reserved Page 24
Page 25
Page 26
Disadvantages
Several connections are terminated on a same device. Several static routes are needed. Only link failure can be avoided. Device failure cannot be avoided.
AS65101
AS65102
Page 27
AS65101
Disadvantages
Several connections are terminated on a same device. Only link failure can be avoided. Device failure cannot be avoided.
AS65102
Page 28
Advantages
Private AS can be used. Outgoing traffic can be better controlled for load balance by link capacity.
AS65101
Disadvantages
Core router must run IBGP session and core IGP session.
AS65102
Page 29
AS65101
AS65103
AS65102
Page 30
AS65101
AS65103
AS65102
Page 31
Page 32
[ When the upstream system provides two link, the address space can be reasonably designed.
l Multi-homing to two different upstream autonomous system
[ Monitor link and occupancy [ Achieve load balance by adding AS-PATH attribute length (an AS number added in one time)
Page 33
[ Achieve load balance by requesting some available routes that are completely reachable
l If load balance still cannot be achieved, complete Internet
routes are requested and incoming filtering policies are implemented to generate the partial routing table of the router itself.
Page 34
AS65101
AS65102
Loopback
Loopback
equivalent routes to the peer loopback addresses are iterated for load balance.
l Because the default TTL of EBGP is 1, both sides need change
AS65101
AS65102
l Every link in the autonomous system sets up the EBGP session. l Because BGP supports only one equivalent path by default, both
sides need set the number of maximum equivalent paths by the command maximum load-balancing .
HUAWEI TECHNOLOGIES CO., LTD. All rights reserved Page 36
Page 37
Page 38
or non-clients. When the notification is made to IBGP peer, these rules depend on where these routes are learned from.
l If the reflector learns the routes from EBGP peer, it notifies to all its clients
and non-clients.
l If a route reaches the reflector through a non-client IBGP peer, the
Reflector Cluster
l Several reflectors serve one or several clients to provide redundancy. l A 4-byte CLUSTER_ID identifies a cluster. l The reflector receiving the information will ignore the route notification
Reflector RT3 Client RT1 Cluster 10.1.1.1 Client RT2 Reflector RT4
HUAWEI TECHNOLOGIES CO., LTD.
PDF created with FinePrint pdfFactory Pro trial version www.pdffactory.com
Reflector RT5
Reflector RT6
Page 40
introduced: [ Originator_ID " Originator_ID is created by the first reflector and will not be changed by subsequent reflectors. " It is a 32-bit value, and should be received from only IBGP. " It is the Router ID of: # The BGP announcer of local AS originated routes. # The border router of a same AS if the route is learned from EBGP. [ Cluster_List " Cluster_List records all Cluster_ID passed by and puts the latest Cluster_ID on the top of the Cluster_List. " The reflector identifies loops by Cluster_List.
HUAWEI TECHNOLOGIES CO., LTD. All rights reserved Page 41
Layer 2 Reflector
Layer 1 Reflector/Client
Client
Page 42
during convergence.
l Set proper intra- and inter-cluster IGP metrics to prevent route
redundancy.
l Modify the path carefully if putting the reflector to the forwarding path. l Use peer group to reduce convergence time if there are reflectors.
Page 43
Page 44
AS-PATH Special Treatment Confederation Design Principles Comparison Between Confederation and Reflector
Page 45
Confederation Principles
l Confederation Concepts
[ A large AS is divided into several small ASs for the IBGP full mesh.
AS 65100
AS 65200 AS 200
RT1
RT2
RT4
RT4
AS 100
RT2 RT1 AS 65000
HUAWEI TECHNOLOGIES CO., LTD.
AS 65300
RT6 RT3
Page 48
oscillation. AS 65100
10 MED:10 10 15
RT3
20
RT5
11
AS 200
10 MED:5
RT4 AS 65200
MED:6 10
RT6
AS 103 RT3
HUAWEI TECHNOLOGIES CO., LTD. All rights reserved Page 49
Path 1 2 3
MED 10 5 6
IGP Metric 15 20 11
Comparison
Both support multilevel to further enhance the expandability. Multilevel route reflection structure is supported. Confederation allows route reflection used in member ASs. Both provide control of route selection policies, but confederation has more flexibility. The transfer of route reflection is of low complexity, because the overall network configuration seldom changes. However, transfer from IBGP to confederation needs great changes on configuration and network architecture. All routers in confederation must support confederation configuration capability, because all routers need understand the AS-PATH attribute of the confederation. In the architecture of route reflection, the reflector need support only route reflection capability. In new design of cluster division, however, the client is also required to understand the reflector attributes. Route reflection within AS needs a stand-alone IGP, while confederation supports a stand-alone or separated IGP, which may be the biggest advantage of confederation over route reflection. If the IGP meets its limit of expandability, or it is too large to process the management tasks, confederation can be used to reduce the size of IGP routing table. More experiences are drawn from route reflection because more ISPs have deployed route reflection rather than confederation. In face, AS combination is irrelevant with IBGP expandability. It is mentioned here because it is one of confederation advantages. An AS can be combined with an existing confederation by taking AS as a sub-AS of confederation.
Page 51
Page 52
Page 53
community attribute. Several communities can be applied to a route. Each community is of 4-byte long. There are two types of community attribute: [ Well-known communities " NO_EXPORT " LOCAL_AS " NO_ADVERTISE [ Private communities " As:number
Page 54
Example:
Route Type
Cross-over route Peer route User route
Community attribute ID
[ISP ASN]:1000 [ISP ASN]:2000 [ISP ASN]:3000
Page 55
Example:
Local Preference Attribute
60 80 100 120 140
Community attribute ID
[ISP ASN]:60 [ISP ASN]:80 [ISP ASN]:100 [ISP ASN]:120 [ISP ASN]:140
Page 56
[ Level 1 differentiates all routes of local AS. [ Level 2 allows the lower-level AS to set AS-PATH attributes accordingly or suppresses route notifications completely.
Page 57
Chapter 1 BGP Theories Chapter 2 BGP Network Planning Chapter 3 BGP Performance Optimization
Page 58
Page 59
Page 60
if it is faulty.
l It is globally enabled and, by default, activated. l Advantages:
[ When the upstream EBGP peer has several EBGP sessions, EBGP port sensitivity is very useful.
l Disadvantages:
[ Owing to jitter links, BGP session is hard to enter convergence status. [ It is unworkable in case of EBGP multi-hop. The peer address must be the same as its physical address.
HUAWEI TECHNOLOGIES CO., LTD. All rights reserved Page 61
AS 100
AS 300
RTA
RTE
RTD
AS 200
RTB
HUAWEI TECHNOLOGIES CO., LTD.
RTC
All rights reserved Page 62
IGP that is should not be used as a cross-over router. This means the restarted router must be the leaf node of the shortest path tree. Only direct traffic to the router should be sent to this router. [ IS-IS Overload Bit [ OSPF Maximum Metric
Page 63
Being an LSP value, the overload bit is firstly used as a signal of notification in case of router fault. It ensures that this router should not be included in the network topology as one with cross-over capability.
l Routers with overload bit are still allowed for setup of BGP
sessions and BGP re-convergence. However, they cannot be used as cross-over routers.
l After convergence of BGP sessions, the router sends an LSP
Page 64
as a cross-over path.
l Routers with metric are still allowed for setup of BGP sessions
Page 65
switchover
l Ensuring no message loss when new board re-collects route
Page 66
Page 67
[ Route jitter attenuation [ BGP route Keep-All-Routes and Route Refresh [ Loop detection at transmission side [ Outgoing route filtering (ORF)
Page 68
Page 69
BGP Keep-All-Routes
BGP Keep-All-Routes
l When BGP policies are changed, the BGP sessions need be
reset to make the new policies effective. Resetting BGP sessions will cause route disturbance and route jitter. Resetting a large number of BGP peers may even trigger route jitter attenuation.
l Save the BGP route update information from all peers (groups)
since the setup of BGP connection, even if the routes do not meet the entry policies requirements.
l Trigger update of route information by proper inbound and
outbound policies.
Page 70
Route Refresh
Route Refresh
l Route refresh is the negotiation ability of BGP at the initial
session stage.
l It allows BGP routers to request remote peers to resend the
Page 71
[ ORF is a BGP feature that reduces the number of BGP updates sent between peer routes to the minimum with the routes transmitting and receiving capability of BGP. [ Local routers initially send inbound routing policies to remote peer routers, which use them as outbound policies.
l ORF Advantages:
[ Reducing the number of BGP updates sent between peer routes to the minimum. [ Sparing bandwidth and speeding convergence
HUAWEI TECHNOLOGIES CO., LTD. All rights reserved Page 73
Page 74
Policy Control
Policy Control Methods
l ip prefix-list l as-path-list l community-list l route-policy l filter-policy
Page 75
Policy Control
Pseudo-AS Number
l What is pseudo-AS number?
[ When receiving/sending AS-PATH from/to the neighbor of local AS, BGP places pseudo-AS number before the real AS number.
l When is pseudo-AS number needed?
Page 76
Policy Control
Advantages and Disadvantages of Pseudo-AS Number
l Advantages of Pseudo-AS Number:
[ Preventing network destruction caused by AS number change. [ Providing continuous communication for AS during AS transfer.
l Disadvantages of Pseudo-AS Number:
Page 77
Summary
last
l Affecting BGP performance most
seriously
l Multi-homing and load balance
Page 78
Thank You
www.huawei.com