Mpls
Mpls
Switching
Computer Networks
Dr. Jorge A. Cobb
Background
It was meant to improve routing performance on the
Internet
• Routing is difficult using CIDR (longest prefix
matching)
2
What is it good for?
To enable IP capability on devices that cannot
handle IP traffic
3
Destination Based Forwarding
4
Labels for Destination-Based Forwarding
A label is allocated for each prefix in its table
• The label is chosen locally
• Think of them as indices into the routing table
9
Remarks (contd)
Most importantly, we can use ATM switches for IP
ATM
• Virtual circuit oriented
• Fixed packet (small 53 bytes), known as cells
• Special hardware for fast switching from input line to
output line
10
Placement of “labels”
11
IP over ATM (Before MPLS)
12
Why did we used to do this?
Was desirable because ATM switches had higher
throughput than IP routers
However:
• There is though a lot of ATM hardware still out there
• Plus ATM provides other features
• Circuit emulation, virtual circuit services
13
ATM switches as LSRs (using MPLS)
ATM switches are now “peers” of MPLS routers
14
Advantage of MPLS vs overlay
Each MPLS router has fewer “adjacencies” (i.e. neighbors)
15
How to send IP packets?
IP packets (big) are fragmented (cut up) into 48 byte
pieces
Each piece is added to an ATM cell and sent over
the VC to the “destination” (last switch in the ATM
path)
Packet is reassembled at destination
• We can use a special VCID (say 0) if the destination is
the next hop (for communication with my neighbor,
e.g., hello messages in OSPF)
• VCIDS for other destinations are setup in the same
way as we did in slides 5-8.
16
GMPLS
“Generalized” MPLS
17
Explicit Routing
Similar to “source routing” but done by a router
“Fish” network due to its shape
R1 -> R7 : R1 R3 R6 R7
R2 -> R7 : R2 R3 R4 R5 R7
• Perhaps we want to balance the load somehow
Cannot be done with regular IP
• IP routing does not look at the source of the message
18
Resource Reservation Protocol (RSVP)
How to establish a “labeled path” from R1 to R7 and
R2 to R7?
• (note: two labels at R3, one for R1 and one for R2)
Use RSVP
• It sets up a “path” from a source to a destination
• It reserves resources (optional)
• It is basically like setup of a VC in ATM
19
Explicit Route Advantages
Traffic Engineering
• You can control how much traffic travels through some
point in the network
• This is done by controlling the paths taken by traffic
Fast-rerouting
• You can bypass broken links quickly with explicit
routing.
• No need to wait for a routing protocol (OSPF) to react.
• How?
• Keep track of two paths, regular path and backup path
• If the regular path fails use the backup
20
Virtual Private Networks
We can do VPN’s with MPLS.
Let us review VPN’s’ with regular IP first.
Goal
• Controlled connectivity
Virtual Private Network
• A group of connected networks
• Connections may be over multiple networks not
belonging to the group (e.g. over the Internet)
• E.g., joining the networks of several branches of a
company into a “private internetwork”
21
Virtual Private Networks
C
A B
K L
M
C
K L
A B
M
22
Tunneling
IP Tunnel
• Virtual point-to-point link between an arbitrarily
connected pair of nodes
Network Network
1 Internetwork 2
R1 R2
IP Tunnel
10.0.0.1
IP Dest = 2.x IP Dest = 10.0.0.1 IP Dest = 2.x
IP Payload IP Dest = 2.x IP Payload
IP Payload
23
Tunneling
Advantages of tunneling
• Transparent transmission of packets over heterogeneous
networks
• Only need to change relevant routers (end points)
• Coupled with encryption, gives you a secure private
internetwork.
• End-points of tunnels my have features (multicast) not
available in other Internet routers.
• Useful for mobile routing.
Disadvantages
• Increases packet size
• Processing time needed to encapsulate and decapsulate
packets
• Management at tunnel-aware routers
24
Virtual Private Networks
We can do similarly with MPLS
We can connect different sites with an MPLS tunnel
We can send regular IP traffic through the tunnel, or
any other type of traffic.
25
“Layer 2” tunnel
Use MPLS to provide a tunnel between two
• LANs (Ethernet, etc)
• ATM points
Any data can be “wrapped” with a label
• It need not be IP datagrams
• LSR does not look “beyond” the label
26
Demultiplexing Label
What to do with the packet once it reaches
the other side of the tunnel?
27
E.g., Emulate a VC
ATM cells with a specific VCID come in at the
entrance of the tunnel
28
29
Emulate a VC (steps)
1. An ATM cell arrives to the input LSR with VCID 101
2. The head router attaches the demultiplexing label and
identifies the emulated circuit
3. The head router attaches the tunnel label (to reach the tail
router)
4. Routers in the middle forward as usual
5. The tail router removes the tunnel label, finds the
demultiplexing label, and identifies the VC
6. The tail router modifies the VCID to the next ATM switch
value (202) and sends it to the ATM switch.
30
Label Stacks
The previous example has a stack of two labels
In the example
• It enables to have a tunnel
• And many VC’s within the tunnel
31
“Layer 3” VPN’s
The packet being carried is an IP packet
• Hence the name “layer 3” VPNs
Service provider
• Has many customers
• Each customer has many sites
• These sites are linked with tunnels to appear to be one
large Internetwork
• Each customer can only reach its own sites
• The customer is isolated from the rest of the Internet
and from other customers
32
33