inter-domain routing

Post on 13-Jan-2016

37 Views

Category:

Documents

0 Downloads

Preview:

Click to see full reader

DESCRIPTION

Inter-Domain Routing. Routing Hierarchies. Flat routing doesn’t scale Each node cannot be expected to have routes to every destination (or destination network) Key observation Need less information with increasing distance to destination Two radically different approaches for routing - PowerPoint PPT Presentation

TRANSCRIPT

Inter-Domain Routing

Routing Hierarchies

• Flat routing doesn’t scale– Each node cannot be expected to have routes to every

destination (or destination network)

• Key observation– Need less information with increasing distance to

destination

• Two radically different approaches for routing– The area hierarchy

– The landmark hierarchy

The Area Hierarchy

1 2

3

1.11.2

2.1 2.2

3.1 3.2

2.2.1

Areas

• Technique for hierarchically addressing nodes in a network

• Divide network into areas– Areas can overlap

– Areas can have nested sub-areas

– Constraint: no path between two sub-areas of an area can exit that area

• sub-areas must be completely contained within area

Addressing

• Address areas hierarchically– sequentially number top-level areas– sub-areas of area are labeled relative to that

area– nodes are numbered relative to the smallest

containing area• nodes can have multiple addresses

Routing

• Within area– each node has routes to every other node

• Outside area– each node has routes for other top-level areas

only– inter-area packets are routed to nearest border

router

• Can result in sub-optimal paths

Path Suboptimality

1 2

3

1.11.2

2.1 2.2

3.1 3.2

2.2.1

3 hop red pathvs2 hop green path

Landmark hierarchy

• Details about things nearby and less information about things far away

• Not defined by arbitrary boundaries– (therefore not well suited to the real world that

does have administrative boundaries)

Landmark Overview

• Landmark routers have “height” which determines how far away they can be seen (visibility)

• Routers within Radius n can see a landmark router LM(n)

• See means that those routers have LM(n)’s address and know next hop to reach it. – Router x as an entry for router y if x is within radius of y

• Distance vector style routing with simple metric• Routing table: Landmark (LM2(d)), Level(2), Next hop

LM Hierarchy Definition

• Each LM (Li) associated with level (i) and radius (ri)

• Every node is an L0 landmark

• Recursion: some Li are also Li+1– every Li sees at least one Li+1

• Terminating state when all level j LMs see entire network

LM addresses

• LM(2).LM(1).LM(0) (x.a.b and y.a.b)

• LM level maps to radius (part of configuration)– LM level 0: radius 2

– LM level 1: radius 4

– LM level 2: radius 8

• If destination is more than two hops away, will not have complete routing information, refer to LM(1) portion of address, if not then refer to LM(2)..(c would forward based on y in y.a.b)

X

y

ab

c

LM Routing

• LM does not imply hierarchical forwarding

• It is NOT a source route

• En route to LM(1) may encounter router that is within LM(0) radius of destination address (like longest match)

• Paths may be asymmetric

LM self-configuration

• Bottom-up hierarchy construction algorithm– goal to bound number of children

• Every router is L0 landmark

• All routers advertise themselves over a distance

• All Li landmarks run election to self-promote one or more Li+1 landmarks

• Dynamic algorithm to adapt to topology changes--Efficient hierarchy

Landmark Routing: Basic Idea

Landmark Routing: Example

Inter-domain routing

BGP

Sources

• RFC1771: main BGP RFC

• RFC1772-3-4: application, experiences, and analysis of BGP

• RFC1965: AS confederations for BGP

• Christian Huitema’s book “Routing in the Internet”, chapters 8 and 9.

Autonomous systems

• What is an AS?– A set of routers under a single technical

administration, using an interior gateway protocol (IGP) and common metrics to route packets within the AS and using an exterior gateway protocol (EGP) to route packets to other AS’s.

– sometimes AS’s use multiple IGPs and metrics, but appear as single AS’s to other AS’s.

Example

1 2

3

1.11.2

2.1 2.2

3.1 3.2

2.2.1

44.1 4.2

5

5.1 5.2

EGP

IGP

EGPEGP

