Inter-Autonomous-System Routing: Border Gateway Protocol · Routing Goal: each router u must be...

Preview:

Citation preview

Inter-Autonomous-System Routing:

Border Gateway Protocol

Antonio Carzaniga

Faculty of InformaticsUniversity of Lugano

June 14, 2005

c© 2005 Antonio Carzaniga

Outline

Hierarchical routing

BGP

c© 2005 Antonio Carzaniga

Routing

c© 2005 Antonio Carzaniga

Routing

Goal: each router u must be able to compute, for each otherrouter v , the next-hop neighbor x that is on the least-cost pathfrom u to v

c© 2005 Antonio Carzaniga

Routing

Goal: each router u must be able to compute, for each otherrouter v , the next-hop neighbor x that is on the least-cost pathfrom u to v

u

v

x1x2

x3

x4

c© 2005 Antonio Carzaniga

Network Model

c© 2005 Antonio Carzaniga

Network Model

So far we have studied routing over a “flat” network model

c© 2005 Antonio Carzaniga

Network Model

So far we have studied routing over a “flat” network model

a b c

d e f

g h j

Also, our objective has been to find the lowest-cost pathsbetween sources and destinations

c© 2005 Antonio Carzaniga

Network Model

So far we have studied routing over a “flat” network model

a b c

d e f

g h j

3 4

3 9

211 1 1

1 1 24

14

Also, our objective has been to find the lowest-cost pathsbetween sources and destinations

c© 2005 Antonio Carzaniga

More Realistic Topologies

c© 2005 Antonio Carzaniga

More Realistic Topologies

c© 2005 Antonio Carzaniga

Even More Realistic

c© 2005 Antonio Carzaniga

Even More Realistic

c ©20

01St

ephe

nCo

ast

c© 2005 Antonio Carzaniga

An Internet Map

c©1999 Lucent Technologies

c© 2005 Antonio Carzaniga

Higher-Level Objectives

c© 2005 Antonio Carzaniga

Higher-Level Objectives

ScalabilityI hundreds of millions of hosts in today’s Internet

c© 2005 Antonio Carzaniga

Higher-Level Objectives

ScalabilityI hundreds of millions of hosts in today’s InternetI transmitting routing information (e.g., LSAs) would be too

expensive

c© 2005 Antonio Carzaniga

Higher-Level Objectives

ScalabilityI hundreds of millions of hosts in today’s InternetI transmitting routing information (e.g., LSAs) would be too

expensiveI forwarding would also be too expensive

c© 2005 Antonio Carzaniga

Higher-Level Objectives

ScalabilityI hundreds of millions of hosts in today’s InternetI transmitting routing information (e.g., LSAs) would be too

expensiveI forwarding would also be too expensive

Administrative autonomy

c© 2005 Antonio Carzaniga

Higher-Level Objectives

ScalabilityI hundreds of millions of hosts in today’s InternetI transmitting routing information (e.g., LSAs) would be too

expensiveI forwarding would also be too expensive

Administrative autonomyI one organization might want to run a distance-vector routing

protocol, while another might want to run a link-state protocol

c© 2005 Antonio Carzaniga

Higher-Level Objectives

ScalabilityI hundreds of millions of hosts in today’s InternetI transmitting routing information (e.g., LSAs) would be too

expensiveI forwarding would also be too expensive

Administrative autonomyI one organization might want to run a distance-vector routing

protocol, while another might want to run a link-state protocolI an organization might not want to expose its internal network

structure

c© 2005 Antonio Carzaniga

Hierarchical Structure

Today’s Internet is organized in autonomous systems (ASs)

I independent administrative domains

c© 2005 Antonio Carzaniga

Hierarchical Structure

Today’s Internet is organized in autonomous systems (ASs)

I independent administrative domains

Gateway routers connect an autonomous system with otherautonomous systems

c© 2005 Antonio Carzaniga

Hierarchical Structure

Today’s Internet is organized in autonomous systems (ASs)

I independent administrative domains

Gateway routers connect an autonomous system with otherautonomous systems

An intra-autonomous system routing protocol runs within anautonomous system

I this protocol determines internal routesI internal router ↔ internal routerI internal router ↔ gateway routerI gateway router ↔ gateway router

c© 2005 Antonio Carzaniga

Inter-AS Routing

An inter-autonomous system routing protocol determines routingat the autonomous-system level

c© 2005 Antonio Carzaniga

Inter-AS Routing

An inter-autonomous system routing protocol determines routingat the autonomous-system level

Once computed by the gateway routers, inter-AS routinginformation is propagated within an autonomous system

I all routers use both inter-AS and intra-AS routes to compile theirforwarding tables

c© 2005 Antonio Carzaniga

Hierarchical Routing

Destinations within the same autonomous system are reachedas usual

c© 2005 Antonio Carzaniga

Hierarchical Routing

Destinations within the same autonomous system are reachedas usual

What about a destination x outside the autonomous system?

c© 2005 Antonio Carzaniga

Hierarchical Routing

Destinations within the same autonomous system are reachedas usual

