Tải bản đầy đủ (.pdf) (18 trang)

Chuyên đề mạng thế hệ mới mạng 6a bgp interdomain

Bạn đang xem bản rút gọn của tài liệu. Xem và tải ngay bản đầy đủ của tài liệu tại đây (1.98 MB, 18 trang )

Interdomain Routing
BGP
Prométhée Spathis

Thème NPA, LIP6
Paris, FRANCE
Goals of Today’s Lecture
• Challenges of interdomain routing
– Scale, privacy, and policy
– Limitations of link-state and distance-vector routing
• Path-vector routing
– Faster loop detection than distance-vector routing
– More flexibility than shortest-path routing
• Border Gateway Protocol (BGP)
– Incremental, prefix-based, path-vector protocol
– Programmable import and export policies
– Multi-step decision process for selecting “best” route
• Multiple routers within an AS
• BGP convergence delay
• IP addressing
– Address allocation blocks
– Packet forwarding
• Routing protocols
– Autonomous Systems
– Interdomain routing
– Intradomain routing
Background
IP Address : 12.4.0.0 IP Mask: 255.254.0.0
00001100 00000100
00000000 00000000
Address


Mask
for hosts Network Prefix
Use two 32-bit numbers to represent a network.
Network number = IP address + Mask
Usually written as 12.4.0.0/15
11111111 11111110
00000000 00000000
Classless Inter-Domain Routing (CIDR)
7
Scalability: Address Aggregation
Provider is given 201.10.0.0/21
201.10.0.0/22 201.10.4.0/24 201.10.5.0/24 201.10.6.0/23
Provider
Routers in the rest of the Internet just need to know how to
reach 201.10.0.0/21. The provider can direct the IP packets
to the appropriate customer.
8
Hierarchical Addressing: more specific routes
201.10.0.0/21
201.10.0.0/22
201.10.4.0/24
201.10.5.0/24
201.10.6.0/23
Provider 1 Provider 2
Multi-homed customer with 201.10.6.0/23 has two providers.
Other parts of the Internet need to know how to reach these
destinations through both providers.
9
Scalability Through Hierarchy
• Hierarchical addressing

– Critical for scalable system
– Don’t require everyone to know everyone else
– Reduces amount of updating when something changes
• Non-uniform hierarchy
– Useful for heterogeneous networks of different sizes
– Classless InterDomain Routing (CIDR) helps
• Destination-based forwarding
– Packet has a destination address
– Router identifies longest-matching prefix
– Cute algorithmic problem: very fast lookups
16
R
R
R
A
B
C
D
R1
R2
R3
R4
R5
E
Net Nxt Hop
R4
R3
R3
R4
Direct

R4
Net Nxt Hop
A
B
C
D
E
default
R2
R2
Direct
R5
R5
R2
Net Nxt Hop
A
B
C
D
E
default
R1
Direct
R3
R1
R3
R1
Default to
upstream
router

A
B
C
D
E
default
Forwarding: determine next hop
Routing: establish end-to-end paths
Forwarding always works
Routing can be badly broken
Routing vs. Forwarding
17
Statically Dynamically
Routers exchange network reachability
information using ROUTING PROTOCOLS.
Routers use this to compute best routes
Administrator
manually configures
forwarding table entries
In practice : a mix of these.
Static routing mostly at the “edge”
+ More control
+ Not restricted to
destination-based
forwarding
- Doesn’t scale
- Slow to adapt to
network failures
+ Can rapidly adapt to changes
in network topology

+ Can be made to scale well
- Complex distributed algorithms
- Consume CPU, Bandwidth, Memory
- Debugging can be difficult
- Current protocols are destination-based
How Are Forwarding Tables Populated to
implement Routing?
Forwarding vs. Routing
• Forwarding: data plane
– Directing a data packet to an outgoing link
– Individual router using a forwarding table
• Routing: control plane
– Computing the paths the packets will follow
– Routers talking amongst themselves
– Individual router creating a forwarding table
What is Routing?
• A famous quotation from RFC 791
“A name indicates what we seek.
An address indicates where it is.
A route indicates how we get there. ”
Jon Postel
Internet Routing Architecture
• Divided into Autonomous Systems
– Distinct regions of administrative control
– Routers/links managed by a single “institution”
– Service provider, company, university, …
• Hierarchy of Autonomous Systems
– Large, tier-1 provider with a nationwide backbone
– Medium-sized regional provider with smaller backbone
– Small network run by a single company or university

