Académique Documents
Professionnel Documents
Culture Documents
Upon completion of this course, you will be able to: Understand the principle of BGP Understand the features of Attributes
Page 1
Page 2
Overview Of BGP
BGP is an exterior routing protocol, used to transmit routing
occurrence of loop in design. It provides additional attribute information for the route
Transfer protocol: TCP; port No.: 179
It supports Classless Inter-Domain Routing (CIDR) Route updating: transmit incremental routes only Abundant route filtering and routing policies
Page 3
Autonomous System
What is an Autonomous System (AS)?
The Autonomous System (AS) refers to a set of routers, which are managed 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.
which routing protocol running inside the AS
BGP only
Page 4
AS4
AS5
AS7
AS6
Page 5
RTA
AS100
AS300
RTE
EBGP IBGP
EBGP
RTB
RTD
AS200
RTC
Page 6
neighbors
For the routes obtained from EBGP, the BGP Speaker will
advertise them to its EBGP neighbors depends on the synchronization state of IGP and BGP
Once the connection is established, the BGP Speaker will
Page 7
BGP Synchronization
E0:10.1.1.1/24 RTA AS100 S0 EBGP EBGP
AS300
RTF
RTB S1
IBGP
RTE RTC
AS200
RTD
Page 8
RTB
OSPF discovers route 18.0.0.1/8 Dynamically redistribute the route discovered by IGP (OSPF)
Page 9
AS200
18.0.0.1/8 OSPF
RTB
Page 10
Static Redistribution
AS200
18.0.0.1/8
RTB
Page 11
BGP Messages
There are four types of BGP messages:
Page 12
packet body"
The BGP header is given as follows:
Page 13
Open Message
Open Message consists of the Message header and the
Page 14
Keepalive Message
Keepalive Message only has the header
Page 15
Update Message
An Update Message consists of the header and the following
structure
Unfeasible Routes Length (2byte) Withdrawn Routes (variable length) Path Attribute Length (2byte) Path Attributes (variable length) Network Layer Reachability Information (variable length)
Page 16
Notification Message
A Notification packet consists of the header and the structure below
1 Header error
Exit
Page 17
TCP connection setup TCP connection setup Open-sent Error Correct OPEN packet received Error
Idle
Error
Page 18
sent to notify the peer of the routing information if a route needs to be sent or route change occurs
After stabilization, it is necessary to send the KEEPALIVE
Page 19
Page 20
Page 21
Path Attribute
Well-known mandatory ORIGIN AS-Path Next hop Optional nontransitive Multi-Exit-Disc (MED) ORIGINATOR-ID Cluster-List
Optional transitive
Aggregator Community
HUAWEI TECHNOLOGIES CO., LTD. All rights reserved
Page 22
ORIGIN Attribute
ORIGIN specifies the origin of the routing update. When BGP has
multiple routes, it uses ORIGIN as one factor in determining the preferred 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.
Which one is preferred?
Page 23
AS_PATH Attribute
AS-PATH uses a sequence of AS numbers to describe the inter-AS
D(18.0.0.0/8)
AS200 RTA 30.0.0.1
AS100
D (500 200)
Page 24
AS_PATH Attribute
The Function of AS-PATH
AS can influence its incoming traffic by changing the AS_PATH of its advertising route AS_PATH can be used for loop avoidance
AS300 AS400
D(18.0.0.0/8)
AS200 RTA 30.0.0.1
AS100
D (500 200,200,200)
Page 25
AS200
18.0.0.0/8
IBGP
10.0.0.3
19.0.0.0/8
RTD
RTB
RTA
I can reach 18.0.0.0/8 via the next hop10.0.0.2 I can reach 20.0.0.0/8 via the next hop 10.0.0.3 I 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
RTB
I can reach 18.0.0.0/8 via the next hop 10.0.0.2 I can reach 20.0.0.0/8 via the next hop 10.0.0.3 HUAWEI TECHNOLOGIES CO., LTD.
Page 26
LOCAL_PREF Attribute
LOCAL_PREF is used to communicate a BGP routers degree
same destination, it compares the LOCAL_PREF attribute of the routes. The route with highest LOCAL_PREF is selected.
The LOCAL_PREF attribute affects only traffic leaving the AS.
Page 27
LOCAL_PREF Attribute
AS400 D (18.0.0.0/8) RTF
AS200 RTD
30.0.0.1
20.0.0.1
AS300 RTE
AS100
Dlocal-pref1
Dlocal-pref2
100
200 RTA will select local-pref2 that has higher local preference
All rights reserved Page 28
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.
MED attribute affects only the incoming traffic to the AS. 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.
The MED is passed between internal peers of the receiving AS but
not passed beyond the receiving AS. MED is used only to influence traffic between two directly connected AS.
Page 29
D,metric1 10 RTB
30.0.0.2
20.0.0.2
D,metric2 20
RTC
IBGP
D(18.0.0.0/8) AS200
Page 30
Community Attribute
destination as a member of some community of destinations that share one or more common properties.
The COMMUNITY attribute is a set of four octets values AA:NN. AA is
Page 31
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
HUAWEI TECHNOLOGIES CO., LTD. All rights reserved Page 32
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 ).
Summary
Feature of BGP
Difference with the IGP and EGP Principle of BGP The route attributes of BGP
Page 34
Thank You
www.huawei.com