41
Overlay Networks and Tunneling Reading: 4.5, 9.4 COS 461: Computer Networks Spring 2009 (MW 1:30‐2:50 in COS 105) Mike Freedman Teaching Assistants: WyaN Lloyd and Jeff Terrace hNp://www.cs.princeton.edu/courses/archive/spring09/cos461/ 1

Overlay Networks and · PDF fileOverlay Networks and Tunneling ... – Overlay links are tunnels through the underlying network ... • Underlay tunnels

Embed Size (px)

Citation preview

Page 1: Overlay Networks and  · PDF fileOverlay Networks and Tunneling ... – Overlay links are tunnels through the underlying network ... • Underlay tunnels

Overlay Networks and Tunneling Reading: 4.5, 9.4 

COS 461: Computer Networks Spring 2009 (MW 1:30‐2:50 in COS 105) 

Mike Freedman Teaching Assistants: WyaN Lloyd and Jeff Terrace 

hNp://www.cs.princeton.edu/courses/archive/spring09/cos461/ 

1

Page 2: Overlay Networks and  · PDF fileOverlay Networks and Tunneling ... – Overlay links are tunnels through the underlying network ... • Underlay tunnels

Goals of Today’s Lecture 

•  MoVvaVons for overlay networks –  Incremental deployment of new protocols 

– Customized rouVng and forwarding soluVons 

•  Overlays for parVal deployments – 6Bone, Mbone, security, mobility, … 

•  Resilient Overlay Network (RON) – AdapVve rouVng through intermediate node 

•  MulV‐protocol label switching (MPLS) – Tunneling at L2.5 

2

Page 3: Overlay Networks and  · PDF fileOverlay Networks and Tunneling ... – Overlay links are tunnels through the underlying network ... • Underlay tunnels

Overlay Networks 

3

Page 4: Overlay Networks and  · PDF fileOverlay Networks and Tunneling ... – Overlay links are tunnels through the underlying network ... • Underlay tunnels

Overlay Networks 

4

Page 5: Overlay Networks and  · PDF fileOverlay Networks and Tunneling ... – Overlay links are tunnels through the underlying network ... • Underlay tunnels

Overlay Networks 

5

Focus at the application level

Page 6: Overlay Networks and  · PDF fileOverlay Networks and Tunneling ... – Overlay links are tunnels through the underlying network ... • Underlay tunnels

IP Tunneling to Build Overlay Links 

•  IP tunnel is a virtual point‐to‐point link –  Illusion of a direct link between two separated nodes 

•  EncapsulaVon of the packet inside an IP datagram – Node B sends a packet to node E – … containing another packet as the payload 

6

A B E F tunnel Logical view:

Physical view: A B E F

Page 7: Overlay Networks and  · PDF fileOverlay Networks and Tunneling ... – Overlay links are tunnels through the underlying network ... • Underlay tunnels

Tunnels Between End Hosts 

7

A

C

B

Src: A Dest: B

Src: A Dest: B

Src: A Dest: C

Src: A Dest: B

Src: C Dest: B

Page 8: Overlay Networks and  · PDF fileOverlay Networks and Tunneling ... – Overlay links are tunnels through the underlying network ... • Underlay tunnels

Overlay Networks 

•  A logical network built on top of a physical network –  Overlay links are tunnels through the underlying network 

•  Many logical networks may coexist at once –  Over the same underlying network 

–  And providing its own parVcular service •  Nodes are o`en end hosts 

–  AcVng as intermediate nodes that forward traffic –  Providing a service, such as access to files 

•  Who controls the nodes providing service? –  The party providing the service  –  Distributed collecVon of end users 

8

Page 9: Overlay Networks and  · PDF fileOverlay Networks and Tunneling ... – Overlay links are tunnels through the underlying network ... • Underlay tunnels

Overlays for Incremental Deployment 

9

Page 10: Overlay Networks and  · PDF fileOverlay Networks and Tunneling ... – Overlay links are tunnels through the underlying network ... • Underlay tunnels

Using Overlays to Evolve the Internet 

•  Internet needs to evolve –  IPv6 – Security – Mobility – MulVcast 

•  But, global change is hard – CoordinaVon with many ASes – “Flag day” to deploy and enable the technology 

•  Instead, beNer to incrementally deploy – And find ways to bridge deployment gaps 

10

Page 11: Overlay Networks and  · PDF fileOverlay Networks and Tunneling ... – Overlay links are tunnels through the underlying network ... • Underlay tunnels

6Bone: Deploying IPv6 over IP4 

11

A B E F

IPv6 IPv6 IPv6 IPv6

tunnel Logical view:

Physical view: A B E F

IPv6 IPv6 IPv6 IPv6

C D

IPv4 IPv4

Flow: X Src: A Dest: F

data

Flow: X Src: A Dest: F

data

Flow: X Src: A Dest: F

data

Src:B Dest: E

Flow: X Src: A Dest: F

data

Src:B Dest: E

A-to-B: IPv6

E-to-F: IPv6 B-to-C:

IPv6 inside IPv4

B-to-C: IPv6 inside

IPv4

Page 12: Overlay Networks and  · PDF fileOverlay Networks and Tunneling ... – Overlay links are tunnels through the underlying network ... • Underlay tunnels

Secure CommunicaVon Over Insecure Links 

•  Encrypt packets at entry and decrypt at exit •  Eavesdropper cannot snoop the data •  … or determine the real source and desVnaVon 

12

Page 13: Overlay Networks and  · PDF fileOverlay Networks and Tunneling ... – Overlay links are tunnels through the underlying network ... • Underlay tunnels

CommunicaVng With Mobile Users •  A mobile user changes locaVons frequently 

–  So, the IP address of the machine changes o`en 