• Interaction between Autonomous Systems
– Internal topology is not shared between ASes
– … but, neighboring ASes interact to coordinate routing
21
Autonomy: network of networks
LIP6
network
DT
AS 1
AS 3
AS 2
• Internet = interconnection of Autonomous Systems (AS)
– Distinct regions of administrative control
– Routers/links managed by a single “institution”
– Service provider, company, university, etc.
Autonomous Systems (ASes)
An autonomous system is an autonomous routing domain
that has been assigned an Autonomous System Number (ASN).
RFC 1930: Guidelines for creation, selection,
and registration of an Autonomous System
… the administration of an AS appears to other ASes to
have a single coherent interior routing plan and presents a
consistent picture of what networks are reachable through it.
AS Numbers (ASNs)
ASNs are 16 bit values.
64512 through 65535 are “private”
• Level 3: 1
• MIT: 3
• Harvard: 11
• Yale: 29

• Princeton: 88
• AT&T: 7018, 6341, 5074, …
• UUNET: 701, 702, 284, 12199, …
• Sprint: 1239, 1240, 6211, 6242, …
• …
ASNs represent units of routing policy
Currently around 20,000 in use.
AS ≠ Institution
• Not equivalent to an AS
– Many institutions span multiple autonomous systems
– Some institutions do not have their own AS number
– Ownership of an AS may be hard to pinpoint (whois)
• Not equivalent to a block of IP addresses (prefix)
– Many institutions have multiple (non-contiguous) prefixes
– Some institutions are a small part of a larger address block
– Ownership of a prefix may be hard to pinpoint (whois)
• Not equivalent to a domain name (att.com)
– Some sites may be hosted by other institutions
– Some institutions have multiple domain names (att.net)
The AS graph
may look like this.
Reality may be closer to this…
BGP was designed to
throw away information!
AS Graph != Internet Topology
• Tier-1: small number of tier-1 ASes
– A near-clique of ~15 ASes with no providers
– AT&T, Sprint, UUNET, …
• Transit core: peer with tier-1s and each other
– Around 100-200 large ASes

– UUNET Europe, KDDI, and Singapore Telecom
• Regional ISPs: non-stubs near the edge
– Around 2000 medium-sized ASes
– Minnesota Regional Network, US West
• Stub ASes: no peer or customer neighbors
– Princeton, Rutgers, MIT, AT&T Research, …
Characterizations of AS Topology
27
Hierarchical routing
LIP6
network
DT
AS 1
AS 3
AS 2
Intra-AS routing
(Interior Gateway Protocol)
Most common: OSPF,IS-IS
determines path from ingress
to egress
Inter-AS routing
(Border Gateway Protocol)
determines AS path and
egress point
• Goal: distributed management of resources
– Internetworking of multiple networks
– Networks under separate administrative control
• Solution: two-tiered routing architecture
– Intradomain: inside a region of control
 Okay for routers to share topology information

 Routers configured to achieve a common goal
– Interdomain: between regions of control
 Not okay to share complete information
 Networks may have different/conflicting goals
• Led to the use of different protocols…
Two-Tiered Internet Routing Architecture
Interconnected ASes
• Forwarding table is
configured by both intra-
and inter-AS routing
algorithm
– Intra-AS sets entries for
internal dests
– Inter-AS & Intra-As sets
entries for external
dests
3a
3c
3b
1c
1b
1a
1d
2a
2c
2b
AS 1
AS 2
AS 3
Intra-AS

Routing
algorithm
Inter-AS
Routing
algorithm
Forwarding
table
• Interdomain routing: between ASes
– Routing policies based on business relationships
– No common metrics, and limited cooperation
– BGP: policy-based, path-vector routing protocol
• Intradomain routing: within an AS
– Shortest-path routing based on link metrics
– Routers all managed by a single institution
– OSPF and IS-IS: link-state routing protocol
– RIP and EIGRP: distance-vector routing protocol
Two-Tiered Internet Routing System
AS 1
AS 2
BGP
EGP = Exterior Gateway Protocol
IGP = Interior Gateway Protocol
Metric based: OSPF, IS-IS, RIP,
EIGRP (cisco)
Policy based: BGP
The Routing Domain of BGP is the entire Internet
OSPF
EIGRP
Architecture of Dynamic Routing
• Topology information is

