Introduction to BGP - PowerPoint PPT Presentation

1 / 51
About This Presentation
Title:

Introduction to BGP

Description:

Distance Vector (Bellman-Ford) Decentralized. Have info about cost to direct neighbors, and distance of neighbors to destinations ... – PowerPoint PPT presentation

Number of Views:107
Avg rating:3.0/5.0
Slides: 52
Provided by: mnil
Category:
Tags: bgp | com | ford | introduction

less

Transcript and Presenter's Notes

Title: Introduction to BGP


1
Introduction to BGP
  • An Inter-domain Routing Protocol
  • ECE697A Sept. 2002
  • Prof. Lixin Gao
  • Presenter Teng Fei

2
Outline
  • Introduction
  • BGP in general
  • BGP attributes
  • Scalability of BGP
  • Conclusion

3
Simple Routing
4
Basic Functions of Routers
  • Choose the route
  • from source to destination
  • Forward packets (packet switching)
  • from incoming interface to outgoing interface

5
Routing Protocols
  • Link State Protocols (Dijkstra)
  • Global, Centralized
  • Obtain complete network info by exchanging
    immediate link/cost (link state) with other nodes
  • Distance Vector (Bellman-Ford)
  • Decentralized
  • Have info about cost to direct neighbors, and
    distance of neighbors to destinations
  • Others

6
Hierarchical Routing
  • Why?
  • Scalability
  • Administrative Autonomy
  • Solution
  • Autonomous Systems (ASs)
  • identified by unique AS numbers

7
Routing Protocols
8
BGP-Border Gateway Protocol
  • Inter-domain routing (EGP)
  • Distance Vector (Path Vector)
  • Build on the top of TCP (port 179)
  • Policy based
  • Defined in RFC 1771

9
How Does BGP Work?
  • Between Two BGP Routers
  • BGP peers/neighbors
  • form one TCP connection
  • BGP session
  • BGP Routing information are exchanged
  • prefix/AS path/etc.

10
eBGP and iBGP
  • eBGP
  • BGP running between two different ASs
  • iBGP
  • BGP running within the same AS
  • An AS has multiple BGP speakers and provides
    transit service
  • Distribute routing info among BGP routers
  • minor but important difference with eBGP

11
Complete BGP illustration
eBGP
AS100
AS300
RtA
RtD
iBGP
RtB
RtC
AS200
12
BGP and loopback Interface
  • Loopback Interface
  • Logical rather than physical
  • IGP must be configured to reach the loopback IF
  • Used in iBGP, not eBGP
  • Why?
  • eBGP neighbors are usually directly connected,
    not true for iBGP

13
Example of iBGP session
AS300
AS100
RtD
RtA
IGP
Loopback IF 150.212.1.1
RtB
RtC
134.18.50.22
AS200
14
Benefit of using loopback If
  • More robust
  • iBGP session still holds in the face of physical
    Interface failure
  • Less BGP reset
  • Less traffic

15
BGP Messages
  • Open
  • Update
  • Notification
  • Keepalive
  • TCP connection always established throughout the
    BGP session

16
Open Messages
  • The first message sent after TCP established
  • Each peer identify itself to each other
  • Negotiate protocol version/parameters
  • Security (optional)

17
Open Message Format
Version (1 octet)
My Autonomous System (2 octet)
Hold Time (2 octet)
BGP identifier (4 octet)
Optional Parameter Length (1 octet)
Optional parameters (variable length)
18
Update Message
  • Primary message used in a BGP
  • advertises(announce) a prefix to BGP
    neighbors/withdraw a previously advertised
    message
  • Encourage multiple prefixes in a single Update

19
Notification Message
  • Used when error(s) happen(s)
  • TCP will be closed immediately after notification
    is sent
  • Indicates the remote system why BGP was
    terminated

20
Keepalive Message
  • Confirm the connection is still active
  • rate depend on the hold timer negotiated by open
    message and update message frequency
  • A common header with no other data

21
BGP Routing Tables
  • Status codes s suppressed, d damped, h history,
    valid, gt best, i - internal,
  • S Stale
  • Origin codes i - IGP, e - EGP, ? - incomplete
  • Network Next Hop Metric
    LocPrf Weight Path
  • 3.0.0.0 12.123.1.234
    0 7018 80 i
  • 12.123.45.252
    0 7018 80 i
  • 12.123.199.239
    0 7018 80 i
  • 12.123.145.124
    0 7018 80 i
  • gt 12.123.1.236
    0 7018 80 i
  • 12.123.133.124
    0 7018 80 i
  • 4.0.0.0 12.123.45.252
    0 7018 1 i
  • 12.123.199.239
    0 7018 1 i
  • 12.123.9.241
    0 7018 1 i
  • 12.123.13.241
    0 7018 1 i
  • gt 12.123.5.240
    0 7018 1 i
  • 12.123.142.124
    0 7018 1 i

22
BGP attributes
  • AS-path attribute
  • Origin attribute
  • BGP Nexthop attribute
  • Weight Attribute
  • Local preference attribute
  • Metric attribute
  • Community attribute

23
AS-Path Attribute
  • A list of AS numbers that a route has traversed
    in order to reach a destination
  • Whenever a route update pass through a new AS,
    the AS number is prepended
  • AS numbers are listed in order
  • If the AS number is already in the update, the
    route is dropped.

24
AS-PATH Attribute Example
170.10.0.0
AS200
AS100
RtD
RtA
RtC
RtA advertise 170.10.0.0 to RtC, AS-PATH
100 RtB advertise 170.10.0.0 to RtC, AS-PATH
300, 100 RtC advertise 170.10.0.0 to
RtD, AS-PATH 300, 100
RtB
AS300
25
Origin Attribute
  • Mandatory attribute
  • Defines the origin of the path information
  • three typical values
  • i IGP, interior to the originating AS
  • e EGP, learnt via exterior gateway protocol
  • ? incomplete, unknown or via others

