201107 how beacon works

15
How Beacon Works David Erickson July 2011

Upload: zhang-huajun

Post on 23-Oct-2014

137 views

Category:

Documents


3 download

TRANSCRIPT

Page 1: 201107 How Beacon Works

How Beacon WorksDavid Erickson

July 2011

Page 2: 201107 How Beacon Works

The Bundle• Basic Building Block• JAR (zipfile)• May Contain

– Metadata*• META-INF/MANIFEST.MF

– Java Classes– Resources (xml, etc)– Other JAR files

Bundle

* Required

Page 3: 201107 How Beacon Works

• Many Bundles

• Working togetherBeacon

Beacon is…

BundleBundle Bundle BundleBundle Bundle Bundle Bundle

BundleBundle Bundle BundleBundle Bundle Bundle Bundle

BundleBundle Bundle BundleBundle Bundle Bundle Bundle

BundleBundle Bundle BundleBundle Bundle Bundle Bundle

BundleBundle Bundle BundleBundle Bundle Bundle Bundle

BundleBundle Bundle BundleBundle Bundle Bundle Bundle

BundleBundle Bundle BundleBundle Bundle Bundle Bundle

Page 4: 201107 How Beacon Works

What can Bundles do?• Share their Java Packages

– Export-Package: net.beaconcontroller.core

• Consume other Java Packages– Import-Package: org.openflow.protocol

• Extend other Bundles– Fragments

• Run Codepublic void start() {        listenSock = ServerSocketChannel.open();        new Thread(...)        ...}

Page 5: 201107 How Beacon Works

Advanced Bundles• Dynamic

– Stop, Start, Install, Replace while running

• Versioned– Can have multiple versions live simultaneously

• Explicit Dependencies– State which version(s) you need

Page 6: 201107 How Beacon Works

What Bundles are available?• Third party, basically anything

– Just a JAR file with Metadata– Some may need YOU to generate the Metadata– Logging, Web Server, JSON parsing, Web framework, etc

• Beacon centric– OpenFlowJ (OF 1.0 Protocol)– Packet encoder/decoder (Ethernet, ARP, IPv4, LLDP, TCP, UDP)– Core, Learning Switch, Hub, Device Manager– Topology, Layer 2 Shortest Path Routing– ARP Proxy, DHCP Proxy, Multicast eliminator– Declarative routing (upload a text file)– Web UI

Page 7: 201107 How Beacon Works

How do Bundles interact?• Service Registry

Topology Routing

Service Registry

ITopologyService

Publishes Consumes

Page 8: 201107 How Beacon Works

• Core bundle connects switches• Core publishes IBeaconProvider• Other bundles use IBP

• Creates a pipeline…

protected IBeaconProvider beaconProvider;     public void startUp() {        beaconProvider.addOFMessageListener(OFType.PACKET_IN, this);    }

How does the core work?

Core

LearningSwitch

IBeaconProvider

“PacketIns Please!”

public Command receive(IOFSwitch sw, OFMessage msg) {        OFPacketIn pi = (OFPacketIn) msg; …                 return Command.CONTINUE;}

Page 9: 201107 How Beacon Works

Pipeline

Core PacketIn

Decode

Stats

ETC

DeviceManager Topology Routing

Page 10: 201107 How Beacon Works

PacketIn

PacketIn

Fully Multithreaded

Core

PacketIn

Decode

DeviceManager Topology Routing

Thread

Thread

Thread

Page 11: 201107 How Beacon Works

• Not as far as we can tell• Only gets faster, free JVM improvements

But wait isn’t Java slow?

Cbench Test, part of Oflops suite– PacketIn to PacketOut/FlowMod

throughput test, fills controller input buffers

– 10 loops, 32 switches, 10s per loop

Test Machine– CPU: 1 x Intel Core i7 930 @ 3.33ghz,

9GB RAM, Ubuntu 10.04.1 x64

Controllers– Beacon, NOX (Destiny branch), Maestro

http://www.openflow.org/wk/index.php/Controller_Performance_Comparisons

Page 12: 201107 How Beacon Works

Web UI Demo

Page 13: 201107 How Beacon Works

Web UI Demo

Page 14: 201107 How Beacon Works

Stable?

• Powering commercial controller offering– Multiple test deployments including Stanford’s network

• Running DNRC– 100 switches– Last 8 months

• Powering multiple internal and external research projects

• No known critical bugs

Page 15: 201107 How Beacon Works

Resources

• Wiki– https://openflow.stanford.edu/display/Beacon/Home

• Bugtracker– https://openflow.stanford.edu/bugs/browse/BEACON

• Forum– https://openflow.stanford.edu/forums/forum/4-beacon-general/

• Web Code Browser (At 1.0 release..)• ME! Active development