flooded within the routing
domain
• Best end-to-end paths are
computed locally at each
router.
• Best end-to-end paths
determine next-hops.
• Based on minimizing some
notion of distance
• Works only if policy is
shared and uniform
• Examples: OSPF, IS-IS
• Each router knows little
about network topology
• Only best next-hops are
chosen by each router for
each destination network.
• Best end-to-end paths result
from composition of all next-
hop choices
• Does not require any notion
of distance
• Does not require uniform
policies at all routers
• Examples: RIP, BGP
Link State Vectoring
Technology of Distributed Routing
Routers Talking to Routers
Routing info
Routing info

• Routing computation is distributed among routers within a routing
domain
• Computation of best next hop based on routing information is the
most CPU/memory intensive task on a router
• Routing messages are usually not routed, but exchanged via layer 2
between physically adjacent routers (internal BGP and multi-hop
external BGP are exceptions)
• Link-state routing with static link weights
– Static weights: avoid stability problems
– Link state: faster reaction to topology changes
• Most common protocols in backbones
– OSPF: Open Shortest Path First
– IS-IS: Intermediate System–Intermediate System
• Some use of distance vector in enterprises
– RIP: Routing Information Protocol
– EIGRP: Enhanced Interior Gateway Routing Protocol
• Growing use of Multi-Protocol Label Switching
Intradomain Routing Today
Link-State Routing is Problematic
• Topology information is flooded
– High bandwidth and storage overhead
– Forces nodes to divulge sensitive information
• Entire path computed locally per node
– High processing overhead in a large network
• Minimizes some notion of total distance
– Works only if policy is shared and uniform
• Typically used only inside an AS
– E.g., OSPF and IS-IS
Challenges for Interdomain Routing
• Scale

– Prefixes: 150,000-200,000, and growing
– ASes: 20,000 visible ones, and growing
– AS paths and routers: at least in the millions…
• Privacy
– ASes don’t want to divulge internal topologies
– … or their business relationships with neighbors
• Policy
– No Internet-wide notion of a link cost metric
– Need control over where you send traffic
– … and who can send traffic through you
Shortest-Path Routing is Restrictive
• All traffic must travel on shortest paths
• All nodes need common notion of link costs
• Incompatible with commercial relationships
Regional
ISP1
Regional
ISP2
Regional
ISP3
Cust1
Cust3
Cust2
National
ISP1
National
ISP2
YES
NO
• Advantages

– Hides details of the network topology
– Nodes determine only “next hop” toward the dest
• Disadvantages
– Minimizes some notion of total distance, which is difficult
in an interdomain setting
– Slow convergence due to the counting-to-infinity problem
(“bad news travels slowly”)
• Idea: extend the notion of a distance vector
Distance Vector is on the Right Track
Path-Vector Routing
• Extension of distance-vector routing
– Support flexible routing policies
– Avoid count-to-infinity problem
• Key idea: advertise the entire path
– Distance vector: send distance metric per dest d
– Path vector: send the entire path for each dest d
3
2
1
d
“d: path (2,1)”
“d: path (1)”
data traffic
data traffic
Faster Loop Detection
• Node can easily detect a loop
– Look for its own node identifier in the path
– E.g., node 1 sees itself in the path “3, 2, 1”
• Node can simply discard paths with loops
– E.g., node 1 simply discards the advertisement

3
2
1
“d: path (2,1)”
“d: path (1)”
“d: path (3,2,1)”
Link State Distance Vector Path Vector
Dissem-
ination
Flood link state
advertisements to all
routers
Update distances from
neighbors’ distances
Algorithm
Dijsktra’s shortest
path
Bellman-Ford shortest
path
Converge Fast due to
flooding
Slow, due to count-to-
infinity
Protocols OSPF, IS-IS RIP, EIGRP
Routing Protocols
Link State Distance Vector Path Vector
Dissem-
ination
Flood link state
advertisements to all

routers
Update distances from
neighbors’ distances
Update paths based
on neighbors’ paths
Algorithm
Dijsktra’s shortest
path
Bellman-Ford shortest
path
Local policy to rank
paths
Converge Fast due to
flooding
Slow, due to count-to-
infinity
Slow, due to path
exploration
Protocols OSPF, IS-IS RIP, EIGRP BGP
Routing Protocols
The Gang of Four
Link State Vectoring
EGP
IGP
BGP
RIP
IS-IS
OSPF
Interdomain Routing (Between ASes)
1

