159.334 Computer Networks
159.334 Computer Networks
Border Gateway Protocol – BGP4 (2)
Professor Richard Harris
159.334 Computer Networks
159.334 Computer Networks
Presentation Outline
Computer Networks
Computer Networks--1/1/33
159.334 Computer Networks
159.334 Computer Networks
Learning Objectives
You will be able to:
Discuss the operation of the BGP4 protocol
159.334 Computer Networks
159.334 Computer Networks
References
Tanenbaum, “Computer Networks”, 4th Edition
Forouzan, “Data Communications and Networking”, 4th
Edition
Cisco CCNA1 Module 10 - part 1
Stallings, William 2000 ‘Data and Computer Communications’, Prentice Hall, Sixth Edition
Computer Networks
Computer Networks--1/1/55
159.334 Computer Networks
159.334 Computer Networks
BGP Path Selection Overview
Unlike other routing protocols, BGP doesn’t use shortest path technology.
BGP is regarded as a path vector protocol since it works by sending route advertisements.
A route advertisement indicates the reachability of a network, viz:
A network address and a netmask representing a block of contiguous IP addresses.
It also contains the list of all the transit AS’s that must be used to reach the announced network.
159.334 Computer Networks
159.334 Computer Networks
BGP Attributes – 1
Unlike other routing protocols, BGP does not use a single routing metric to decide the preferred
route.
It uses multiple parameters that have different degrees of significance as well as differences in the way they are distributed within BGP.
These metric parameters are called path attributes.
Attributes are classified into two types:
Well-known
Computer Networks Computer Networks--1/1/77 159.334 Computer Networks 159.334 Computer Networks
BGP Attributes – 2
Attributes Well-known Optional159.334 Computer Networks
159.334 Computer Networks
Summary of Attributes
The following attributes have been identified for use with BGP: AS-Path Origin Next-hop Weight Local Preference
Computer Networks
Computer Networks--1/1/99
159.334 Computer Networks
159.334 Computer Networks
Simplified Operation of BGP Router[3]
Inbound filter Attribute manipulation Inbound filter Attribute manipulation Inbound filter Attribute manipulation Outbound filter Attribute manipulation Outbound filter Attribute manipulation Outbound filter Attribute manipulation BGP routing table BGP Decision Process 1. Highest LOCAL-PREF 2. Shortest AS-PATH 3. Lowest MED
4. eBGP over iBGP
5. Nearest IGP neighbour
Forwarding table ….. Peer1 PeerN ….. Peer1 PeerN Selects acceptable advertisements Select best route
based on decision list. Place in the forwarding table
159.334 Computer Networks
159.334 Computer Networks
Brief Review of Attributes
The following slides will review what is meant by the key attributes that have been identified for use with BGP.
At the conclusion of these discussions, a hierarchical structure will be presented that shows in more detail the policy based approach used to identify routes employed by BGP.
Computer Networks
Computer Networks--1/1/1111 159.334 Computer Networks
159.334 Computer Networks
AS-Path Attribute – 1
As a BGP update passes through an AS, that AS number gets appended as an update.
So an arriving update at a router will have passed
through a number of AS’s and these will be stored in the AS-path
The AS-path attribute is a well-known mandatory
159.334 Computer Networks
159.334 Computer Networks
Sequence of AS’s a route has traversed.
Provides a mechanism for loop detection.
Policies may be applied based on the AS path.
Local AS added only when sent to external peer.
* Shortest AS path preferred
Computer Networks
Computer Networks--1/1/1313 159.334 Computer Networks
159.334 Computer Networks
Origin
This attribute is included in all BGP routing updates and its purpose is to indicate the origin of the path
information. It is permitted to have one of only three values, viz:
IGP: Network was redistributed from and IGP to BGP EGP: The origin is EGP (almost obsolete now)
INCOMPLETE: The origin is unknown.
159.334 Computer Networks
159.334 Computer Networks
Next-hop
It is the IP address of the next hop associated with a BGP update.
The Next-hop attribute is a well-known and mandatory attribute. Router A will advertise
Computer Networks
Computer Networks--1/1/1515 159.334 Computer Networks
159.334 Computer Networks
Weight
This influences path selection from a router when more than one route to the destination is present.
It is configurable on a per-neighbour basis but has no significance outside of that router.
It is classified as an optional attribute and is not transitive
The default weight on a Cisco router for a route that is originated by the local router is 32,768 and it is 0 for all other routes.
159.334 Computer Networks
159.334 Computer Networks
Local Preference
An often-used attribute, local_pref (normally 100) overrides AS_PATH, and is transitive throughout your network. It is never
advertised to an eBGP peer.
For example, you can
express the policy “prefer private interconnects” by setting the local_pref to 150
and leaving all other peers at
Computer Networks
Computer Networks--1/1/1717 159.334 Computer Networks
159.334 Computer Networks
Metric (Multi Exit Discriminator –
MED)
Indication to external peers of the preferred path into an AS.
Affects routes with the same AS path. Advertised to external neighbours
Usually based on IGP metric
* Note that the lowest MED is preferred
The MED (multi-exit discriminator) is a commonly used attribute. It comes after the AS_PATH in
evaluation sequence.
159.334 Computer Networks
159.334 Computer Networks
Community
This attribute is a means of grouping a set of
destinations so that a common policy can be applied to them.
The attribute is an optional transitive attribute. (If a
router receives this and doesn’t understand it it simply passes it on transparently in its own update.)
Computer Networks Computer Networks--1/1/1919 159.334 Computer Networks 159.334 Computer Networks
BGP Attributes – Summary
Attributes Well-known OptionalMandatory Discretionary Transitive Non-transitive AS-Path
Origin Next-hop
159.334 Computer Networks
159.334 Computer Networks
BGP Route Selection - Detail
The following hierarchical rule set is followed for BGP: The path is ignored if the next hop is inaccessible
Highest weight is preferred (if this optional proprietary attribute is in use on the router).
Highest local preference is preferred.
Prefer a route that has originated from the router that is advertising it.
Shortest AS path.
This means the path with the least number of AS entries in it.
Lowest Origin Code (IGP > EGP > INCOMPLETE). Lowest Metric or MED value
External path is preferred to internal. The administrative distance for an EGP path is 20 and 200 for an IBGP route
Computer Networks
Computer Networks--1/1/2121 159.334 Computer Networks
159.334 Computer Networks
Comment on Selection Criteria
These criteria act as filters, and the Nth criterion is
only evaluated if more than one route has passed the (N – 1)th criterion.
It should be noted that most BGP implementations allow the network administrator to optionally
disable some of the criteria of the BGP decision process.
159.334 Computer Networks
159.334 Computer Networks
Control of Outgoing Traffic [3] - 1
Two approaches have been used:
1. Use local_pref to be manipulated based on passive or active measurements.
These solutions usually measure the load on each inter-domain link, and some rely on active measurements to evaluate the
performance of inter-domain paths.
Based on these measurements and some knowledge of the Internet topology (obtained either through a central server or from the BGP router to which they are attached), they attach appropriate values of the local_pref attribute to indicate which route should be
Computer Networks
Computer Networks--1/1/2323 159.334 Computer Networks
159.334 Computer Networks
Control of Outgoing Traffic [3] - 2
As shown in the slide depicting BGP router operation, the BGP decision process will select the nearest IGP neighbour when comparing several equivalent routes received via iBGP.
For example, suppose router R27 receives one packet whose destination is R45: The
BGP decision process of router R27will compare two routes toward R45, one
received via R28 and the other received via R26.
By selecting router R28as the exit border router for this packet, AS2 will ensure that this packet will consume as few resources as possible inside its own network.
If a transit AS relies on a tuning of the weights of its intra-domain routing protocol this tuning will indirectly influence its outgoing traffic.
R51 R11 R14 R13 R12 R21 R27 R22 R23 R25 R28 R24 R26 R31 R 32 R33 R 34 R35 R36 R61 R43 R44 R45 R42 R41 AS 5 AS 1 AS 2 AS 3 AS 4 AS 6
159.334 Computer Networks
159.334 Computer Networks
Control of Incoming Traffic [3] – 1
The first method that can be used to control the traffic that enters an AS is to rely on selective advertisements and announce different route advertisements on different links.
Another method would be to allow an AS to indicate a ranking among the various route
advertisements that it sends. Based on the utilisation of the length of the AS-path as the third criteria in the BGP decision
process, a possible way to
influence the selection of routes by a distant AS is to artificially
increase the length of the AS path
Computer Networks
Computer Networks--1/1/2525 159.334 Computer Networks
159.334 Computer Networks