What about a destination x outside the autonomous system?

I routers use inter-AS information to figure out that destination x isreachable through gateway Gx

c© 2005 Antonio Carzaniga

Hierarchical Routing

Destinations within the same autonomous system are reachedas usual

What about a destination x outside the autonomous system?

I routers use inter-AS information to figure out that destination x isreachable through gateway Gx

I routers use intra-AS information to figure how to send the packetto Gx

c© 2005 Antonio Carzaniga

Hierarchical Routing

Destinations within the same autonomous system are reachedas usual

What about a destination x outside the autonomous system?

I routers use inter-AS information to figure out that destination x isreachable through gateway Gx

I routers use intra-AS information to figure how to send the packetto Gx

I in cases in which x is reachable through multiple gateway routersGx , G′

X , . . ., routers use the closest gatewayI “hot-potato” routing

c© 2005 Antonio Carzaniga

Benefits of Hierarchical Routing

Administrative autonomy

c© 2005 Antonio Carzaniga

Benefits of Hierarchical Routing

Administrative autonomyI each autonomous system decides what intra-AS routing to use

c© 2005 Antonio Carzaniga

Benefits of Hierarchical Routing

Administrative autonomyI each autonomous system decides what intra-AS routing to useI an autonomous system needs to expose only minimal information

about the internal structure of its networkI essentially only (sub)net addresses

c© 2005 Antonio Carzaniga

Benefits of Hierarchical Routing

Administrative autonomyI each autonomous system decides what intra-AS routing to useI an autonomous system needs to expose only minimal information

about the internal structure of its networkI essentially only (sub)net addresses

Scalability

c© 2005 Antonio Carzaniga

Benefits of Hierarchical Routing

Administrative autonomyI each autonomous system decides what intra-AS routing to useI an autonomous system needs to expose only minimal information

about the internal structure of its networkI essentially only (sub)net addresses

ScalabilityI routers within an autonomous system need to know very little

about the internal structure of other autonomous systems

c© 2005 Antonio Carzaniga

Benefits of Hierarchical Routing

Administrative autonomyI each autonomous system decides what intra-AS routing to useI an autonomous system needs to expose only minimal information

about the internal structure of its networkI essentially only (sub)net addresses

ScalabilityI routers within an autonomous system need to know very little

about the internal structure of other autonomous systemsI essentially only (sub)net addresses

c© 2005 Antonio Carzaniga

Benefits of Hierarchical Routing

Administrative autonomyI each autonomous system decides what intra-AS routing to useI an autonomous system needs to expose only minimal information

about the internal structure of its networkI essentially only (sub)net addresses

ScalabilityI routers within an autonomous system need to know very little

about the internal structure of other autonomous systemsI essentially only (sub)net addresses

External subnet addresses are likely to “aggregate” in groupsthat admit compact representations

I this process is called supernettingc© 2005 Antonio Carzaniga

Inter-AS Routing in the Internet

c© 2005 Antonio Carzaniga

Inter-AS Routing in the Internet

The Border Gateway Protocol (BGP) is the inter-AS routingprotocol in today’s Internet

c© 2005 Antonio Carzaniga

Inter-AS Routing in the Internet

The Border Gateway Protocol (BGP) is the inter-AS routingprotocol in today’s Internet

I provides reachability information from neighbor ASs

c© 2005 Antonio Carzaniga

Inter-AS Routing in the Internet

The Border Gateway Protocol (BGP) is the inter-AS routingprotocol in today’s Internet

I provides reachability information from neighbor ASsI transmits reachability information to all internal routers within an

AS

c© 2005 Antonio Carzaniga

Inter-AS Routing in the Internet

The Border Gateway Protocol (BGP) is the inter-AS routingprotocol in today’s Internet

I provides reachability information from neighbor ASsI transmits reachability information to all internal routers within an

ASI determines good routes to all outside subnets

c© 2005 Antonio Carzaniga

Inter-AS Routing in the Internet

The Border Gateway Protocol (BGP) is the inter-AS routingprotocol in today’s Internet

I provides reachability information from neighbor ASsI transmits reachability information to all internal routers within an

ASI determines good routes to all outside subnets

I based on reachability information

c© 2005 Antonio Carzaniga

Inter-AS Routing in the Internet

The Border Gateway Protocol (BGP) is the inter-AS routingprotocol in today’s Internet

I provides reachability information from neighbor ASsI transmits reachability information to all internal routers within an

ASI determines good routes to all outside subnets

I based on reachability informationI based on policies

c© 2005 Antonio Carzaniga

Inter-AS Routing in the Internet

The Border Gateway Protocol (BGP) is the inter-AS routingprotocol in today’s Internet

I provides reachability information from neighbor ASsI transmits reachability information to all internal routers within an

ASI determines good routes to all outside subnets

I based on reachability informationI based on policies

I BGP is a distance-vector protocol (or better path-vector)

c© 2005 Antonio Carzaniga

BGP Architecture and Terminology

BGP session: a semi-permanent connection between tworouters

c© 2005 Antonio Carzaniga