2
3
4
5
6
7
Client
Web server
Path: 6, 5, 4, 3, 2, 1
Interdomain Routing: Border Gateway Protocol
3
2
1
12.34.158.5
“12.34.158.0/24: path (2,1)”
“12.34.158.0/24: path (1)”
data traffic
data traffic
• ASes exchange info about who they can reach
– IP prefix: block of destination IP addresses
– AS path: sequence of ASes along the path
• Policies configured by the AS’s operator
– Path selection: which of the paths to use?
– Path export: which neighbors to tell?
Flexible Policies
• Each node can apply local policies
– Path selection: Which path to use?
– Path export: Which paths to advertise?
• Examples
– Node 2 may prefer the path “2, 3, 1” over “2, 1”

– Node 1 may not let node 3 hear the path “1, 2”
2
3
1
Zooming in to AS 3
12.34.158.0/24
Border router:
• Border router
– Learns BGP route from neighbor AS
– Creates forwarding-table entry for prefix
• But, how do the other routers get there?
How do Other Routers Learn the BGP Route?
iBGP session
12.34.158.0/24
“12.34.158.0/24
through red
router”
• Internal BGP
– iBGP sessions between the routers
– Allows other routers to get the big picture
• Simplest case: “full mesh” of iBGP sessions
How To Get to the Egress Router?
3
2
2
1
1
3
1
4

5
3
“Use Serial0/0.1
to get to the
red router”
• Interior Gateway Protocol (OSPF/IS-IS)
– Routers flood information to learn topology
– Routers determine “next hop” to other routers…
– Compute shortest paths based on the link weights
– Link weights configured by the operator
Constructing the Forwarding Table
• Three protocols
– External BGP: learn the external route
– Internal BGP: propagate inside the AS
– IGP: learn outgoing link on path to other router
• Router joins the data
– Prefix 12.34.158.0/24 reached through red router
– Red router reached via link Serial0/0.1
– Forwarding entry: 12.34.158.0/24  Serial0/0.1
• Router forwards packets
– Lookup destination 12.34.158.5 in table
– Forward packet out link Serial0/0.1
Constructing the Forwarding Table
• Three protocols
– External BGP: learn the external route
– Internal BGP: propagate inside the AS
– IGP: learn outgoing link on path to other router
• Router joins the data
– Prefix 12.34.158.0/24 reached through red router
– Red router reached via link Serial0/0.1

– Forwarding entry: 12.34.158.0/24  Serial0/0.1
• Router forwards packets
– Lookup destination 12.34.158.5 in table
– Forward packet out link Serial0/0.1
• Interdomain routing protocol for the Internet
– Prefix-based path-vector protocol
– Policy-based routing based on AS Paths
– Evolved during the past 15 years
• 1989 : BGP-1 [RFC 1105]
– Replacement for EGP (1984, RFC 904)
• 1990 : BGP-2 [RFC 1163]
• 1991 : BGP-3 [RFC 1267]
• 1995 : BGP-4 [RFC 1771]
– Support for Classless Interdomain Routing (CIDR)
Border Gateway Protocol
Components of BGP
• BGP protocol
– Definition of how two BGP neighbors communicate
– Message formats, state machine, route attributes, etc.
– Standardized by the IETF
• Policy specification
– Flexible language for filtering and manipulating routes
– Indirectly affects the selection of the best route
– Varies across vendors, though constructs are similar
• BGP decision process
– Complex sequence of rules for selecting the best route
– De facto standard applied by router vendors
– Being codified in a new RFC for BGP coming soon
BGP Operations
Establish session on

TCP port 179
Exchange all
active routes
Exchange incremental
updates
AS1
AS2
While connection
is ALIVE exchange
route UPDATE messages
BGP session
• External Neighbor (eBGP) in a different
Autonomous Systems
• Internal Neighbor (iBGP) in the same
Autonomous System
AS1
AS2
eBGP
iBGP
iBGP is routed (using IGP!)
Two Types of BGP Neighbor Relationships
eBGP update
iBGP updates
• N border routers means N(N-1)/2 peering
sessions
• Each router must have N-1 iBGP
sessions configured
• The addition a single iBGP speaker
requires configuration changes to all
other iBGP speakers

• Size of iBGP routing table can be order N
larger than number of best routes
(remember alternate routes!)
• Each router has to listen to update noise
from each neighbor
Currently four solutions:
(0) Buy bigger routers!
(1) Break AS into smaller ASes
(2) BGP Route reflectors
(3) BGP confederations
iBGP Mesh Does Not Scale
78
• Route reflectors can pass on
iBGP updates to clients
• Each RR passes along ONLY best
routes
• ORIGINATOR_ID and
CLUSTER_LIST attributes are
needed to avoid loops
RR RR
RR
Route Reflectors
79
• Open : Establish a peering session.
• Keep Alive : Handshake at regular intervals.
• Notification : Shuts down a peering session.
• Update : Announcing new routes or withdrawing previously
announced routes.
announcement
=

