inter-domain routing

58
Inter-Domain Routing

Upload: alpha

Post on 13-Jan-2016

40 views

Category:

Documents


0 download

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

Page 1: Inter-Domain Routing

Inter-Domain Routing

Page 2: 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

Page 3: Inter-Domain Routing

The Area Hierarchy

1 2

3

1.11.2

2.1 2.2

3.1 3.2

2.2.1

Page 4: Inter-Domain Routing

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

Page 5: Inter-Domain Routing

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

Page 6: Inter-Domain Routing

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

Page 7: Inter-Domain Routing

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

Page 8: Inter-Domain Routing

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)

Page 9: Inter-Domain Routing

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

Page 10: Inter-Domain Routing

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

Page 11: Inter-Domain Routing

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

Page 12: Inter-Domain Routing

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

Page 13: Inter-Domain Routing

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

Page 14: Inter-Domain Routing

Landmark Routing: Basic Idea

Page 15: Inter-Domain Routing

Landmark Routing: Example

Page 16: Inter-Domain Routing

Inter-domain routing

BGP

Page 17: Inter-Domain Routing

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.

Page 18: Inter-Domain Routing

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.

Page 19: Inter-Domain Routing

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

Page 20: Inter-Domain Routing

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

Page 21: Inter-Domain Routing

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

Page 22: Inter-Domain Routing

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

Page 23: Inter-Domain Routing

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

Page 24: Inter-Domain Routing

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

Page 25: Inter-Domain Routing

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

Page 26: Inter-Domain Routing

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?

Page 27: Inter-Domain Routing

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)

Page 28: Inter-Domain Routing

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)

Page 29: Inter-Domain Routing

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

Page 30: Inter-Domain Routing

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

Page 31: Inter-Domain Routing

BGP-4

• Latest version of BGP

• BGP-4 supports CIDR

Page 32: Inter-Domain Routing

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)

Page 33: Inter-Domain Routing

BGP common header

Length Type

0 1 2 3

Marker (security and message delineation)

Types: OPEN, UPDATE, NOTIFICATION, KEEPALIVE

Page 34: Inter-Domain Routing

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)

Page 35: Inter-Domain Routing

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

...

Page 36: Inter-Domain Routing

NLRI

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

Length (1 byte) Prefix (variable)

Page 37: Inter-Domain Routing

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

Page 38: Inter-Domain Routing

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

Page 39: Inter-Domain Routing

Policy routing

T Z XY

U V

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

Page 40: Inter-Domain Routing

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

Page 41: Inter-Domain Routing

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

Page 42: Inter-Domain Routing

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)

Page 43: Inter-Domain Routing

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.

Page 44: Inter-Domain Routing

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

Page 45: Inter-Domain Routing

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

Page 46: Inter-Domain Routing

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

Page 47: Inter-Domain Routing

More Path Attributes

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

Page 48: Inter-Domain Routing

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.

Page 49: Inter-Domain Routing

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

Page 50: Inter-Domain Routing

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?

Page 51: Inter-Domain Routing

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

Page 52: Inter-Domain Routing

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))

Page 53: Inter-Domain Routing

AS confederation

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

Page 54: Inter-Domain Routing

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

Page 55: Inter-Domain Routing

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

Page 56: Inter-Domain Routing

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???

Page 57: Inter-Domain Routing

BGP Limitations: Policy

A

B

C

D

E

F

Page 58: Inter-Domain Routing

BGP Limitations: Oscillations

A

B C

D