26
Origin Attribute Example
ip route 190.10.0.0 255.255.0.0 null 0
RtA
RtB
190.10.50.1
150.10.30.1
175.10.40.2
170.10.20.1
AS100
iBGP
170.10.20.2
RtE
RtA -gt 170.10.0.0 300 i RtA -gt 190.10.50.0
i RtE -gt 150.10.0.0 100 i RtE -gt 190.10.0.0 100
?
AS300
170.10.0.0
27
Nexthop Attribute
  • The next hop IP address that is to use to reach
    destination
  • For eBGP, always the directly connected
    neighbors interface
  • For iBGP, the nexthop advertised by eBGP should
    be carried through into iBGP

28
Nexthop Attribute Example
RtA
RtB
150.10. 0.0
190.10.50.1
150.10.30.1
175.10.40.2
170.10.20.1
iBGP
AS100
170.10.20.2
RtC
RtC advertise 170.10.0.0 to RtA, Nexthop
170.10.20.2 RtA advertise 170.10.0.0 to
RtB, Nexthop 170.10.20.2
AS300
170.10.0.0
29
Synchronizaton
  • In a transit AS, BGP should not advertise a route
    before all routers in the AS learned about the
    route via IGP
  • BGP should wait until all the routes are
    propagated

30
Synchronization Example
RtA
RtB
150.10. 0.0
190.10.50.1
150.10.30.1
175.10.40.2
170.10.20.1
iBGP
AS100
170.10.20.2
RtC
RtD
AS300
AS400
170.10.0.0
31
Weight Attribute
  • Cisco implementation
  • Assigned locally to indicate a router to choose
    best exit path
  • Does not propagate through router updates
  • Higher weight is preferred
  • Default is 0

32
Weight Attribute Example
175.10.0.0
190.10.0.0
AS4
170.10.0.0
RtA
RtB
AS100
AS200
175.10.0.0
175.10.0.0
W200
W100
RtC
RtA will be chosen
AS300
33
Local Preference Attribute
  • Indicate the AS about which exit is preferred
  • Exchanged among routers in the same AS through
    updates
  • Higher value is preferred
  • Default value is 100

34
Local Preference Example
175.10.0.0
AS4
190.10.0.0
170.10.0.0
RtA
RtB
AS100
AS200
175.10.0.0
Set locPref200
Set locPref150
All traffic in AS 300 will be directed to RtD
RtC
RtD
AS300
35
Metric Attribute
  • Also called Multi_exit_discriminator
  • Exchanged between AS, but not carried through
  • Low value of a metric is more preferred
  • Default value is 0
  • Unless specified, router only compare metrics for
    paths from the same neighbor AS

36
Metric Attribute Example
Set Metric 0
AS400
AS100
RtA
RtB
Set Metric 200
RtA will pick RtC as the best route
Set Metric 120
RtC
RtD
AS300
37
Community Attribute
  • Optional attribute
  • Transitive between ASs
  • A label/string that attach to the prefixes
  • Aggregate prefixes into groups
  • So as to apply routing decisions

38
BGP policies
Decide exactly ONE best path
BGP router
Decision Process
Export policy
Import policy
Receive routes for prefixes from multiple
neighbors
Filter out unwanted routes, and manipulate the
attributes of remaining routes
Manipulate attributes of the best route,
influence neighbor's choice, or decide whether to
advertise the route to neighbors
39
Decision Process
  • Highest local preference
  • Shortest AS path
  • eBGP over iBGP
  • Lowest IGP metric
  • Lowest router id

40
Problems Of BGP
  • Convergence issue
  • Scalability issue
  • etc.

41
Convergence Issue
  • An Analysis of BGP Convergence Properties
  • http//citeseer.nj.nec.com/333036.html
  • Route flap dampenning
  • Suppresses the advertisements of routes close to
    the source until the routes become stable

42
Scalability of BGP
  • eBGP
  • CIDR and aggregate addresses
  • iBGP
  • BGP confederation
  • Router Reflection

43
CIDR Example
160.20.0.0
160.10.0.0
AS200
AS100
AS400
160.0.0.0/8
AS300
44
BGP Confederation
  • Divide an AS into multiple ASs and assign the
    whole group a single confederation
  • Each smaller AS have iBGP fully meshed
  • Connect to other smaller ASs with eBGP
  • but acts as iBGP (nexthop, metric and local
    preference are preserved)
  • Look like a single AS to the outsider

45
BGP Confederation Example
AS100
AS200
AS50
AS60
AS70
AS500
46
Route Reflectors
  • Relax the restriction that iBGP routers dont
    forward routing updates
  • Designate one iBGP router as the route reflector
    (RR), neighbors as RR clients
  • full mesh among neighbors are not necessary
  • RRs are fully meshed, also with other iBGP
    routers

47
RR Example
AS100
AS200
48
Related Research
  • AS relationships
  • Different commercial agreement between ASs
  • Can be inferred by analyzing BGP routing tables
  • On Inferring Automonous System Relationships in
    the Internet
  • http//www-unix.ecs.umass.edu/lgao/ton.ps
  • Inter-domain traffic engineering
  • BGP does not support traffic engineering
    inherently

49
The Internet Looks Like?
50
Network Backbone Example
3,800 PoPs 4 continents 2 Million Modem Ports
51
The End
  • Questions?
Write a Comment
User Comments (0)
About PowerShow.com