Presentation is loading. Please wait.

Presentation is loading. Please wait.


Similar presentations

Presentation on theme: "BGP."— Presentation transcript:


2 BGP Border Gateway Protocol Routing between Autonomous Systems (ASes)
Currently version 4 RFC 4271 TCP port 179 Routing between Autonomous Systems (ASes) Decentralised routing Allows an AS to advertise that it exists Each AS advertises routes it has, leaves decision about whether to use them or not to peer Originally supported IPv4; these days multi-protocol

3 Autonomous System set of routers under same administrative control
owned/operated by same entity identified by a unique number autonomous system number (ASN) historically a 16-bit value public range: private range:

4 Autonomous Systems AS3 AS4 AS1 AS2 AS5 AS6

5 Autonomous Systems AS1 AS2 eBGP iBGP

6 BGP Path-Vector protocol
Routing information includes the AS path a route has traversed A router prepends its AS number to any route it receives before advertising it A router discards any AS path that includes its ASN in it Why?

7 Autonomous Systems AS3 AS4 AS1 AS2 AS5 AS6

Establish BGP session with peer; negotiate hold time, advise ASN. KEEPALIVE Periodic message sent so a router knows a peer is still up in absence of updates UPDATE Routes added or withdrawn NOTIFICATION Error condition encountered

9 BGP Message Format marker length type
Marker: all ones in most cases; can be used for MD5 authentication. Length: bytes Type: one of four values (open, update, notification, keepalive)

10 UPDATE Message An exterior gateway protocol calls for incremental changes to routing table. reduce volume of traffic to synchronise routing through the network An UPDATE message advises when new routes are available Network Layer Reachability Information (NLRI) when a route is withdrawn

11 IP address prefix | Length (1 octet) | | Prefix (variable) | IPv4 routes are described in CIDR format and encoded as <Length, Prefix>; e.g. /15 (15) (130) (216)

12 UPDATE Message +-----------------------------------------------------+
| Withdrawn Routes Length (2 octets) | | Withdrawn Routes (variable) | | Total Path Attribute Length (2 octets) | | Path Attributes (variable) | | Network Layer Reachability Information (variable) | Section 4.3, UPDATE message format, RFC 4271

13 Withdrawing Routes The prefixes to withdraw (if any) are specified in the withdrawn routes section The receiver finds the appropriate prefix previously announced by the peer and removes that one When a BGP connection is closed, all routes advertised from that connection are withdrawn by the peers

14 Advertising Routes New routes, and their attributes, are specified in the NLRI and path attributes sections Mandatory attributes: origin: IGP, EGP, ? AS path: seq. of ASes in path to prefix next hop: IP address of router to use

15 Other Attributes MED (Multi Exit Discriminator) Local Pref Community

16 Attributes | Attr. Flags |Attr. Type Code| Bit 0: optional (0) / well-known (1) Bit 1: transitive (1) / non-transitive (2) Bit 2: partial (1) / complete (0) Bit 3: attr. length octet (0) or two octets (1)

17 Classes of Attributes Well-known mandatory Well-known discretionary
BGP speaker MUST understand it and MUST include it in NLRI Well-known discretionary BGP speaker MUST understand it and MAY include it in NLRI Optional transitive BGP speaker MAY understand it but MUST forward attribute if received in NLRI – sets partial bit to 1 Optional non-transitive BGP speaker MAY understand it but MUST NOT forward attribute received in NLRI

18 Multiprotocol BGP (MBGP)
BGP was designed to organise global IPv4 routing MBGP: a set of extensions to enable other types of routes to be chucked around using the attributes section Optional, non-transitive Has to be negotiated at OPEN. MP-Reach-NLRI (type 14) MP-Unreach-NLRI (type 15) RFC 4760

19 MP-Reach-NLRI | Address Family Identifier (2 octets) | | Subsequent Address Family Identifier (1 octet) | | Length of Next Hop Network Address (1 octet) | | Network Address of Next Hop (variable) | | Reserved (1 octet) | | Network Layer Reachability Information (variable) | Source: Page 3, RFC 4760

20 BGP decision process Step Attribute
Controlled by local or neighbour AS? 1 Highest LocalPref local 2 Lowest AS path length neighbour 3 Lowest origin type neither 4 Lowest MED 5 eBGP-learned over iBGP-learned 6 Lowest IGP cost to border router 7 Lowest router ID (to break ties) Source: BGP routing policies in ISP networks, Caesar and Rexford.

21 BGP Communities Administrative tag used to associate routes together
Assists in implementing administrative routing policy Optional transitive attribute. Well-known communities: No-Export; do not advertise outside of this AS No-Advertise; do not advertise further No-Export-Subconfed; do not advertise outside selected portion of AS.

22 Processing Route Advertisements Applying Policy
Import policy Filter routes from going further Append or modify attributes Decision process Export policy Which neighbours will receive the route Don’t want to carry traffic you aren’t being paid to carry Source: BGP routing policies in ISP networks, Caesar and Rexford.

23 Routing Policy Import policy Protect network from bad advertisements
Advertising private or unallocated address space Customer advertising default route to provider Promote aggregation through filtering NLRI with prefixes longer than particular value

24 Configuring Local Policies
Preference add/delete/modify route attributes Filtering Eliminate certain routes from consideration; control who they will be exported to; Tagging Associate additional state with a route using community attribute

25 Further Reading BGP routing policies in ISP networks; Matthew Caesar and Jennifer Rexford RFC 4760: Multiprotocol Extensions for BGP-4 RFC 4271: A Border Gateway Protocol 4 (BGP-4)

26 Next lecture reading RFC 4364 Section 3 to 4.3.2 (pp. 8-19)

Download ppt "BGP."

Similar presentations

Ads by Google