prefix + attributes values
Four Types of BGP Messages
80
• Open : Establish a peering session.
• Keep Alive : Handshake at regular intervals.
• Notification : Shuts down a peering session.
• Update : Announcing new routes or withdrawing previously
announced routes.
Announcement
=
prefix + attributes values
Four Types of BGP Messages
Four Basic Messages
• Open:
Establishes BGP session (uses TCP port #179)
• Notification:
Report unusual conditions
• Update:
Inform neighbor of new routes that become active
Inform neighbor of old routes that become inactive
• Keepalive:
Inform neighbor that connection is still viable
Incremental Protocol
• A node learns multiple paths to destination
– Stores all of the routes in a routing table
– Applies policy to select a single active route
– … and may advertise the route to its neighbors
• Incremental updates
– Announcement
 Upon selecting a new active route, add node id to path

 … and (optionally) advertise to each neighbor
– Withdrawal
 If the active route is no longer available
 … send a withdrawal message to the neighbors
• Update messages
– Advertisement
 New route for the prefix (e.g., 12.34.158.0/24)
 Attributes such as the AS path (e.g., “2 1”)
– Withdrawal
 Announcing that the route is no longer available
• Numerous BGP attributes
– AS path
– Next-hop IP address
– Local preference
– Multiple-Exit Discriminator
– …
Update Messages
Advertising a prefix
• When a router advertises a prefix to one of its BGP
neighbors:
– information is valid until first router explicitly advertises
that the information is no longer valid
– BGP does not require routing information to be refreshed
– if node A advertises a path for a prefix to node B,
then node B can be sure node A is using that path
itself to reach the destination.
BGP Route
AS 88
Princeton
128.112.0.0/16

AS path = 88
Next Hop = 192.0.2.1
AS 7018
AT&T
AS 12654
RIPE NCC
RIS project
192.0.2.1
128.112.0.0/16
AS path = 7018 88
Next Hop = 12.127.0.121
12.127.0.121
• Destination prefix (e.g,. 128.112.0.0/16)
• Route attributes, including
– AS path (e.g., “7018 88”)
– Next-hop IP address (e.g., 12.127.0.121)
NEXT_HOP Attribute
• For EBGP session, NEXT HOP = IP address of neighbor
that announced the route.
• For IBGP sessions, if route originated inside AS, NEXT
HOP = IP address of neighbor that announced the route
• For routes originated outside AS, NEXT HOP of EBGP
node that learned of route, is carried unaltered into IBGP.
Joining BGP and IGP Information
• Border Gateway Protocol (BGP)
– Announces reachability to external destinations
– Maps a destination prefix to an egress point
 128.112.0.0/16 reached via 192.0.2.1
• Interior Gateway Protocol (IGP)
– Used to compute paths within the AS

– Maps an egress point to an outgoing link
 192.0.2.1 reached via 10.1.1.1
192.0.2.1
10.1.1.1
Forwarding Table
Forwarding Table
Joining BGP and IGP Information
AS 7018
AS 88
192.0.2.1
128.112.0.0/16
10.10.10.10
BGP
192.0.2.1128.112.0.0/16
destination next hop
10.10.10.10192.0.2.0/30
destination next hop
128.112.0.0/16
Next Hop = 192.0.2.1
128.112.0.0/16
destination next hop
10.10.10.10
+
192.0.2.0/30
10.10.10.10
Forwarding Table
Forwarding Table
Joining BGP and IGP Information
AS 7018
AS 88

192.0.2.1
128.112.0.0/16
10.10.10.10
BGP
192.0.2.1128.112.0.0/16
destination next hop
10.10.10.10192.0.2.0/30
destination next hop
128.112.0.0/16
Next Hop = 192.0.2.1
128.112.0.0/16
destination next hop
10.10.10.10
+
192.0.2.0/30
10.10.10.10
AS PATH Attribute
AS7018
128.112.0.0/16
AS Path = 88
AS 1239
Sprint
AS 1755
Ebone
AT&T
AS 3549
Global Crossing
128.112.0.0/16
AS Path = 7018 88
128.112.0.0/16

AS Path = 3549 7018 88
AS 88
128.112.0.0/16
Princeton
Prefix Originated
AS 12654
RIPE NCC
RIS project
AS 1129
Global Access
128.112.0.0/16
AS Path = 7018 88
128.112.0.0/16
AS Path = 1239 7018 88
128.112.0.0/16
AS Path = 1129 1755 1239 7018 88
128.112.0.0/16
AS Path = 1755 1239 7018 88
Attributes are Used to Select Best Routes
192.0.2.0/24
pick me!
192.0.2.0/24
pick me!
192.0.2.0/24
pick me!
192.0.2.0/24
pick me!
Given multiple
routes to the same
prefix, a BGP speaker

must pick at most
one best route
(Note: it could reject
them all!)
BGP Path Selection
• Simplest case
– Shortest AS path
– Arbitrary tie break
• Example
– Four-hop AS path preferred over
a three-hop AS path
– AS 12654 prefers path through
Global Crossing
• But, BGP is not limited to shortest-
path routing
– Policy-based routing
AS 3549
Global Crossing
128.112.0.0/16
AS Path = 3549 7018 88
AS 12654
RIPE NCC
RIS project
AS 1129
Global Access
128.112.0.0/16
AS Path = 1129 1755 1239 7018 88
BGP Attributes
Value Code Reference


1 ORIGIN RFC1771]
2 AS_PATH [RFC1771]
3 NEXT_HOP [RFC1771]
4 MULTI_EXIT_DISC [RFC1771]
5 LOCAL_PREF [RFC1771]
6 ATOMIC_AGGREGATE [RFC1771]
7 AGGREGATOR [RFC1771]
8 COMMUNITY [RFC1997]
9 ORIGINATOR_ID [RFC2796]
10 CLUSTER_LIST [RFC2796]
11 DPA [Chen]
12 ADVERTISER [RFC1863]
13 RCID_PATH / CLUSTER_ID [RFC1863]
14 MP_REACH_NLRI [RFC2283]
15 MP_UNREACH_NLRI [RFC2283]
16 EXTENDED COMMUNITIES [Rosen]

