1 / 26

BGP

BGP. BGP. Border Gateway Protocol 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

tim
Download Presentation

BGP

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. BGP

  2. BGP • Border Gateway Protocol • 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: 1-64511 • private range: 64512-65535

  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 192.168.0.0/24 AS5 AS6 192.168.0.0/24 AS6 AS5 AS2 AS1

  8. BGP message types • OPEN • 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: 19-4096 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. • 130.216.0.0/15 • 00001111 10000010 11011000 • (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 0 1 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | 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 • 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 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 AdvertisementsApplying 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) • Section 4.3.5 to 4.3.6 (pp. 22)

More Related