•  The user wants applicaVons to conVnue running –  So, the change in IP address needs to be hidden 

•  SoluVon: fixed gateway forwards packets –  Gateway has a fixed IP address –  … and keeps track of the mobile’s address changes 

13 gateway www.cnn.com

Page 14: Overlay Networks and  · PDF fileOverlay Networks and Tunneling ... – Overlay links are tunnels through the underlying network ... • Underlay tunnels

IP MulVcast 

•  MulVcast – Delivering the same data to many receivers – Avoiding sending the same data many Vmes 

•  IP mulVcast –  Special addressing, forwarding, and rouVng schemes 

14

unicast multicast

Page 15: Overlay Networks and  · PDF fileOverlay Networks and Tunneling ... – Overlay links are tunnels through the underlying network ... • Underlay tunnels

MBone: MulVcast Backbone •  A catch‐22 for deploying mulVcast 

–  Router vendors wouldn’t support IP mulVcast –  … since they weren’t sure anyone would use it –  And, since it didn’t exist, nobody was using it 

•  Idea: so`ware implemenVng mulVcast protocols –  And unicast tunnels to traverse non‐parVcipants 

15

Page 16: Overlay Networks and  · PDF fileOverlay Networks and Tunneling ... – Overlay links are tunnels through the underlying network ... • Underlay tunnels

MulVcast Today 

•  Mbone applicaVons starVng in early 1990s –  Primarily video conferencing, but no longer operaVonal 

•  SVll many challenges to deploying IP mulVcast –  Security vulnerabiliVes, business models, … 

•  ApplicaVon‐layer mulVcast is more prevalent –  Tree of servers delivering the content –  CollecVon of end hosts cooperaVng to delivery video 

•  Some mulVcast within individual ASes –  Financial sector: stock Vckers – Within campuses or broadband networks: TV shows –  Backbone networks: IPTV 

16

Page 17: Overlay Networks and  · PDF fileOverlay Networks and Tunneling ... – Overlay links are tunnels through the underlying network ... • Underlay tunnels

Case Study: Resilient Overlay Networks 

17

Page 18: Overlay Networks and  · PDF fileOverlay Networks and Tunneling ... – Overlay links are tunnels through the underlying network ... • Underlay tunnels

RON: Resilient Overlay Networks 

18

Premise: by building applicaVon overlay network, can increase performance and reliability of rouVng 

Two-hop (app-level) Berkeley-to-Princeton

route

app-layer router

Princeton Yale

Berkeley http://nms.csail.mit.edu/ron/

Page 19: Overlay Networks and  · PDF fileOverlay Networks and Tunneling ... – Overlay links are tunnels through the underlying network ... • Underlay tunnels

RON Circumvents Policy RestricVons 

•  IP rouVng depends on AS rouVng policies – But hosts may pick paths that circumvent policies 

19

USLEC

PU Patriot

ISP

me My home computer

Page 20: Overlay Networks and  · PDF fileOverlay Networks and Tunneling ... – Overlay links are tunnels through the underlying network ... • Underlay tunnels

RON Adapts to Network CondiVons 

•  Start experiencing bad performance – Then, start forwarding through intermediate host 

20

A

C

B

Page 21: Overlay Networks and  · PDF fileOverlay Networks and Tunneling ... – Overlay links are tunnels through the underlying network ... • Underlay tunnels

RON Customizes to ApplicaVons 

•  VoIP traffic: low‐latency path •  Bulk transfer: high‐bandwidth path 

21

A

C

B

bulk transfer

Page 22: Overlay Networks and  · PDF fileOverlay Networks and Tunneling ... – Overlay links are tunnels through the underlying network ... • Underlay tunnels

How Does RON Work? 

•  Keeping it small to avoid scaling problems –  A few friends who want beNer service –  Just for their communicaVon with each other 

–  E.g., VoIP, gaming, collaboraVve work, etc. 

•  Send probes between each pair of hosts 

22

A C

B

Page 23: Overlay Networks and  · PDF fileOverlay Networks and Tunneling ... – Overlay links are tunnels through the underlying network ... • Underlay tunnels

How Does RON Work? 

•  Exchange the results of the probes –  Each host shares results with every other host –  EssenVally running a link‐state protocol! –  So, every host knows the performance properVes 

•  Forward through intermediate host when needed 

23

A C

B B

Page 24: Overlay Networks and  · PDF fileOverlay Networks and Tunneling ... – Overlay links are tunnels through the underlying network ... • Underlay tunnels

RON Works in PracVce 

•  Faster reacVon to failure – RON reacts in a few seconds – BGP someVmes takes a few minutes 

•  Single‐hop indirect rouVng – No need to go through many intermediate hosts – One extra hop circumvents the problems 

•  BeNer end‐to‐end paths – CircumvenVng rouVng policy restricVons – SomeVmes the RON paths are actually shorter 

24

Page 25: Overlay Networks and  · PDF fileOverlay Networks and Tunneling ... – Overlay links are tunnels through the underlying network ... • Underlay tunnels

RON Limited to Small Deployments •  Extra latency through intermediate hops 

–  So`ware delays for packet forwarding –  PropagaVon delay across the access link 