IGP

IGP

IGPIGP

EGPEGP

History

• Mid-80s: EGP– reachability protocol (no shortest path)– did not accommodate cycles (tree topology)– evolved when all networks connected to

ARPANET

• Limited size network topology

• Result: BGP introduced as routing protocol

Choices

• Link state or distance vector?– no universal metric - policy decisions

• Problems with distance-vector:– Bellman-Ford algorithm may not converge

• Problems with link state:– metric used by routers not the same - loops– LS database too large - entire Internet– may expose policies to other AS’s

Solution: Path Vectors

• Each routing update carries the entire path

• Loops are detected as follows:– when AS gets route check if AS already in path– if yes, reject route– if no, add self and advertise route further

• Advantage:– metrics are local - AS chooses path, protocol

ensures no loops

Problems

• Routing table size– need an entry for all paths to all networks

• Required memory= O(N + M*A) * K)– N: number of networks– M: mean AS distance– A: number of AS’s– K: number of BGP peers

• Problem reduced with CIDR

Routing table size

networks(NLRI)

mean ASdistance

# of AS’s BGPpeers/net

memory

2,100 5 59 3 27,000

4,000 10 100 6 108,000

10,000 15 300 10 490,000

100,000 20 3,000 20 1,040,000

Interior BGP peers

• IGP cannot propagate all the information required by BGP

• External routers in an AS use interior BGP (IBGP) connections to communicate

• External routers agree on routes and inform IGP

IBGP

Interconnecting BGP peers

• BGP uses TCP to connect peers

• Advantages:– BGP much simpler– no need for periodic refresh– incremental updates

• Disadvantages– congestion control on a routing protocol?

Hop-by-hop model

• BGP advertises to neighbors only those routes that it uses– consistent with the hop-by-hop Internet

paradigm– e.g., AS1 cannot tell AS2 to route to other AS’s

in a manner different than what AS2 has chosen (need source routing for that)

AS categories

– Stub: an AS that has only a single connection to one other AS - carries only local traffic.

– Multihomed: an AS that has connections to more than one AS, but refuses to carry transit traffic

– Transit: an AS that has connections to more than one AS, and carries both transit and local traffic (under certain policy restrictions)

Policy with BGP

• BGP provides capability for enforcing various policies

• Policies are not part of BGP: they are provided to BGP as configuration information

• BGP enforces policies by choosing paths from multiple alternatives and controlling advertisement to other AS’s

Examples of BGP policies

• A multihomed AS refuses to act as transit– limit path advertisement

• A multihomed AS can become transit for some AS’s– only advertise paths to some AS’s

• An AS can favor or disfavor certain AS’s for traffic transit from itself

BGP-4

• Latest version of BGP

• BGP-4 supports CIDR

Routing information bases (RIB)

• Routes are stored in RIBs

• Adj-RIBs-In: routing info that has been learned from other routers (unprocessed routing info)

• Loc-RIB: local routing information selected from Adj-RIBs-In (routes selected locally)

• Adj-RIBs-Out: info to be advertised to peers (routes to be advertised)

BGP common header

Length Type

0 1 2 3

Marker (security and message delineation)

Types: OPEN, UPDATE, NOTIFICATION, KEEPALIVE

Optional parameters <type, length, value>

BGP OPEN message

Length Type: update

0 1 2 3

Marker (security and message delineation)

versionMy autonomous system Hold time

BGP identifierParameter length

My AS: id assigned to that ASHold timer: max interval between KEEPALIVE or UPDATE messagesBGP ID: address of one interface (same for all messages)

BGP UPDATE message

Length Type: open

0 1 2 3

Marker (security and message delineation)

Withdrawn....routes len Withdrawn routes (variable)

Path attribute len Path attributes (variable)

Network layer reachability information (NLRI) (variable)

UPDATE message reports information on a SINGLE path,but can report multiple withdrawn routes

...

NLRI

• Network Level Reachability Information– list of IP address prefixes encoded as follows:

Length (1 byte) Prefix (variable)

Data

BGP NOTIFICATION message

Length Type: NOTIFICATION

0 1 2 3