BGP Architecture and Terminology

BGP session: a semi-permanent connection between tworouters

BGP peers: two routers engaged in a BGP sessionI BGP sessions are established over TCP

c© 2005 Antonio Carzaniga

BGP Architecture and Terminology

BGP session: a semi-permanent connection between tworouters

BGP peers: two routers engaged in a BGP sessionI BGP sessions are established over TCP

BGP external session (eBGP): a session across twoautonomous systems

c© 2005 Antonio Carzaniga

BGP Architecture and Terminology

BGP session: a semi-permanent connection between tworouters

BGP peers: two routers engaged in a BGP sessionI BGP sessions are established over TCP

BGP external session (eBGP): a session across twoautonomous systems

BGP internal session (iBGP): a session within an autonomoussystem

I note that internal sessions carry inter-AS informationI intra-AS routing is a separate protocol (e.g., OSPF)

c© 2005 Antonio Carzaniga

BGP Architecture and Terminology (2)

BGP advertisement: a router advertises a routes to networks,much like an entry in a distance-vector

I destinations are denoted by address prefixes

c© 2005 Antonio Carzaniga

BGP Architecture and Terminology (2)

BGP advertisement: a router advertises a routes to networks,much like an entry in a distance-vector

I destinations are denoted by address prefixesI an AS may or may not forward an advertisement for a foreign

network. Doing so means being willing to carry traffic for thatnetwork

c© 2005 Antonio Carzaniga

BGP Architecture and Terminology (2)

BGP advertisement: a router advertises a routes to networks,much like an entry in a distance-vector

I destinations are denoted by address prefixesI an AS may or may not forward an advertisement for a foreign

network. Doing so means being willing to carry traffic for thatnetwork

I this is where a router may aggregate prefixes (a.k.a.,“supernetting”)E.g.,

128.138.242.0/24128.138.243.0/24

}

→ 128.138.242.0/23

c© 2005 Antonio Carzaniga

BGP Architecture and Terminology (2)

BGP advertisement: a router advertises a routes to networks,much like an entry in a distance-vector

I destinations are denoted by address prefixesI an AS may or may not forward an advertisement for a foreign

network. Doing so means being willing to carry traffic for thatnetwork

I this is where a router may aggregate prefixes (a.k.a.,“supernetting”)E.g.,

128.138.242.0/24128.138.243.0/24

}

→ 128.138.242.0/23

191.224.128.0/22191.224.136.0/21191.224.132.0/22

c© 2005 Antonio Carzaniga

BGP Architecture and Terminology (2)

BGP advertisement: a router advertises a routes to networks,much like an entry in a distance-vector

I destinations are denoted by address prefixesI an AS may or may not forward an advertisement for a foreign

network. Doing so means being willing to carry traffic for thatnetwork

I this is where a router may aggregate prefixes (a.k.a.,“supernetting”)E.g.,

128.138.242.0/24128.138.243.0/24

}

→ 128.138.242.0/23

191.224.128.0/22191.224.136.0/21191.224.132.0/22

→ 191.224.128.0/20

c© 2005 Antonio Carzaniga

BGP Architecture and Terminology (2)

Autonomous system number (ASN): a unique identifier for eachAS (with more than one gateway)

c© 2005 Antonio Carzaniga

BGP Architecture and Terminology (2)

Autonomous system number (ASN): a unique identifier for eachAS (with more than one gateway)

BGP attributes: a route advertisement includes a number ofattributes

I AS-PATH: sequence of ASNs through which the advertisementhas been sent

c© 2005 Antonio Carzaniga

BGP Architecture and Terminology (2)

Autonomous system number (ASN): a unique identifier for eachAS (with more than one gateway)

BGP attributes: a route advertisement includes a number ofattributes

I AS-PATH: sequence of ASNs through which the advertisementhas been sent

I NEXT-HOP: specifies the interface to use to forward packetstowards the advertised destination. This is used to resolveambiguous cases where an AS can be reached through multiplegateways (interfaces)

c© 2005 Antonio Carzaniga

Route Selection

1. Router preference: routes are ranked according to a preferencevalue

I configured at the routerI or learned from another router within the same ASI essentially a configuration parameter for the AS

c© 2005 Antonio Carzaniga

Route Selection

1. Router preference: routes are ranked according to a preferencevalue

I configured at the routerI or learned from another router within the same ASI essentially a configuration parameter for the AS

2. Shortest AS-PATH

c© 2005 Antonio Carzaniga

Route Selection

1. Router preference: routes are ranked according to a preferencevalue

I configured at the routerI or learned from another router within the same ASI essentially a configuration parameter for the AS

2. Shortest AS-PATH

3. Closest NEXT-HOP router

c© 2005 Antonio Carzaniga

Route Selection

1. Router preference: routes are ranked according to a preferencevalue

I configured at the routerI or learned from another router within the same ASI essentially a configuration parameter for the AS

2. Shortest AS-PATH

3. Closest NEXT-HOP router

4. . . .

c© 2005 Antonio Carzaniga

Recommended