•  Overhead on the intermediate node –  Imposing CPU and I/O load on the host –  Consuming bandwidth on the access link 

•  Overhead for probing the virtual links –  Bandwidth consumed by frequent probes –  Trade‐off between probe overhead and detecVon speed 

•  Possibility of causing instability – Moving traffic in response to poor performance – May lead to congesVon on the new paths 

25

Page 26: Overlay Networks and  · PDF fileOverlay Networks and Tunneling ... – Overlay links are tunnels through the underlying network ... • Underlay tunnels

We saw tunneling “on top of” IP. What about tunneling “below” IP? 

Introducing 

MulV‐Protocol Label Switching 

(MPLS) 

26

Page 27: Overlay Networks and  · PDF fileOverlay Networks and Tunneling ... – Overlay links are tunnels through the underlying network ... • Underlay tunnels

Why Tunnel? 

•  Reliability –  Fast Reroute, Resilient Overlay Networks (Akamai SureRoute) 

•  Flexibility –  Topology, protocol 

•  Stability (“path pinning”) –  E.g., for performance guarantees 

•  Security –  E.g., Virtual Private Networks (VPNs) 

•  Bypassing local network engineers –  Censoring regimes: China, Pakistan, … 

27

Page 28: Overlay Networks and  · PDF fileOverlay Networks and Tunneling ... – Overlay links are tunnels through the underlying network ... • Underlay tunnels

MPLS Overview 

•  Main idea: Virtual circuit –  Packets forwarded based only on circuit idenVfier 

Destination

Source 1

Source 2

Router can forward traffic to the same destination on different interfaces/paths. 28

Page 29: Overlay Networks and  · PDF fileOverlay Networks and Tunneling ... – Overlay links are tunnels through the underlying network ... • Underlay tunnels

MPLS Overview 

•  Main idea: Virtual circuit –  Packets forwarded based only on circuit idenVfier 

Destination

Source 1

Source 2

Router can forward traffic to the same destination on different interfaces/paths. 29

Page 30: Overlay Networks and  · PDF fileOverlay Networks and Tunneling ... – Overlay links are tunnels through the underlying network ... • Underlay tunnels

Circuit AbstracVon: Label Swapping 

•  Label‐switched paths (LSPs): Paths are “named” by the label at the path’s entry point 

•  At each hop, MPLS routers: –  Use label to determine outgoing interface, new label –  Thus, push/pop/swap MPLS headers that encapsulate IP 

•  Label distribu9on protocol: responsible for disseminaVng signalling informaVon 

A 1 2

3 A 2 D

Tag Out New

D

30

Page 31: Overlay Networks and  · PDF fileOverlay Networks and Tunneling ... – Overlay links are tunnels through the underlying network ... • Underlay tunnels

Reconsider security problem 

31

Page 32: Overlay Networks and  · PDF fileOverlay Networks and Tunneling ... – Overlay links are tunnels through the underlying network ... • Underlay tunnels

Layer 3 Virtual Private Networks 

•  Private communicaVons over a public network 

•  A set of sites that are allowed to communicate with each other 

•  Defined by a set of administraVve policies – Determine both connecVvity and QoS among sites – Established by VPN customers 

– One way to implement: BGP/MPLS VPN (RFC 2547) 

Page 33: Overlay Networks and  · PDF fileOverlay Networks and Tunneling ... – Overlay links are tunnels through the underlying network ... • Underlay tunnels

Layer 2 vs. Layer 3 VPNs 

•  Layer 2 VPNs can carry traffic for many different protocols, whereas Layer 3 is “IP only” 