Marker (security and message delineation)

Error code

Error sub-code

Used for error notification

BGP KEEPALIVE message

Length Type: KEEPALIVE

0 1 2 3

Marker (security and message delineation)

Sent periodically to peers to ensure connectivityIf hold_time is zero, messages are not sent

Policy routing

T Z XY

U V

Assume Y forbids T’s trafficT cannot reach X, but X can reach T!

Selecting the Best Path

• May be entirely manual or automated based on some configuration data

• Full set of attributes allows more sophisticated path selection

• Example Strategies:– hop count– assign weights (same in our border routers)– avoid EGP AS

Path Selection Criteria

• Information based on path attributes

• Attributes + external (policy) information

• Examples:– hop count– policy considerations– presence or absence of certain AS– path origin– link dynamics

Path Attributes

• Categories:– well-known mandatory (passed on)– well-known discretionary (passed on)– optional transitive (passed on)– optional non-transitive (if unrecognized, not

passed on)

Attribute Message Format

O T P E

Attribute flags Attribute type code

0

O: optional or well-knownT: transitive or localP: partially evaluatedE: length in 1 or 2 bytes

OriginAS_pathNext hopetc.

AS_PATH Attribute

• Well-known, mandatory

• Important components:– list of traversed AS’s

• If forwarding to internal peer:– do not modify AS_PATH attribute

• If forwarding to external peer:– prepend self into the path

Other Path Attributes

• ORIGIN: specifies the AS that originated the information- included in update messages of all who propagate this information

• NEXT_HOP: IP address of border router to be used as next hop

NEXT_HOP

A B C

D E F

AS borderAS X

AS Y

Suppose C, D are peers.C may want to indicate to Dsome paths for which next hopis either A or B

More Path Attributes

• LOCAL_PREF: provided by a BGP router to all other internal BGP routers. Denotes degree of preference for each destination.

UPDATE Message Handling

• Unrecognized, optional non-transitive attributes are ignored. Unrecognized optional transitive attributes cause the Partial bit to be set.

• WITHDRAWN routes are processed first

• Feasible routes are placed in Adj-RIB-In, replacing old ones if any.

Decision Process

• Calculate degree of preference for each route in Adj-RIB-In

• Choose best route, install in Loc-RIB

• Disseminate routes to peers, update Adj-RIB-Out

CIDR and BGP

AS X197.8.2.0/24

AS Y197.8.3.0/24

AS T (provider)197.8.0.0/23

AS Z

What should T announce to Z?

Options

• Advertise all paths:– Path 1: through T can reach 197.8.0.0/23– Path 2: through T can reach 197.8.2.0/24– Path 3: through T can reach 197.8.3.0/24

• But this does not reduce routing tables! We would like to advertise:– Path 1: through T can reach 197.8.0.0/22

Sets and Sequences

• Problem: what do we list in the route?– list T: omitting information- not acceptable,

may lead to loops– list T, X, Y: misleading, appears as 3-hop path

• Solution: restructure AS Path attribute as:– Path: (Sequence (T), Set (X, Y))– if Z wants to advertise path:

• Path: (Sequence (Z, T), Set (X, Y))

AS confederation

• A collection of AS’s advertised as a single AS number to BGP speakers that are not members of confederation

Establishing confederations

• Subdivide AS with large number of BGP speakers to smaller domains for purposes of controlling routing policy

• Reduce BGP interconnection in same AS

• May increase complexity of policy routing for all members of the Internet

• May increase path lengths

1 2

3

1.11.2

2.1 2.2

3.1 3.2

2.2.1

How can BGP express the following policies:2 will not act as transit to 32 will not accept packets sourced in 11 will use the green path for packets destined to 4 and the red for packets destined to 5

44.1 4.2

5

5.1 5.2

Tricky issues

• “Synchronizing” intra and inter-domain routing• Getting packets to the right exit router without

introducing too much flux into intra-domain routing

• Multi-homing– interaction with aggregation

• How much policy should we actually be able to support???

BGP Limitations: Policy

A

B

C

D

E

F

BGP Limitations: Oscillations

A

B C

D

top related