You are on page 1of 31

Intra-AS and Inter-AS routing

C.b

Gateways:

B.a
A.a

A.c
d
A

a
b

c
B

perform inter-AS
routing among
themselves
perform intra-AS
routers with other
routers in their
AS
network layer

inter-AS, intra-AS
routing in
gateway A.c

link layer
physical layer

Intra-AS and Inter-AS routing


C.b

a
Host
h1

A.a

Inter-AS
routing
between
A and B
A.c

d
c
b
A
Intra-AS routing
within AS A

B.a
a

c
B

Host
h2
b

Intra-AS routing
within AS B

Internet Structure
Today

Large corporation
Consumer ISP

Peering
point
Backbone service provider

Peering
point

Consumer ISP

Large corporation
Small
corporation

Consumer ISP

local traffic: traffic that originates at or terminates on


nodes within the autonomous system;
transit traffic: traffic that passes through an AS

EGP: Exterior Gateway Protocol


Overview
designed for tree-structured Internet
concerned with reachability, not optimal routes

Protocol messages
neighbor acquisition: one router requests that another
be its peer; peers exchange reachability information
neighbor reachability: one router periodically tests if
the another is still reachable; exchange HELLO/ACK
messages; uses a k-out-of-n rule
routing updates: peers periodically exchange their
routing tables (distance-vector)

BGP-4: Border Gateway Protocol


AS Types
stub AS: has a single connection to one other AS
carries local traffic only
multihomed AS: has connections to more than one AS
refuses to carry transit traffic
transit AS: has connections to more than one AS
carries both transit and local traffic

Why interdomain routing is an hard problem


Scalability problem: an Internet backbone router
must be able to forward any packet destined
anywhere in the Internet. CIDR has helped to
control the number of distinct prefixes but they are
of the order of 105
Autonomous nature of the domains. Each domain
may run its own interior routing protocols and can
uses any scheme to assign metrics to paths
Interdomain routing advertises only reachability
Issue of trust: provider A migth be unwilling to
believe certain advertisements from provider B for
fear that provider B will advertise erroneous
routing information.

The issue of policies


In interdomain routing there is the need to support
very flexible policies.
Examples
Use provider B only to reach these addresses
Use the path that crosses the fewest number of ASs
Use AS x in preference of AS y

Border Routers and BGP Speakers


Each AS has:
one or more border routers
one BGP speaker (not necessary a border
router) that advertises:
local networks
other reachable networks (transit AS only)
gives path information
1

BGP and border router


R1

R3
Autonomous System 1

R2
Border Router
R4

R5

Autonomous System 2

R6

Complete path advertisements


BGP does not belong to either of the two main
classes of routing protocols (distance-vector and
link-state protocols)
Unlike these protocols BGP advertises complete
paths as an enumerated list of ASs to reach a
particular network.
This is also necessary to enable policy decisions
It also enable routing loops to be readily
detected

BGP Example
Speaker for AS2 advertises reachability to P and Q
network 128.96, 192.4.153, 192.4.32, and 192.4.3, can be reached
directly from AS2
networks
192.12.69,
192.4.54,
192.4.23
can be
reached along
the path (AS1,
AS3).

Regional provider A
(AS 2)
Backbone network
(AS 1)
Regional provider B
(AS 3)

transit networks

Speaker for backbone advertises

Customer P
(AS 4)

128.96
192.4.153

Customer Q
(AS 5)

192.4.32
192.4.3

Customer R
(AS 6)

192.12.69

Customer S
(AS 7)

192.4.54
192.4.23

stub networks

networks 128.96, 192.4.153, 192.4.32, and 192.4.3 can be reached


along the path (AS1, AS2).

Speaker can cancel previously advertised paths

MultiProtocol Label Switching

Combine some of the properties of Virtual Circuits


with the flexibility and robusteness of Datagrams.
It relies on IP addresses and IP routing protocols to
do its job.
MPLS-enabled router forward packets by examining
relatively short,fixed-length labels, and these labels
have local scope, just like in a virtual circuit
network.

MPLS: what is it good for?


To enable IP capabilities on devices that do not
have the capability to forward IP datagrams in the
normal manner
To forward IP packets along explicit routes that
do not necessarily match those that normal IP
routing protocol would select
To support certain types of virtual private network
services
To improve performance

Destination-based forwarding
R3
10.1.1/24
R1

R2
0

1
0

Prefix
10.1.1
10.3.3

Interface
0
0

Prefix
10.1.1
10.3.3

R4

Interface
1
0

For sake of simplicity /24 is omitted in the pictures

10.3.3/24

When MPLS is enabled on a router the router allocates a label for each
prefix in its routing table and advertise both the label and the predix that it
represent to its neighboring routers.
The advertisement is carried in the Label Distribution Protocol
Advertise the
label and
their bindings

Label=15, Prefix=10.1.1 Please attach the label 15 to all packets sent


to me that are destined to prefix 10.1.1

R3

Label=16, Prefix=10.3.3

10.1.1/24
R1

R2
0

R4

0
Prefix
10.1.1
10.3.3

Interface
0
0

Label

Prefix

Interface

15
16

10.1.1
10.3.3

1
0

10.3.3/24

The labels can be chosen at the convenience of the allocating router

Advertising labels
R3
10.1.1/24
R1

R2
0

R4

0
Prefix

10.1.1
10.3.3

Interface

0
0

Remote
Label

15
16

Outgoing Label

Label

Prefix

Interface

15
16

10.1.1
10.3.3

1
0

10.3.3/24

Advertising labels
Label=24, Prefix=10.1.1

R3
10.1.1/24
R1

R2

R4

0
Prefix

Interface

Remote
Label

Label

Prefix

Interface

Remote
Label

10.1.1
10.3.3

0
0

