oda030010 bgp routing protocol issue1_4
Post on 16-Oct-2015
27 Views
Preview:
DESCRIPTION
TRANSCRIPT
-
HUAWEI TECHNOLOGIES CO., LTD. All rights reserved
Internal
www.huawei.com
ODA030010 BGP Routing Protocol
ISSUE 1.4
PDF created with FinePrint pdfFactory Pro trial version www.pdffactory.com
-
Page 1HUAWEI TECHNOLOGIES CO., LTD. All rights reserved
Upon completion of this course, you will be able to:
[Understand the principle of BGP
[Understand the features of Attributes
PDF created with FinePrint pdfFactory Pro trial version www.pdffactory.com
-
Page 2HUAWEI TECHNOLOGIES CO., LTD. All rights reserved
ChapterChapter 1 1 Principle of BGPPrinciple of BGP
ChapterChapter 2 2 BGP Route AttributesBGP Route Attributes
PDF created with FinePrint pdfFactory Pro trial version www.pdffactory.com
-
Page 3HUAWEI TECHNOLOGIES CO., LTD. All rights reserved
Overview Of BGP
l BGP is an exterior routing protocol, used to transmit routing information between ASs
l It is a kind of distance-vector routing protocol and avoids the occurrence of loop in design. It provides additional attribute information for the route
l Transfer protocol: TCP; port No.: 179
l It supports Classless Inter-Domain Routing (CIDR)
l Route updating: transmit incremental routes only
l Abundant route filtering and routing policies
PDF created with FinePrint pdfFactory Pro trial version www.pdffactory.com
-
Page 4HUAWEI TECHNOLOGIES CO., LTD. All rights reserved
Autonomous System
l What is an Autonomous System (AS)?
l which routing protocol running inside the AS
l Which routing protocol running between ASs
The Autonomous System (AS) refers to a set of routers, which aremanaged by the same technical management organization and adopt the unified routing strategy. Each AS has a unique AS number, which is allocated by the management organization authorized by the Internet.
IGP routing protocol such as static route, OSPF , IS-IS etc
BGP only
PDF created with FinePrint pdfFactory Pro trial version www.pdffactory.com
-
Page 5HUAWEI TECHNOLOGIES CO., LTD. All rights reserved
Working Mechanism Of BGP
AS1
AS7
AS6
AS5
AS4
AS3
AS2
PDF created with FinePrint pdfFactory Pro trial version www.pdffactory.com
-
Page 6HUAWEI TECHNOLOGIES CO., LTD. All rights reserved
IBGP Neighbor & EBGP Neighbor
EBGP
RTB
RTC
IBGP
RTA
RTD
RTE
EBGP
AS100
AS200
AS300
PDF created with FinePrint pdfFactory Pro trial version www.pdffactory.com
-
Page 7HUAWEI TECHNOLOGIES CO., LTD. All rights reserved
Route Advertising Principles of BGP
l BGP Speaker only selects the best one for its own use
l BGP Speaker only advertises the routes used by itself to its neighbors
l For the routes obtained from EBGP, the BGP Speaker will advertise them to all its neighbors (including EBGP and IBGP)
l For the routes obtained from IBGP, the BGP Speaker will not advertise them to its IBGP neighbors
l For the routes obtained from IBGP, whether the BGP Speaker will advertise them to its EBGP neighbors depends on the synchronization state of IGP and BGP
l Once the connection is established, the BGP Speaker will advertise all its BGP routes to the new neighbors
PDF created with FinePrint pdfFactory Pro trial version www.pdffactory.com
-
Page 8HUAWEI TECHNOLOGIES CO., LTD. All rights reserved
BGP Synchronization
EBGP EBGP
RTB
RTC
IBGP
RTA
RTD
RTE
RTF
E0:10.1.1.1/24
S0
S1
AS100
AS200
AS300
PDF created with FinePrint pdfFactory Pro trial version www.pdffactory.com
-
Page 9HUAWEI TECHNOLOGIES CO., LTD. All rights reserved
Full Dynamic Redistribution
l OSPF discovers route 18.0.0.1/8
l Dynamically redistribute the route discovered by IGP (OSPF) into the BGP routing table of RTB
18.0.0.1/8
OSPFRTB
AS200
PDF created with FinePrint pdfFactory Pro trial version www.pdffactory.com
-
Page 10HUAWEI TECHNOLOGIES CO., LTD. All rights reserved
Semi Dynamic Redistribution
l OSPF discovers the route 18.0.0.1/8
l Semi-dynamically redistribute the route discovered by IGP (OSPF) into the BGP routing table of RTB
18.0.0.1/8
RTB
AS200
OSPF
PDF created with FinePrint pdfFactory Pro trial version www.pdffactory.com
-
Page 11HUAWEI TECHNOLOGIES CO., LTD. All rights reserved
Static Redistribution
l Manually configure the static route 18.0.0.1/8
l Redistribute the static route manually configured into the BGP routing table of RTB
18.0.0.1/8
AS200
RTB
PDF created with FinePrint pdfFactory Pro trial version www.pdffactory.com
-
Page 12HUAWEI TECHNOLOGIES CO., LTD. All rights reserved
BGP Messages
l There are four types of BGP messages:
[Open: greeting--"hello, let's make friends!"
[Keepalive: I'm alive, don't leave me alone
[Update: fresh news...
[Notification: i won't play with you any more!
PDF created with FinePrint pdfFactory Pro trial version www.pdffactory.com
-
Page 13HUAWEI TECHNOLOGIES CO., LTD. All rights reserved
BGP Message Header
l BGP messages have the same format: "message header + packet body"
l The BGP header is given as follows:
Marker(16 byte)
Length(2 byte) Type(1 byte)
PDF created with FinePrint pdfFactory Pro trial version www.pdffactory.com
-
Page 14HUAWEI TECHNOLOGIES CO., LTD. All rights reserved
Open Message
l Open Message consists of the Message header and the structure below
Optional ParametersLength (1byte)
Hold Time (2byte)
Version(1byte)
My Autonomous System (2byte)
BGP Identifier (4byte)
Optional Parameters
PDF created with FinePrint pdfFactory Pro trial version www.pdffactory.com
-
Page 15HUAWEI TECHNOLOGIES CO., LTD. All rights reserved
Keepalive Message
l Keepalive Message only has the header
Marker(16 byte)
Length(2 byte) Type(1 byte)
PDF created with FinePrint pdfFactory Pro trial version www.pdffactory.com
-
Page 16HUAWEI TECHNOLOGIES CO., LTD. All rights reserved
Update Message
l An Update Message consists of the header and the following structure
Withdrawn Routes (variable length)
Unfeasible Routes Length (2byte)
Path Attribute Length (2byte)
Network Layer Reachability Information (variable length)
Path Attributes (variable length)
PDF created with FinePrint pdfFactory Pro trial version www.pdffactory.com
-
Page 17HUAWEI TECHNOLOGIES CO., LTD. All rights reserved
Notification Message
l A Notification packet consists of the header and the structure below
Data (variable length)
Error Code(1byte)
Error Subcode(1byte)
Header error
1
OPEN Massage
error
2
UPDATE Massage
error
3
Hold time
expiry
4
State Machine
error
5
ExitError Type
6Error Code
PDF created with FinePrint pdfFactory Pro trial version www.pdffactory.com
-
Page 18HUAWEI TECHNOLOGIES CO., LTD. All rights reserved
Finite State Machine of BGP
Active
Open-sent
Open-confirm Established
Idle
Connect
Connect-Retrytimer expiry
TCP connection fails
Connect-Retrytimer expiry
StartOthers
TCP connection fails
Error
Error Error
KeepAlivetimer expiry
KeepAlive packetreceived
1. KeepAlivetimer expiry
2. Update received3. KeepAlive received
Correct OPENpacket received
TCP connection setup
TCP connection setupOthers
PDF created with FinePrint pdfFactory Pro trial version www.pdffactory.com
-
Page 19HUAWEI TECHNOLOGIES CO., LTD. All rights reserved
Application of Messages in BGP
l The Open message is sent when establishing a BGP connection via TCP
l After the connection is established, the UPDATE message is sent to notify the peer of the routing information if a route needs to be sent or route change occurs
l After stabilization, it is necessary to send the KEEPALIVE message periodically to keep the validity of the BGP connection
l When an error is found during the running of local BGP, NOTIFICATION message shall be sent to notify the BGP peer
PDF created with FinePrint pdfFactory Pro trial version www.pdffactory.com
-
Page 20HUAWEI TECHNOLOGIES CO., LTD. All rights reserved
ChapterChapter 1 1 Principle of BGPPrinciple of BGP
ChapterChapter 2 2 BGP Route AttributesBGP Route Attributes
PDF created with FinePrint pdfFactory Pro trial version www.pdffactory.com
-
Page 21HUAWEI TECHNOLOGIES CO., LTD. All rights reserved
BGP Path Attributes
l A Path Attribute is a characteristic of an advertised BGP route.
l Each Path Attribute falls into one of four categories:
[Well-known mandatory
[Well-known discretionary
[Optional transitive
[Optional nontransitive
PDF created with FinePrint pdfFactory Pro trial version www.pdffactory.com
-
Page 22HUAWEI TECHNOLOGIES CO., LTD. All rights reserved
Path AttributeWell-known mandatory
ORIGIN
AS-Path
Next hop
Well-known discretionary
Local-Preference
Atomic-Aggregate
Optional transitive
Aggregator
Community
Optional nontransitive
Multi-Exit-Disc (MED)
ORIGINATOR-ID
Cluster-List
Destination Pref (MCI)
Advertiser (Baynet)
Rcid-Path (Baynet)
MP_Reach_NLRI
MP_Unreach_NLRI
Extended_Communities
PDF created with FinePrint pdfFactory Pro trial version www.pdffactory.com
-
Page 23HUAWEI TECHNOLOGIES CO., LTD. All rights reserved
ORIGIN Attribute
l ORIGIN specifies the origin of the routing update. When BGP has multiple routes, it uses ORIGIN as one factor in determining thepreferred route.
[ IGP NLRI (Network layer Reachability Information) was learned from a protocol internal to the originating AS. BGP routes are given an origin of IGP if they are learned from an IGP routing table via the network statement.
[ EGP NLRI was learned from the Exterior Gateway Protocol.
[ Incomplete NLRI was learned by some other means. Incomplete imply that the information for determining the origin of the route is incomplete. Routes that BGP learns through redistribution carry the incomplete origin attribute.
l Which one is preferred? IGP > EGP > Incomplete
PDF created with FinePrint pdfFactory Pro trial version www.pdffactory.com
-
Page 24HUAWEI TECHNOLOGIES CO., LTD. All rights reserved
AS_PATH Attribute
l AS-PATH uses a sequence of AS numbers to describe the inter-AS path or route to the destination specified by the NLRI.
l AS-PATH describes all AS it has passed through ,beginning with the most recent AS and ending with the originating AS.
D(18.0.0.0/8)AS200
AS300
AS400
AS100 AS500
RTA
RTB
30.0.0.1
30.0.0.2D (400 300 200)
D (500 200)
PDF created with FinePrint pdfFactory Pro trial version www.pdffactory.com
-
Page 25HUAWEI TECHNOLOGIES CO., LTD. All rights reserved
AS_PATH Attribute
l The Function of AS-PATH
[ AS can influence its incoming traffic by changing the AS_PATH ofits advertising route
[ AS_PATH can be used for loop avoidance
D(18.0.0.0/8)AS200
AS300
AS400
AS100 AS500
RTA
RTB
30.0.0.1
30.0.0.2D (400 300 200)
D (500 200,200,200)
D (200 200 200)
PDF created with FinePrint pdfFactory Pro trial version www.pdffactory.com
-
Page 26HUAWEI TECHNOLOGIES CO., LTD. All rights reserved
Next Hop Attribute
18.0.0.0/8
20.0.0.0/8
RTARTC
RTB
RTD19.0.0.0/8
21.0.0.2
21.0.0.1
10.0.0.2
10.0.0.3
10.0.0.1AS100
AS200
IBGPIBGPEBGP
RTBI can reach 18.0.0.0/8 via the next hop 10.0.0.2I can reach 20.0.0.0/8 via the next hop 10.0.0.3
RTAI can reach 18.0.0.0/8 via the next hop10.0.0.2I can reach 20.0.0.0/8 via the next hop 10.0.0.3I can reach 19.0.0.0/8 via the next hop 21.0.0.1 RTC I can reach 19.0.0.0/8 via the next hop 10.0.0.1
I can reach 20.0.0.0/8 via the next hop 10.0.0.3
PDF created with FinePrint pdfFactory Pro trial version www.pdffactory.com
-
Page 27HUAWEI TECHNOLOGIES CO., LTD. All rights reserved
LOCAL_PREF Attribute
l LOCAL_PREF is used to communicate a BGP routers degree of preference for an advertised route.
l LOCAL_PREF is only in updates between internal BGP peers and it is not passed to other AS.
l If an internal BGP speaker receives multiple routes to the same destination, it compares the LOCAL_PREF attribute of the routes. The route with highest LOCAL_PREF is selected.
l The LOCAL_PREF attribute affects only traffic leaving the AS.
PDF created with FinePrint pdfFactory Pro trial version www.pdffactory.com
-
Page 28HUAWEI TECHNOLOGIES CO., LTD. All rights reserved
LOCAL_PREF Attribute
l Dlocal-pref1 100
l Dlocal-pref2 200 RTA will select local-pref2 that has higher local preference
AS400
AS100
AS300AS200
RTA
RTB RTC
RTD RTE
RTF
D (18.0.0.0/8)
30.0.0.1
30.0.0.2
20.0.0.1
20.0.0.2
Dlocal-pref1 100 Dlocal-pref2 200
PDF created with FinePrint pdfFactory Pro trial version www.pdffactory.com
-
Page 29HUAWEI TECHNOLOGIES CO., LTD. All rights reserved
MULTI-EXIT-DISC (MED) Attribute
l MED is carried in EBGP updates and allows an AS to inform another AS of its preferred ingress points. It is meant only for a single AS to demonstrate a degree of preference when it has multiple ingress points.
l MED attribute affects only the incoming traffic to the AS.
l If all else is equal , an AS receiving multiple routes to the same destination compare the MED of the routes. The lowest MED value is prefered. MEDs are not compared if two routes to the same destination are received from two different AS.
l The MED is passed between internal peers of the receiving AS butnot passed beyond the receiving AS. MED is used only to influence traffic between two directly connected AS.
PDF created with FinePrint pdfFactory Pro trial version www.pdffactory.com
-
Page 30HUAWEI TECHNOLOGIES CO., LTD. All rights reserved
MULTI-EXIT-DISC (MED) Attribute
D(18.0.0.0/8)
RTA
RTB RTC
30.0.0.1
30.0.0.2
20.0.0.1
20.0.0.2
AS100
AS200
D,metric1 10D,metric2 20
D,metric1 10 D,metric2 20
RTA will select the lower metric
IBGP
PDF created with FinePrint pdfFactory Pro trial version www.pdffactory.com
-
Page 31HUAWEI TECHNOLOGIES CO., LTD. All rights reserved
Community Attribute
l Community is designed to simplify policy enforcement. It identifies a destination as a member of some community of destinations that share one or more common properties.
l The COMMUNITY attribute is a set of four octets values AA:NN. AA is AS number. NN is an administratively defined identifier.
PDF created with FinePrint pdfFactory Pro trial version www.pdffactory.com
-
Page 32HUAWEI TECHNOLOGIES CO., LTD. All rights reserved
Well-known Community
[NO_EXPORT
Routes received carrying this value cannot be advertised to EBGP peers and outside of the confederation
[NO_ADVERTISE
Routes received carrying this value cannot be advertised at all to either EBGP or IBGP peers.
[LOCAL_AS
Routes received carrying this value cannot be advertised to EBGP peers including peers in other AS within a confederation.
[INTERNET
All routes belong to this community by default. Received routes belonging to this community are advertised freely
PDF created with FinePrint pdfFactory Pro trial version www.pdffactory.com
-
Page 33HUAWEI TECHNOLOGIES CO., LTD. All rights reserved
BGP Route Selection Procedure
l In general, the procedure of local BGP route selection is:
[1. If the next hop of this route is unreachable, this route is not selected.
[2. Select the route with a higher local preference.
[3. Select the originated route by the local router (same local precedence).
[4. Select the route with shortest AS path.
[5. Select the route with lowest origin code (IGP lower than EGP, EGP lower than Incomplete ).
[6. Select the route with smallest MED .
[7.Performing load sharing on multiple routes according to the configured number of routes (in case load sharing is configured and there are multiple external routes to the same AS)
[8. Select the route with smallest Router ID .
PDF created with FinePrint pdfFactory Pro trial version www.pdffactory.com
-
Page 34HUAWEI TECHNOLOGIES CO., LTD. All rights reserved
Summary
l Feature of BGP
l Difference with the IGP and EGP
l Principle of BGP
l The route attributes of BGP
Microsoft Excel Worksheet
PDF created with FinePrint pdfFactory Pro trial version www.pdffactory.com
-
www.huawei.com
Thank You
PDF created with FinePrint pdfFactory Pro trial version www.pdffactory.com
top related