255 reserved for development
From IANA: />Most
important
attributes
Not all attributes
need to be present in
every announcement
BGP Policy: Influencing Decisions
Best Route
Selection
Apply Import
Policies
Best Route

Table
Apply Export
Policies
Install forwarding
Entries for best
Routes.
Receive
BGP
Updates
Best
Routes
Transmit
BGP
Updates
Apply Policy =
filter routes &
tweak attributes
Based on
Attribute
Values
IP Forwarding Table
Apply Policy =
filter routes &
tweak attributes
Open ended programming.
Constrained only by vendor configuration language
• Routing Information Base
– Store all BGP routes for each destination prefix
– Withdrawal message: remove the route entry
– Advertisement message: update the route entry

• Selecting the best route
– Consider all BGP routes for the prefix
– Apply rules for comparing the routes
– Select the one best route
 Use this route in the forwarding table
 Send this route to neighbors
BGP Decision Process: Path Selection on a Router
Highest Local Preference
Shortest ASPATH
Lowest MED
i-BGP < e-BGP
Lowest IGP cost
to BGP egress
Lowest router ID
traffic engineering
Enforce relationships
Throw up hands and
break ties
Route Selection Summary
BGP Decision Process: Multiple Steps
• Highest local preference
– Set by import policies upon receiving advertisement
• Shortest AS path
– Included in the route advertisement
• Lowest origin type
– Included in advertisement or reset by import policy
• Smallest multiple exit discriminator
– Included in the advertisement or reset by import policy
• Smallest internal path cost to the next hop
– Based on intradomain routing protocol (e.g., OSPF)

• Smallest next-hop router id
– Final tie-break
• Import policy
– Filter unwanted routes from neighbor
 E.g. prefix that your customer doesn’t own
– Manipulate attributes to influence path selection
 E.g., assign local preference to favored routes
• Export policy
– Filter routes you don’t want to tell your neighbor
 E.g., don’t tell a peer a route learned from other peer
– Manipulate attributes to control what they see
 E.g., make a path look artificially longer than it is
BGP Policy: Applying Policy to Routes
ICNP 2002
Customers and Providers
Customer pays provider for access to the Internet
provider
customer
IP traffic
provider
customer
ICNP 2002
The “Peering” Relationship
peer peer
customerprovider
Peers provide transit between
their respective customers
Peers do not provide transit
between peers
Peers (often) do not exchange $$$

traffic
allowed
traffic NOT
allowed

×