Upload
zhang-huajun
View
141
Download
3
Embed Size (px)
Citation preview
How Beacon WorksDavid Erickson
July 2011
The Bundle• Basic Building Block• JAR (zipfile)• May Contain
– Metadata*• META-INF/MANIFEST.MF
– Java Classes– Resources (xml, etc)– Other JAR files
Bundle
* Required
• 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
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(...) ...}
Advanced Bundles• Dynamic
– Stop, Start, Install, Replace while running
• Versioned– Can have multiple versions live simultaneously
• Explicit Dependencies– State which version(s) you need
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
How do Bundles interact?• Service Registry
Topology Routing
Service Registry
ITopologyService
Publishes Consumes
• 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;}
Pipeline
Core PacketIn
Decode
Stats
ETC
DeviceManager Topology Routing
PacketIn
PacketIn
Fully Multithreaded
Core
PacketIn
Decode
DeviceManager Topology Routing
Thread
Thread
Thread
• 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
Web UI Demo
Web UI Demo
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
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