•  More complicated to provision a Layer 2 VPN 

•  Layer 3 VPNs: potenVally more flexibility, fewer configuraVon headaches 

33

Page 34: Overlay Networks and  · PDF fileOverlay Networks and Tunneling ... – Overlay links are tunnels through the underlying network ... • Underlay tunnels

Layer 3 BGP/MPLS VPNs 

•  Isola9on: MulVple logical networks over a single, shared physical infrastructure 

•  Tunneling: Keeping routes out of the core 

VPN A/Site 1

VPN A/Site 2

VPN A/Site 3

VPN B/Site 2

VPN B/Site 1

VPN B/Site 3

CEA1

CEB3

CEA3

CEB2

CEA2 CE1B1

CE2B1

PE1

PE2

PE3

P1

P2

P3

10.1/16

10.2/16

10.3/16

10.1/16

10.2/16

10.4/16

BGP to exchange routes

MPLS to forward traffic

34

Page 35: Overlay Networks and  · PDF fileOverlay Networks and Tunneling ... – Overlay links are tunnels through the underlying network ... • Underlay tunnels

High‐Level Overview of OperaVon 

•  IP packets arrive at PE 

•  DesVnaVon IP address is looked   up in forwarding table 

•  Datagram sent to customer’s network using tunneling (i.e., an MPLS label‐switched path) 

35

PE1

PE2

PE3

Page 36: Overlay Networks and  · PDF fileOverlay Networks and Tunneling ... – Overlay links are tunnels through the underlying network ... • Underlay tunnels

BGP/MPLS VPN key components 

•  Forwarding in the core:  MPLS 

•  DistribuVng routes between PEs:  BGP 

•  IsolaVon: Keeping different VPNs from rouVng traffic over one another – Constrained distribuVon of rouVng informaVon – MulVple “virtual” forwarding tables 

•  Unique Addresses: VPN‐IPv4 extensions – RFC 2547:  Route DisVnguishers 

36

Page 37: Overlay Networks and  · PDF fileOverlay Networks and Tunneling ... – Overlay links are tunnels through the underlying network ... • Underlay tunnels

Virtual RouVng and Forwarding 

•  Separate tables per customer at each router 

10.0.1.0/24 RD: Purple

10.0.1.0/24 RD: Blue

10.0.1.0/24

10.0.1.0/24

Customer 1

Customer 2

Customer 2

Customer 1

37

Page 38: Overlay Networks and  · PDF fileOverlay Networks and Tunneling ... – Overlay links are tunnels through the underlying network ... • Underlay tunnels

Forwarding •  PE and P routers have BGP next‐hop reachability through the backbone IGP 

•  Labels are distributed through LDP (hop‐by‐hop) corresponding to BGP Next‐Hops  

•  Two‐Label Stack is used for packet forwarding •  Top label indicates Next‐Hop (interior label) •  Second label indicates outgoing interface / VRF (exterior label) 

IP Datagram Label 2

Label 1

Layer 2 Header

Corresponds to LSP of BGP next-hop (PE)

Corresponds to VRF/interface at exit

38

Page 39: Overlay Networks and  · PDF fileOverlay Networks and Tunneling ... – Overlay links are tunnels through the underlying network ... • Underlay tunnels

Forwarding in BGP/MPLS VPNs 

•  Step 1: Packet arrives at incoming interface 

– Site VRF determines BGP next‐hop and Label #2 

IP Datagram Label 2

•  Step 2: BGP next‐hop lookup, add corresponding LSP (also at site VRF) 

IP Datagram Label 2

Label 1

39

Page 40: Overlay Networks and  · PDF fileOverlay Networks and Tunneling ... – Overlay links are tunnels through the underlying network ... • Underlay tunnels

Layer 3 BGP/MPLS VPNs 

VPN A/Site 1

VPN A/Site 2

VPN A/Site 3

VPN B/Site 2

VPN B/Site 1

VPN B/Site 3

CEA1

CEB3

CEA3

CEB2

CEA2 CE1B1

CE2B1

PE1

PE2

PE3

P1

P2

P3

10.1/16

10.2/16

10.3/16

10.1/16

10.2/16

10.4/16

BGP to exchange routes

MPLS to forward traffic 40

Page 41: Overlay Networks and  · PDF fileOverlay Networks and Tunneling ... – Overlay links are tunnels through the underlying network ... • Underlay tunnels

Conclusions 

•  Overlay networks –  Tunnels between host computers –  Build networks “on top” of the Internet – Deploy new protocols and services –  Provide beNer control, flexibility, QoS, isolaVon, … 

•  Underlay tunnels – Across routers within AS –  Build networks “below” IP route –  Provide beNer control, flexibility, QoS, isolaVon, … 

•  Next Vme –  Peer‐to‐peer applicaVons 

41