15
16

15
16

10.1.1
10.3.3

1
0

24

Outgoing Label

Outgoing Label

10.3.3/24

Label switching
10.1.1/24
R3

LER
Label Edge Router
INFO

IP Dest
10.1.1.5

R1

INFO

IP Dest
10.1.1.5

15

R2

R4

0
Prefix

Interface

Remote
Label

Label

Prefix

Interface

Remote
Label

10.1.1
10.3.3

0
0

15
16

15
16

10.1.1
10.3.3

1
0

24

10.3.3/24

Label swapping
There is no need to examine the
IP header* at router R2:
10.1.1/24
exact Match using labels
R3

LER
Label Edge Router
INFO

IP Dest
10.1.1.5

IP Dest
10.1.1.5

INFO

R1

R2
0

24

R4

0
Prefix

Interface

Remote
Label

Label

Prefix

Interface

Remote
Label

10.1.1
10.3.3

0
0

15
16

15
16

10.1.1
10.3.3

1
0

24

10.3.3/24
* IP addresses are always of the same length but IP prefixes are of variable
length and the IP dest. addr. look-up algorithm needs to find the longest match

MPLS is a forwarding paradigm


Note that while the forwarding algorithm has changed from
longest match to exact match the routing algorithm can be any
standard IP routing algorithm (such as the one implemented in
OSPF) . The chosen path would be the same.
The major effect of changing the forwarding algorithm is that
devices that normally dont know how to forward IP packets
can be used in an MPLS network.
In this way ATM switches equipped by MPLS software can
become Label Switching Routers (LSR)

How to insert or use labels


5 Byte

ATM:
just use VPI/VCI
as labels

ATM Header
Format
Option 1

VPI
Label

PT

CLP

HEC

Label

Combined Label

Option 2
Option 3

VCI

ATM VPI (Tunnel)

Label

Q.922 Generic Encap.


Layer 3 Header and Packet
Header (PPP/LAN Format)

Frame
Relay
DLCI

C/ E
R A

DLCI

FE BE D E
CN CN E A

DLCI Size = 10, 17, 23 Bits

How to insert a label:


the shim header
PPP & LAN 802.3
MPLS Shim Headers (1-n)
n

1
Network Layer Header
and Info (IP or L3)

Layer 2 Header
(PPP, 802.3)

4 Byte

Label Stack
Entry Format

Label

Exp.

TTL

Label: Label Value, 20 bit (0-16 reserved)


0: IPv4 explicit null
1: Router alert
2: IPv6 explicit null
3: Implicit null
Exp.: Experimental, 3 bit (Class of Service nel Tag Switching)
S:
Bottom of Stack, 1 bit (1 = last entry in label stack)
TTL: Time to Live, 8 bit legato al TTL di IP

Overlay networks
R1

R6

R5

R2

ATM
Backbone
IP
Backbone

R3

R4
Five routing adjacencies

Overlay networks
Il routing L2 (ATM o FR)
implementa lingegneria del
traffico
A livello L3 si vedono solo
collegamenti diretti tra
router

Svantaggi:

L3

L3

L2
L3

L2

L2
L2
L3

costo maggiore
network management non integrato tra i due livelli
impossibilit di routing esplicito

L2

L2
L3

L3

Peer-to-peer networking
R1

R6

LSR1

LSR2

R5

R2
IP
Backbone

LSR3
R3

R4
Five routing adjacencies

27

Explicit Routing
IP routing is destination-based; IP has a source routing option
but limited in number of hops and processed outside the fast
path on most routers
R1

R6
R7

R3

R8

R2
R4

R5

FISH PICTURE
9

Explicit Routing
How do all the routers in the network agree on what labels to use
and how to forward packets with particular labels?
A new mechanism is needed. It turns out that the protocol used
for this task is the Resource Reservation Protocol (RSVP).
It is possible to send an RSVP message along an explicitly
specified path (e.g. R1-R3-R6-R7-R8) and use it to set up label
forwarding entries all along that path.
This is very similar to the process related to the opening packet
which establish a virtual circuit

On of the application of explicit routing is traffic


engineering

which refers to the task of ensuring that sufficient resources are


available in a network to meet the demands placed on it.

Fast reroute is another relevant application of


explicit routing. There are a range of algorithms that routers
can use to calculate explicit route automatically. The most common
is CSPF (Constrained Stortest Path First)

Virtual Private Networks and Tunnels


ATM Cells arrive

ATM Cells sent

Head

Tail

R1

R4
R2

R3
Tunneled data
arrives at tail

Pseudowire emulation
Tunnel header consist of an MPLS header rather than an IP header

Virtual Private Networks and Tunnels


1. ATM Cells arrive
101

6. ATM Cells sent

INFO

202

Head

Tail

R1

R4
R2

R3

2. Demux Label added


DL

101

Tunneled data
arrives at tail
5. Demux Label
examined

INFO

DL

3. Tunnel Label added


TL DL

101

INFO

INFO

4. Packet is forwarded to tail


TL DL

101

INFO

Pseudowire emulation
Labels can be stacked

101

INFO

L3 VPN
VPN A / Site 2
VPN B / Site 2
VPN B / Site 1

VPN B / Site 3

Provider Network
VPN A / Site 1

VPN A / Site 3
Virtually private networks

33

Architectural Evolution
L3

L3 Total mesh

L2
L3

L2
L2
L3

L3
L2

L2

L2

OVERLAY
MODEL

L3

L3

L3

L3

L2

L2
L2

L2
L3

PEER to PEER
MODEL

L2

L2

L3

L3

IP
ATM

IP/MPLS

IP/MPLS

SDH

ATM

SDH

IP/GMPLS

Optical

Optical

Optical

Optical

lower complexity in control & management planes

time

L3

You might also like