cs 268: active networks & overlay networks ion stoica april 12, 2004 (* active networks based in...

47
CS 268: Active Networks & Overlay Networks Ion Stoica April 12, 2004 (* Active networks based in part on David Wheterall presentation from SOSP ’

Post on 20-Dec-2015

214 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: CS 268: Active Networks & Overlay Networks Ion Stoica April 12, 2004 (* Active networks based in part on David Wheterall presentation from SOSP ’99)

CS 268: Active Networks & Overlay Networks

Ion Stoica

April 12, 2004

(* Active networks based in part on David Wheterall presentation from SOSP ’99)

Page 2: CS 268: Active Networks & Overlay Networks Ion Stoica April 12, 2004 (* Active networks based in part on David Wheterall presentation from SOSP ’99)

[email protected] 2

Overview

Active Networks Overlay Networks

Page 3: CS 268: Active Networks & Overlay Networks Ion Stoica April 12, 2004 (* Active networks based in part on David Wheterall presentation from SOSP ’99)

[email protected] 3

Motivations

Changes in the network happen very slowly Why?

- Network services are end-to-end

• At the limit, a service has to be supported by all routers along the path

• Chicken-and-egg problem: if there aren’t enough routers supporting the service, end-hosts won’t benefit

- Internet network is a shared infrastructure

• Need to achieve consensus (IETF)

Page 4: CS 268: Active Networks & Overlay Networks Ion Stoica April 12, 2004 (* Active networks based in part on David Wheterall presentation from SOSP ’99)

[email protected] 4

Motivations

Proposed changes that haven’t happened yet on a large scale:

- IP security (IPSEC ‘93)

- More addresses (IPv6 ‘91)

- Multicast (IP multicast ‘90)

Page 5: CS 268: Active Networks & Overlay Networks Ion Stoica April 12, 2004 (* Active networks based in part on David Wheterall presentation from SOSP ’99)

[email protected] 5

Goals

Make it easy to deploy new functionalities in the network accelerate the pace of innovation

Allow users to customize their services

Page 6: CS 268: Active Networks & Overlay Networks Ion Stoica April 12, 2004 (* Active networks based in part on David Wheterall presentation from SOSP ’99)

[email protected] 6

Solution

Active networks (D. Tannenhouse and D. Wetherall ’96): - Routers can download and execute remote code

- At extreme, allow each user to control its packets

User 2:Multicast

User 1:RED

Page 7: CS 268: Active Networks & Overlay Networks Ion Stoica April 12, 2004 (* Active networks based in part on David Wheterall presentation from SOSP ’99)

[email protected] 7

An Active Node Toolkit: ANTS

Add active nodes to infrastructure

IP routers Active nodes

Page 8: CS 268: Active Networks & Overlay Networks Ion Stoica April 12, 2004 (* Active networks based in part on David Wheterall presentation from SOSP ’99)

[email protected] 8

Active Nodes

Provide environment for running service code- Soft-storage, routing, packet manipulation

Ensure safety- Protect state at node; enforce packet invariants

Manage local resources- Bound code runtimes and other resource

consumptions

Page 9: CS 268: Active Networks & Overlay Networks Ion Stoica April 12, 2004 (* Active networks based in part on David Wheterall presentation from SOSP ’99)

[email protected] 9

Where Is the Code?

Packets carry the code- Maximum flexibility

- High overhead

Packets carry reference to the code

- Reference is based on the code fingerprint: MD5 (128 bits)

- Advantages:

• Efficient: MD5 is quick to compute

• Prevents code spoofing: verify without trust

packet

code

packet

code

reference

Page 10: CS 268: Active Networks & Overlay Networks Ion Stoica April 12, 2004 (* Active networks based in part on David Wheterall presentation from SOSP ’99)

[email protected] 10

Code Distribution

End-systems pre-load code Active nodes load code on demand and then

cache it

previousnode

loadingnode

request

time

packet

coderesponses

packet

Page 11: CS 268: Active Networks & Overlay Networks Ion Stoica April 12, 2004 (* Active networks based in part on David Wheterall presentation from SOSP ’99)

[email protected] 11

Lesson Learned

Applications Performance Security and resource management

Page 12: CS 268: Active Networks & Overlay Networks Ion Stoica April 12, 2004 (* Active networks based in part on David Wheterall presentation from SOSP ’99)

[email protected] 12

Applications

Well-suited to implement protocol variations But not to enforce global policies and resource

control (e.g., fire-walls and QoS)- Need a central authority to implement these

functionalities

Application examples: auctions, reliable multicast, mobility,…

Page 13: CS 268: Active Networks & Overlay Networks Ion Stoica April 12, 2004 (* Active networks based in part on David Wheterall presentation from SOSP ’99)

[email protected] 13

Performances

ANTS implemented in Java In common case little overhead:

- Extra steps over IP (classification, safe eval) run very fast

Enough cycles to run simple programs- e.g. 1GHz, 1Gbps, 1000b packets, 100% 1000 cycles;

10% 10000 cycles

Page 14: CS 268: Active Networks & Overlay Networks Ion Stoica April 12, 2004 (* Active networks based in part on David Wheterall presentation from SOSP ’99)

[email protected] 14

Security and Resource Mgmt.

Untrusted users need to isolate their actions

Protection: make sure that one program does not corrupt other program

- Node level protection

- Network level protection

Page 15: CS 268: Active Networks & Overlay Networks Ion Stoica April 12, 2004 (* Active networks based in part on David Wheterall presentation from SOSP ’99)

[email protected] 15

Node Level Protection

Relatively easy to solve- Allocate resources among users and control their usage

• Fair Queueing, per-flow buffer allocation

- Use light weight mechanisms: sand-box, safe-type languages, Proof Carrying Code (PCC):

• PCC can also provide timeliness guarantees e.g., can demonstrate that an operation cannot take more time/space than a predifined constant

Note: fundamental trade-off between protection and flexibility - Example: if a node uses FQ to provide bandwidth protection, it will

constrain the delays experienced by a user

Page 16: CS 268: Active Networks & Overlay Networks Ion Stoica April 12, 2004 (* Active networks based in part on David Wheterall presentation from SOSP ’99)

[email protected] 16

Network Level Protection

More difficult to achieve Challenge: enforce global behavior of a program

only with local checks and control Main problem: programs very flexible. Active

nodes can:- Affect routing behavior (e.g., mobile IP)

- Generate new packets (e.g. multicast)

Page 17: CS 268: Active Networks & Overlay Networks Ion Stoica April 12, 2004 (* Active networks based in part on David Wheterall presentation from SOSP ’99)

[email protected] 17

Examples

Loops as a result of routing changes Resource wastage as a result of misbehaving multicast

programs- Multicast height k, a node can generate up to m copies total

number of packets can be O(mk) !

Local solutions not enough- TTL too weak; unaware about topology

- Fair Queueing offers only local protection

Page 18: CS 268: Active Networks & Overlay Networks Ion Stoica April 12, 2004 (* Active networks based in part on David Wheterall presentation from SOSP ’99)

[email protected] 18

Solution

Program certification by a central authority Limitations:

- Slows innovation, but still better than what we have today

- Dealing with a misbehaving node still remains difficult

Page 19: CS 268: Active Networks & Overlay Networks Ion Stoica April 12, 2004 (* Active networks based in part on David Wheterall presentation from SOSP ’99)

[email protected] 19

Restricting Active Networks

Allow only administrators, or privileged users to inject code

- Router plugins, active bridge

Restrict affecting only the control plane increase network manageability

- SmartPackets

- Netscript

Page 20: CS 268: Active Networks & Overlay Networks Ion Stoica April 12, 2004 (* Active networks based in part on David Wheterall presentation from SOSP ’99)

[email protected] 20

Summary

Active networks - A revolutionary paradigm

- Explores a significant region of the networking architecture design space

But is the network layer the right level to deploy it?

Page 21: CS 268: Active Networks & Overlay Networks Ion Stoica April 12, 2004 (* Active networks based in part on David Wheterall presentation from SOSP ’99)

[email protected] 21

Overview

Active Networks Overlay Networks

Page 22: CS 268: Active Networks & Overlay Networks Ion Stoica April 12, 2004 (* Active networks based in part on David Wheterall presentation from SOSP ’99)

[email protected] 22

Definition

Network- Define addressing, routing, and

service model for communication between hosts

Overlay network- A network built on top of one or

more existing networks- Add an additional layer of

indirection/virtualization- Change properties in one or more

areas of underlying network Alternative

- Change an existing network layer

Page 23: CS 268: Active Networks & Overlay Networks Ion Stoica April 12, 2004 (* Active networks based in part on David Wheterall presentation from SOSP ’99)

[email protected] 23

A Historical Example

Internet is an overlay network- Goal: connect local area networks

- Built on local area networks (e.g., Ethernet), phone lines

- Add an Internet Protocol header to all packets

Page 24: CS 268: Active Networks & Overlay Networks Ion Stoica April 12, 2004 (* Active networks based in part on David Wheterall presentation from SOSP ’99)

[email protected] 24

Benefits

Do not have to deploy new equipment, or modify existing software/protocols

- Probably have to deploy new software on top of existing software

- E.g., adding IP on top of Ethernet does not require modifying Ethernet protocol or driver

- Allow bootstrapping

• Expensive to develop entirely new networking hardware/software

• All networks after the telephone have begun as overlay networks

Page 25: CS 268: Active Networks & Overlay Networks Ion Stoica April 12, 2004 (* Active networks based in part on David Wheterall presentation from SOSP ’99)

[email protected] 25

Benefits

Do not have to deploy at every node- Not every node needs/wants overlay network service all

the time

• e.g., QoS guarantees for best-effort traffic

- Overlay network may be too heavyweight for some nodes

• e.g., consumes too much memory, cycles, or bandwidth

- Overlay network may have unclear security properties

• e.g., may be used for service denial attack

- Overlay network may not scale

• e.g. may require n2 state or communication

Page 26: CS 268: Active Networks & Overlay Networks Ion Stoica April 12, 2004 (* Active networks based in part on David Wheterall presentation from SOSP ’99)

[email protected] 26

Costs

Adds overhead- Adds a layer in networking stack

• Additional packet headers, processing

- Sometimes, additional work is redundant

• E.g., an IP packet contains both Ethernet (48 + 48 bits) and IP addresses (32 + 32 bits)

• Eliminate Ethernet addresses from Ethernet header and assume IP header(?)

Adds complexity- Layering does not eliminate complexity, it only manages it

- More layers of functionality more possible unintended interaction between layers

- E.g., corruption drops on wireless interpreted as congestion drops by TCP

Page 27: CS 268: Active Networks & Overlay Networks Ion Stoica April 12, 2004 (* Active networks based in part on David Wheterall presentation from SOSP ’99)

[email protected] 27

Applications

Mulicast- This lecture

Mobility Routing Addressing Security

Page 28: CS 268: Active Networks & Overlay Networks Ion Stoica April 12, 2004 (* Active networks based in part on David Wheterall presentation from SOSP ’99)

[email protected] 28

Problems with IP Multicast

Scales poorly with number of groups- A router must maintain state for every group that

traverses it Supporting higher level functionality is difficult

- IP Multicast: best-effort multi-point delivery service- Reliability and congestion control for IP Multicast

complicated• Scalable, end-to-end approach for heterogeneous

receivers is very difficult• Hop-by-hop approach requires more state and

processing in routers Deployment is difficult and slow

- ISP’s reluctant to turn on IP Multicast

Page 29: CS 268: Active Networks & Overlay Networks Ion Stoica April 12, 2004 (* Active networks based in part on David Wheterall presentation from SOSP ’99)

[email protected] 29

Overlay Multicast

Provide multicast functionality above the IP layer, overlay or application level multicast

Challenge: do this efficiently Narada [Yang-hua et al, 2000]

- Multi-source multicast

- Involves only end hosts

- Small group sizes <= hundreds of nodes

- Typical application: chat

Page 30: CS 268: Active Networks & Overlay Networks Ion Stoica April 12, 2004 (* Active networks based in part on David Wheterall presentation from SOSP ’99)

[email protected] 30

Narada: End System Multicast

Stanford

CMU

Stan1

Stan2

Berk2

Overlay TreeGatech

Berk1

Berkeley

GatechStan1

Stan2

CMU

Berk1

Berk2

Page 31: CS 268: Active Networks & Overlay Networks Ion Stoica April 12, 2004 (* Active networks based in part on David Wheterall presentation from SOSP ’99)

[email protected] 31

Potential Benefits

Scalability- Routers do not maintain per-group state

- End systems do, but they participate in very few groups

Easier to deploy- Only requires adding software to end hosts

Potentially simplifies support for higher level functionality- Use hop-by-hop approach, but end hosts are routers

- Leverage computation and storage of end systems

- E.g., packet buffering, transcoding of media streams, ACK aggregation

- Leverage solutions for unicast congestion control and reliability

Page 32: CS 268: Active Networks & Overlay Networks Ion Stoica April 12, 2004 (* Active networks based in part on David Wheterall presentation from SOSP ’99)

[email protected] 32

End System Multicast: Narada

A distributed protocol for constructing efficient overlay trees among end systems

Caveat: assume applications with small and sparse groups

- Around tens to hundreds of members

Page 33: CS 268: Active Networks & Overlay Networks Ion Stoica April 12, 2004 (* Active networks based in part on David Wheterall presentation from SOSP ’99)

[email protected] 33

Performance Concerns

Duplicate Packets:

Bandwidth Wastage

CMU

Stan1

Stan2

Berk2

Gatech

Berk1

Delay from CMU to

Berk1 increases

Stanford

Berkeley

GatechStan1

Stan2

CMU

Berk1

Berk2

Page 34: CS 268: Active Networks & Overlay Networks Ion Stoica April 12, 2004 (* Active networks based in part on David Wheterall presentation from SOSP ’99)

[email protected] 34

Overlay Tree

The delay between the source and receivers is small Ideally,

- The number of redundant packets on any physical link is low Heuristic:

- Every member in the tree has a small degree

- Degree chosen to reflect bandwidth of connection to Internet

Gatech

“Efficient” overlay

CMU

Berk2

Stan1

Stan2

Berk1Berk1

High degree (unicast)

Berk2

Gatech

Stan2CMU

Stan1

Stan2

High latency

CMU

Berk2

Gatech

Stan1

Berk1

Page 35: CS 268: Active Networks & Overlay Networks Ion Stoica April 12, 2004 (* Active networks based in part on David Wheterall presentation from SOSP ’99)

[email protected] 35

Overlay Construction Problems

Dynamic changes in group membership - Members may join and leave dynamically

- Members may die

Dynamic changes in network conditions and topology

- Delay between members may vary over time due to congestion, routing changes

Knowledge of network conditions is member specific

- Each member must determine network conditions for itself

Page 36: CS 268: Active Networks & Overlay Networks Ion Stoica April 12, 2004 (* Active networks based in part on David Wheterall presentation from SOSP ’99)

[email protected] 36

Solution

Two step design- Build a mesh that includes all participating end-hosts

• What they call a mesh is just a graph

• Members probe each other to learn network related information

• Overlay must self-improve as more information available

- Build source based distribution trees

Page 37: CS 268: Active Networks & Overlay Networks Ion Stoica April 12, 2004 (* Active networks based in part on David Wheterall presentation from SOSP ’99)

[email protected] 37

Mesh

Advantages:- Offers a richer topology robustness; don’t need to

worry to much about failures

- Don’t need to worry about cycles

Desired properties - Members have low degrees

- Shortest path delay between any pair of members along mesh is small

Berk2 Berk1

CMU

Gatech

Stan1Stan2

Page 38: CS 268: Active Networks & Overlay Networks Ion Stoica April 12, 2004 (* Active networks based in part on David Wheterall presentation from SOSP ’99)

[email protected] 38

Overlay Trees

Source routed minimum spanning tree on mesh Desired properties

- Members have low degree

- Small delays from source to receivers

Berk2 GatechBerk1

Stan1Stan2

Berk2 Berk1

CMU

Gatech

Stan1Stan2

Page 39: CS 268: Active Networks & Overlay Networks Ion Stoica April 12, 2004 (* Active networks based in part on David Wheterall presentation from SOSP ’99)

[email protected] 39

Narada Components/Techniques

Mesh Management: - Ensures mesh remains connected in face of membership changes

Mesh Optimization:- Distributed heuristics for ensuring shortest path delay between

members along the mesh is small

Tree construction:- Routing algorithms for constructing data-delivery trees

- Distance vector routing, and reverse path forwarding

Page 40: CS 268: Active Networks & Overlay Networks Ion Stoica April 12, 2004 (* Active networks based in part on David Wheterall presentation from SOSP ’99)

[email protected] 40

Optimizing Mesh Quality

Members periodically probe other members at random New link added if

Utility_Gain of adding link > Add_Threshold

Members periodically monitor existing links Existing link dropped if

Cost of dropping link < Drop Threshold

Berk1

Stan2CMU

Gatech1

Stan1

Gatech2

A poor overlay topology:Long path from Gatech2 to CMU

Page 41: CS 268: Active Networks & Overlay Networks Ion Stoica April 12, 2004 (* Active networks based in part on David Wheterall presentation from SOSP ’99)

[email protected] 41

Definitions

Utility gain of adding a link based on- The number of members to which routing delay improves

- How significant the improvement in delay to each member is

Cost of dropping a link based on- The number of members to which routing delay increases, for either

neighbor

Add/Drop Thresholds are functions of:- Member’s estimation of group size

- Current and maximum degree of member in the mesh

Page 42: CS 268: Active Networks & Overlay Networks Ion Stoica April 12, 2004 (* Active networks based in part on David Wheterall presentation from SOSP ’99)

[email protected] 42

Desirable properties of heuristics

Stability: A dropped link will not be immediately re-added Partition avoidance: A partition of the mesh is unlikely to be

caused as a result of any single link being dropped

Delay improves to Stan1, CMU

but marginally.

Do not add link!

Delay improves to CMU, Gatech1

and significantly.

Add link!

Berk1

Stan2CMU

Gatech1

Stan1

Gatech2

Probe

Berk1

Stan2CMU

Gatech1

Stan1

Gatech2Probe

Page 43: CS 268: Active Networks & Overlay Networks Ion Stoica April 12, 2004 (* Active networks based in part on David Wheterall presentation from SOSP ’99)

[email protected] 43

Example

Used by Berk1 to reach only Gatech2 and vice versa: Drop!

Gatech1Berk1

Stan2CMU

Stan1

Gatech2

Gatech1Berk1

Stan2CMU

Stan1

Gatech2

Page 44: CS 268: Active Networks & Overlay Networks Ion Stoica April 12, 2004 (* Active networks based in part on David Wheterall presentation from SOSP ’99)

[email protected] 44

Simulation Results

Simulations- Group of 128 members

- Delay between 90% pairs < 4 times the unicast delay

- No link caries more than 9 copies

Experiments- Group of 13 members

- Delay between 90% pairs < 1.5 times the unicast delay

Page 45: CS 268: Active Networks & Overlay Networks Ion Stoica April 12, 2004 (* Active networks based in part on David Wheterall presentation from SOSP ’99)

[email protected] 45

NARADA Summary

End-system multicast (NARADA) : aimed to small-sized groups

- Application example: chat

Multi source multicast model No need for infrastructure Properties

- low performance penalty compared to IP Multicast

- potential to simplify support for higher layer functionality

- allows for application-specific customizations

Page 46: CS 268: Active Networks & Overlay Networks Ion Stoica April 12, 2004 (* Active networks based in part on David Wheterall presentation from SOSP ’99)

[email protected] 46

Other Projects

Overcast [Jannotti et al, 2000]- Single source tree

- Uses an infrastructure; end hosts are not part of multicast tree

- Large groups ~ millions of nodes

- Typical application: content distribution Scattercast (Chawathe et al, UC Berkeley)

- Emphasis on infrastructural support and proxy-based multicast

- Uses a mesh like Narada, but differences in protocol details Yoid (Paul Francis, Cornell)

- Uses a shared tree among participating members

- Distributed heuristics for managing and optimizing tree constructions

Page 47: CS 268: Active Networks & Overlay Networks Ion Stoica April 12, 2004 (* Active networks based in part on David Wheterall presentation from SOSP ’99)

[email protected] 47

Active Networks vs. Overlay Networks

Key difference:- Active nodes operate at the network layer; overlay nodes operate

at the application layer- Active network leverage IP routing between active nodes; Overlay

networks control routing between overlay nodes Active Networks advantages:

- Efficiency: no need to tunnel packets; no need to process packets at layers other than the network layer

Overlay Network advantages:- Easier to deploy: no need to integrate overlay nodes in the

network infrastructure• Active nodes have to collaborated (be trusted) by the other

routers in the same AS (they need to exchange routing info)