bgp routing protocol
Post on 03-Apr-2018
251 Views
Preview:
TRANSCRIPT
-
7/29/2019 BGP Routing Protocol
1/31
ISSUE
Fixed Network Curriculum
Development Section
ODA000011 BGP Routing
Protocol
1.0
-
7/29/2019 BGP Routing Protocol
2/31
Objectives
Master principle of BGP protocol
Upon completion of this course, you will be able to:
-
7/29/2019 BGP Routing Protocol
3/31
Course Contents
Chapter 1 Overview of BGP
Chapter 2 BGP route attributes and its
applications
-
7/29/2019 BGP Routing Protocol
4/31
Overview of BGP
BGP is an external routing protocol, used to transmit routing
information between ASs
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
Transfer protocol: TCP; port No.: 179
It supports Classless Inter-Domain Routing (CIDR)
Route updating: transmit incremental routes only
Abundant route filtering and routing strategies
-
7/29/2019 BGP Routing Protocol
5/31
Autonomous System
What is an Autonomous System (AS)?
Why need AS?
The routing protocol inside the AS
The routing protocol between ASs -- BGP
-
7/29/2019 BGP Routing Protocol
6/31
Working Mechanism of BGP
AS1
AS7
AS6
AS5
AS4
AS3
AS2
-
7/29/2019 BGP Routing Protocol
7/31
Two Kinds of Neighbors of BGP--IBGP & EBGP
EBGPEBGP
RTB
RTC
IBGP
RTA
RTD
RTE
-
7/29/2019 BGP Routing Protocol
8/31
Route Advertising Principles of BGP
The BGP Speaker only selects the best one for its own use
The BGP Speaker only advertises the routes used by itself to
its neighbors
For the routes obtained from EBGP, the BGP Speaker will
advertise them to all its neighbors (including EBGP and IBGP)
For the routes obtained from IBGP, the BGP Speaker will not
advertise them to its IBGP neighbors
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
Once the connection is established, the BGP Speaker will
advertise all its BGP routes to the new neighbors
-
7/29/2019 BGP Routing Protocol
9/31
BGP Synchronization
EBGP EBGP
RTB
RTC
IBGP
RTA
RTD
RTE
RTF
S0:1.1.1.2/24
E0:10.1.1.1/24
S0:1.1.1.1/24
S1:2.1.1.2/24 S0:2.1.1.1/24
AS100
AS200
AS300
-
7/29/2019 BGP Routing Protocol
10/31
One Way to Become the BGP Route -- Full
Dynamic Redistribution
OSPF discovers route 18.0.0.1/8
Dynamically redistribute the route discovered by IGP (OSPF)
into the BGP routing table of RTB
18.0.0.1/8
OSPF
RTB
AS200
-
7/29/2019 BGP Routing Protocol
11/31
The Second Way to Become the BGP Route:
Semi Dynamic Redistribution
OSPF discovers the route 18.0.0.1/8
Semi-dynamically redistribute the route discovered by IGP
(OSPF) into the BGP routing table of RTB
18.0.0.1/8
RTB
AS200
OSPF
-
7/29/2019 BGP Routing Protocol
12/31
The Third Way to Become the BGP Route:
Static Redistribution
Manually configure the static route 18.0.0.1/8
Redistribute the static route manually configured into the BGP
routing table of RTB
18.0.0.1/8
AS200
RTB
-
7/29/2019 BGP Routing Protocol
13/31
BGP Messages
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!
-
7/29/2019 BGP Routing Protocol
14/31
BGP Message Header
BGP messages have the same format: "message header +
packet body"
The BGP header is given as follows:
Marker(16 byte)
Length(2 byte) Type(1 byte)
-
7/29/2019 BGP Routing Protocol
15/31
Open Message
Open Message consists of the Message header and the
structure below
Optional Paramenters
Length
Hold Time
VisionMy Autonomous System
BGP Identifier
Optional Paramenters
-
7/29/2019 BGP Routing Protocol
16/31
Keepalive Message
Keepalive Message has the header only
Marker(16 byte)
Length(2 byte) Type(1 byte)
-
7/29/2019 BGP Routing Protocol
17/31
Update Message
An Update Message consists of the header and the following
structure
Withdrawn RoutesUnfeasible Routes Length
Path Attribute Length
Network Layer Reachability Information
Path Attribute
-
7/29/2019 BGP Routing Protocol
18/31
Notification Message
A Notification packet consists of the header and the structure
below
Data
Error Code Error Subcode
Error
Code
1 2 3 4 5 6
Error
Type
Header
error
OPEN
Massage
error
UPDATE
Massage
error
Hold
time
expiry
State
Machine
error
Exit
-
7/29/2019 BGP Routing Protocol
19/31
Finite State Machine of BGP
Active
Open-sent
Open-confirm Established
Idle
Connect
Connect-Retry
timer expiry
TCP connection fails
Connect-Retrytimer expiry
Start
Others
TCP connection fails
Error
Error Error
KeepAlive
timer expiry
KeepAlive packet
received
1. KeepAlive
timer expiry
2. Update received
3. KeepAlive received
Correct OPEN
packet received
TCP connection setup
TCP connection setupOthers
-
7/29/2019 BGP Routing Protocol
20/31
Application of Messages in BGP
The Open message is sent when establishing a BGP
connection via TCP
After the connection is established, the UPDATE message is
sent to notify the peer of the routing information if a routeneeds to be sent or route change occurs
After stabilization, it is necessary to send the KEEPALIVE
message periodically to keep the validity of the BGP
connection
When an error is found during the running of local BGP,
NOTIFICATION message shall be sent to notify the BGP peer
-
7/29/2019 BGP Routing Protocol
21/31
Course Contents
Chapter 1 Overview of BGP
Chapter 2 BGP route attributes and its
applications
-
7/29/2019 BGP Routing Protocol
22/31
BGP Route Attributes
Describe the features of a route
Transitional and non-transitional
Mandatory and optional
Easy to expand
Up to now, 16 kinds of attributes are available
Focus of BGP Protocol
-
7/29/2019 BGP Routing Protocol
23/31
Common BGP Route Attributes
1.Origin
2.AS-Path
3.Next hop
4.MED5.Local-Preference
6.Atomic-Aggregate
7.Aggregator
8.Community
9.Originator-ID
10.Cluster-List
11.Destination Pref (MCI)
12.Advertiser (Baynet)13.Rcid-Path (Baynet)
14.MP_Reach_NLRI
15.MP_Unreach_NLRI
16.Extended_Communities
-
7/29/2019 BGP Routing Protocol
24/31
Origin Attribute
In a specific implementations, the Origin of one route is
determined as:
If a route is redistributed into the BGP routing table with the
specifically, the origin attribute shall be IGP
If a route is obtained via EGP, the origin attribute shall be EGP
Otherwise, the Origin attribute should be Incomplete
-
7/29/2019 BGP Routing Protocol
25/31
AS-Path Attribute
D(18.0.0.0/8)
AS200AS300
AS400
AS100AS500
RTA
RTB
30.0.0.1
30.0.0.2D,dl 400 300 200
D,d2 500 200
D,d1 400 300 200
>D,d2 500 200
-
7/29/2019 BGP Routing Protocol
26/31
Next Hop Attribute
18.0.0.0/8
20.0.0.0/8
RTA
RTC
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.1
AS100
AS200
IBGP
IBGPEBGP
RTBI 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
RTA
I 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.3
I can reach 19.0.0.0/8 via the next hop 21.0.0.1RTC
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
-
7/29/2019 BGP Routing Protocol
27/31
Local Precedence Attribute
AS400
AS100
AS300AS200
RTA
RTB RTC
RTDRTE
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
Dlocal-pref1 100>Dlocal-pref2 200 RTA will select local-pref2 that hashigher local preference
-
7/29/2019 BGP Routing Protocol
28/31
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 10
D,metric2 20
D,metric1 10 D,metric2 20
RTA will select the lower metric
IBGP
-
7/29/2019 BGP Routing Protocol
29/31
Community Attribute
A community is a group of routes that have the samedestination.A community is not limited to a network or an AS
only. It has no physical boundary.Accepted communities:
no-export
Do not notify the BGP neighbors outside the alliance/AS
no-advertise
Do not notify any BGP neighbors
local-AS Do notify the EBGP neighbors
Internet
Notify all other routers
-
7/29/2019 BGP Routing Protocol
30/31
BGP Route Selection Procedure
In general, the procedure of local BGP route selection is:
1. If the next hop of this route is unreachable, then neglect this
route.
2. Select the route with a higherlocal preference.
3. Select the originated route by the local router (same local
precedence).
4. Select the route whose AS path is shortest.
5. Select the route whose origin type is IGP, EGP, andIncomplete in turn.
6. Select the route whose MED is smallest.
7. Select the route whose Router ID is smallest.
-
7/29/2019 BGP Routing Protocol
31/31
top related