ebook img

DTIC ADA579328: Language Abstractions for Software-Defined Networks PDF

0.37 MB·English
Save to my drive
Quick download
Download
Most books are stored in the elastic cloud where traffic is expensive. For this reason, we have a limit on daily download.

Preview DTIC ADA579328: Language Abstractions for Software-Defined Networks

Language Abstractions for Software-Defined Networks NateFoster MichaelJ.Freedman RobHarrison ChristopherMonsanto CornellUniversity PrincetonUniversity USMilitaryAcademy PrincetonUniversity MarkReitblatt JenniferRexford AlecStory DavidWalker CornellUniversity PrincetonUniversity CornellUniversity PrincetonUniversity 1. Introduction Traditional Network For the past 30 years, networks have been built the same way: out of special-purpose devices running distributed al- Switch Control Plane gorithms that provide functionality such as topology dis- . Data Plane covery, routing, traffic monitoring, and access control. Re- cent years, however, have seen growing interest in a new kindofnetworkarchitectureinwhichalogically-centralized controller machine manages a distributed collection of programmable switches. These software-defined networks . Software-Defined Network (SDNs) make it possible for programmers to directly con- trol the behavior of the network by configuring the packet- Controller forwarding rules installed on switches [6]. Figure 1 depicts Programmable Machine Switch . the architecture of a traditional network, where each inde- pendentswitchconsistsoftightly-integratedcontrolanddata planes, and of an SDN, where a collection of switches are managedbyasingleprogramrunningonthecontroller.1 SDNs both simplify existing applications and also pro- . videaplatformfordevelopingexcitingnewones.Forexam- Figure1. Networkarchitectures. ple, to implement shortest-path routing, the controller can calculate the forwarding rules for each switch by running thebehaviorofanetworkatasuitablyhigh-levelofabstrac- Dijkstra’s algorithm on the graph of the network topology tion, leaving tedious implementation details to a compiler rather than running a more complicated distributed proto- and run-time system. This paper summarizes the results of col [9]. To enforce a fine-grained access control policy, the our initial efforts, focusing on three areas where language- controller can consult an external authentication server and basedabstractionscanbeleveragedtoprovidetangibleben- install a custom forwarding path for each user [2]. And to efitstoprogrammers. balancetheloadbetweenback-endserversinadatacenter, the controller can migrate flows in response to server load 2. NetworkPolicyAbstractions andnetworkcongestion[10]. AlthoughSDNsprovideanarchitecturethatmakesitpos- Today’s SDN controllers support an event-driven program- sibletoprogramacollectionofswitches,thenetworkisstill mingmodelinwhichprogramsreacttonetworkevents(e.g., adistributedsystem,andalloftheusualcomplicationsarise: topologychanges,packetsforwhichaswitchdoesnothave control messages may be delayed or lost, packets may be a forwarding rule, etc.) by manipulating the rules installed dropped, and the devices may experience unexpected fail- onswitches,orbycraftingpacketstoemitontothenetwork. ures.Unfortunately,currentSDNplatformssuchasNOX[4] Thiscomplicatesprogramsinseveralways.Foronething,it and Beacon [1] provide a low-level interface that supports splitscontrolbetweentwolevelsofexecution—theprogram manipulating the state of individual devices, but little else. on the controller and the rules on the switches. Program- Hence,writingapplicationsforSDNstodayisatediousex- mers must constantly consider whether installing or unin- erciseinlow-leveldistributedprogramming. stalling rules will mask future events received at the con- ThegoaloftheFreneticprojectistodevelopdeclarative troller, and they must explicitly coordinate multiple asyn- constructsthatmakeitpossibleforprogrammerstodescribe chronous events to perform simple tasks (e.g., discovering the switches connected to a particular link). For another, it 1Thecontrollermaybereplicatedforscalabilityandfaulttolerance[5]. forces programmers to manage a host of low-level details Report Documentation Page Form Approved OMB No. 0704-0188 Public reporting burden for the collection of information is estimated to average 1 hour per response, including the time for reviewing instructions, searching existing data sources, gathering and maintaining the data needed, and completing and reviewing the collection of information. Send comments regarding this burden estimate or any other aspect of this collection of information, including suggestions for reducing this burden, to Washington Headquarters Services, Directorate for Information Operations and Reports, 1215 Jefferson Davis Highway, Suite 1204, Arlington VA 22202-4302. Respondents should be aware that notwithstanding any other provision of law, no person shall be subject to a penalty for failing to comply with a collection of information if it does not display a currently valid OMB control number. 1. REPORT DATE 3. DATES COVERED JAN 2012 2. REPORT TYPE 00-00-2012 to 00-00-2012 4. TITLE AND SUBTITLE 5a. CONTRACT NUMBER Language Abstractions for Software-Defined Networks 5b. GRANT NUMBER 5c. PROGRAM ELEMENT NUMBER 6. AUTHOR(S) 5d. PROJECT NUMBER 5e. TASK NUMBER 5f. WORK UNIT NUMBER 7. PERFORMING ORGANIZATION NAME(S) AND ADDRESS(ES) 8. PERFORMING ORGANIZATION Princeton University,Department of Computer REPORT NUMBER Science,Princeton,NJ,08544 9. SPONSORING/MONITORING AGENCY NAME(S) AND ADDRESS(ES) 10. SPONSOR/MONITOR’S ACRONYM(S) 11. SPONSOR/MONITOR’S REPORT NUMBER(S) 12. DISTRIBUTION/AVAILABILITY STATEMENT Approved for public release; distribution unlimited 13. SUPPLEMENTARY NOTES Proc. Workshop on Languages for Distributed Algorithms (LADA ’12) Philadelphia, PA, January 2012. U.S. Government or Federal Rights License 14. ABSTRACT 15. SUBJECT TERMS 16. SECURITY CLASSIFICATION OF: 17. LIMITATION OF 18. NUMBER 19a. NAME OF ABSTRACT OF PAGES RESPONSIBLE PERSON a. REPORT b. ABSTRACT c. THIS PAGE Same as 3 unclassified unclassified unclassified Report (SAR) Standard Form 298 (Rev. 8-98) Prescribed by ANSI Std Z39-18 involvingtheswitchhardware(e.g.,whethertousewildcard 4. ConsistentUpdateAbstractions or exact-match rules to implement the desired forwarding Our most recent work on Frenetic focuses on the problem policy, and the values to use for rule timeouts and priority ofimplementingupdatestonetworkpolicy.ManySDNpro- levels). Frenetic’s NetCore policy language abstracts away grams need to transition from one policy to another (e.g., from many of these details involving the underlying dis- due to topology changes, planned maintenance, or unex- tributed system [7]. Instead of having to write programs in pected failures). From the perspective of the programmer, termsoflow-levelnetworkeventsandforwardingrules,Net- it would be ideal if such transitions could be propagated Coreprogrammerswriteasimplespecificationthatcaptures atomically to the switches in the network. But atomic up- theintendedforwardingbehaviorofthenetwork.Thecom- datesareimpracticaltoimplement—theywouldrequiredis- pilerpartitionsthisspecificationintosuitablecodefragments rupting the operation of the network during the update. We forthecontrollerandtheswitches.Italsogeneratesthecom- have been developing consistency abstractions that allow municationpatternsbetweenthecontrollerandswitches,us- programmers to specify how updates to policy should be ingarun-timesystemthathandlesthebookkeepingrelated propagatedtothedevicesinthenetwork[8].Theseabstrac- toinstallinganduninstallingindividualforwardingrules.A tions are strong enough to provide useful guarantees about notablefeatureofNetCoreisthatitallowspoliciestobede- applicationbehaviors,andyetrelaxedenoughtoadmitprac- scribedintermsofarbitraryfunctionsthatcannotbedirectly tical implementations. For example, per-packet consistency realized on switches. To handle such policies, the compiler ensuresthateverypacketflowingthroughthenetworkuses generates an underapproximation of the overall policy us- a single version of the policy and not a mixture of old and ingasimplestaticanalysis,andthenusespartialevaluation new policies. This preserves all properties that can be ex- to refine the underapproximation at run time using the ac- pressed in terms of individual packets and the paths they tualpacketsseeninthenetwork.Lastly,NetCorehasaclear take through the network—a class of properties that sub- formal semantics that provides a basis for reasoning about sumesimportantstructuralinvariantssuchasbasicconnec- programs. tivity and loop-freedom, as well as access control policies. Going a step further, per-flow consistency ensures that sets 3. NetworkQueryAbstractions of related packets are processed with the same policy. This canbeusedtoenforcerichpropertiesincludingtheordering AnothercomplicationinSDNprogramstodayconcernsthe of packets within a flow. It is also needed for applications implementation of monitoring policies. Each switch main- suchasloadbalancers,whichneedtoensurethatpacketsin tains counters for each forwarding rule that keeps track of thesameflowreachthesamedestinationtoavoidbreaking the total number of packets and bytes processed using it. connections.Freneticprovidesanidealplatformforexplor- To monitor traffic, the controller can poll the counters as- ing such abstractions, as the compiler and run-time system sociated with particular rules. However, programmers must can be used to perform the tedious bookkeeping related to ensure that the rules installed on switches are fine-grained implementingnetworkupdates.Forexample,toprovideper- enough to collect the desired traffic statistics. For instance, packet consistency, the run-time system can generate rules to monitor the total amount of web traffic, the program- that tag packets with policy-version numbers and use two- mermustinstallrulesthatprocess(andcount)trafficinvolv- phasecommittopropagaterulestoswitches.Per-flowcon- ingTCPport80separatelyfromallothertraffic.Managing sistency can be implemented in similar fashion, with some thesedetailsistediousandmakesprogramsanti-modular— additional analysis to identify existing flows. We are cur- the rules generated by one module may be too coarse to rentlyworkingtoextendourcompilerandrun-timesystem be executed side-by-side with a different module. To sup- withtheseabstractions. port applications whose correct operation involves a moni- toringcomponent,Freneticincludesanembeddedquerylan- 5. ExampleFreneticApplication guage that provides effective abstractions for reading net- work state [3]. This language, which has syntax reminis- Figure 2 presents code for a Frenetic application that: (1) centofSQL,includesconstructsforselecting,filtering,split- learns the locations of hosts on the network, (2) forwards ting,merging,andaggregatingthestreamsofpacketsflow- packets to known destinations, (3) floods packets to un- ing through the network. Importantly, the language allows known destinations, and (4) periodically reports the largest queries to be composed with each other and with forward- k sourcesoftraffic.Spaceconstraintsprecludegivingafull ing policies, without any harmful interference. Again, the explanationofthecode.Detailscanbefoundintheoriginal technologythatmakesthispossibleisthecompilerandrun- paper on Frenetic [3]. Note however that the program does timesystem,whichgeneratesswitch-levelrulesguaranteed not include any code that explicitly manipulates low-level to correctly implement all queries and the overall forward- switchstate,sendscontrolmessagestoswitches,orhandles ingpolicy.Thecompileralsogeneratesthecontrolmessages asynchronous network events. Instead, the entire program and handlers needed to query and tabulate the counters on consists of a few declarative specifications that are com- switches. posedtogetherinasimpleandelegantway. ##################### ####################### # Ethernet learning # # Top-k heavy hitters # ##################### ####################### # Store learned mac addresses in table # Constants def learn_mac(((switch,mac),packet),table): K = 2 table[switch][mac] = inport(header(packet)) WINDOW = 15 return table # Store new values in stats # Convert table to policy def tabulate_stats(new,stats): def make_policy(table): for host,bytes in new.items(): policy = defaultdict(lambda:[]) stats[host] += int(bytes) for switch,learned in table.items(): return stats patterns = false_fp() for mac,port in learned.items(): # Convert stats to list of top-k hosts rule = Rule(dstmac_fp(mac),[forward(port)]) def topK(stats): policy[switch].append(rule) l = sorted(stats.items(), key=lambda x:x[1]) patterns = patterns | dstmac_fp(mac) l.reverse() flood_rule = Rule(true_fp() - patterns,[flood()]) return l[:K] policy[switch].append(flood_rule) return policy # Initial stats init_stats = defaultdict(lambda:0) # Initial table init_table = defaultdict(lambda:{}) # Main function def heavy_hitters(): # Main function q = Select(’sizes’) * \ def ethernet_learning(): GroupBy([’srcmac’]) * \ q = Select(’packets’) * \ Every(WINDOW) GroupBy([’switch’,’srcmac’]) * \ sf = Accum(init_stats, tabulate_stats) >> \ SplitWhen([’inport’]) * \ Lift(topK) Limit(1) return q >> sf >> Print() sf = Accum(init_table,learn_mac) >> \ Lift(make_policy) return q >> sf >> Register() Figure2. Exampleapplication:Ethernetlearningandtop-kheavyhitters. Acknowledgments OurworkissupportedinpartbyONR tionnetworks. InUSENIXSymposiumonOperatingSystems grantN00014-09-1-0770andNSFgrantsCNS-1111698and Design and Implementation (OSDI), Vancouver, BC, pages CNS-1111520. Any opinions, findings, and recommenda- 351–364,October2010. tions are those of the authors and do not necessarily reflect [6] Nick McKeown, Tom Anderson, Hari Balakrishnan, Guru theviewsoftheNSF,ONR,ortheUSMilitaryAcademy. Parulkar,LarryPeterson,JenniferRexford,ScottShenker,and JonathanTurner. Openflow:Enabling innovationin campus References networks. SIGCOMMCCR,38(2):69–74,2008. [1] Beacon: A java-based OpenFlow control platform. See [7] ChristopherMonsanto,NateFoster,RobHarrison,andDavid http://www.beaconcontroller.net,December2011. Walker. A compiler and run-time system for network pro- gramming languages. In ACM SIGPLAN–SIGACT Sym- [2] Martin Casado, Michael J. Freedman, Justin Pettit, Jianying posium on Principles of Programming Languages (POPL), Luo,NatashaGude,NickMcKeown,andScottShenker. Re- Philadelphia,PA,January2012. Toappear. thinkingenterprisenetworkcontrol. IEEE/ACMTransactions onNetworking,17(4),August2009. [8] Mark Reitblatt, Nate Foster, Jennifer Rexford, and David Walker. Consistent updates for software-defined networks: [3] NateFoster,RobHarrison,MichaelJ.Freedman,Christopher Changeyoucanbelievein!InACMWorkshoponACMWork- Monsanto, Jennifer Rexford, Alec Story, and David Walker. shop on Hot Topics in Networks Programmable Routers for Frenetic: A network programming language. In ACM SIG- ExtensibleServicesofTomorrow(HotNets),Cambridge,MA, PLANInternationalConferenceonFunctionalProgramming November2011. (ICFP),Tokyo,Japan,September2011. [9] Scott Shenker, Martin Casado, Teemu Koponen, and Nick [4] Natasha Gude, Teemu Koponen, Justin Pettit, Ben Pfaff, McKeown.Thefutureofnetworkingandthepastofprotocols, Mart´ın Casado, Nick McKeown, and Scott Shenker. NOX: October2011. InvitedtalkatOpenNetworkingSummit. Towardsanoperatingsystemfornetworks. SIGCOMMCCR, 38(3),2008. [10] Richard Wang, Dana Butnariu, and Jennifer Rexford. OpenFlow-basedserverloadbalancinggonewild. InWork- [5] TeemuKoponen,MartinCasado,NatashaGude,JeremyStri- shop on Hot Topics in Management of Internet, Cloud, and bling,LeonPoutievski,MinZhu,RajivRamanathan,Yuichiro Enterprise Networks and Services (Hot-ICE), Boston, MA, Iwata, Hiroaki Inoue, Takayuki Hama, and Scott Shenker. Onix: A distributed control platform for large-scale produc- March2011.

See more

The list of books you might like

Most books are stored in the elastic cloud where traffic is expensive. For this reason, we have a limit on daily download.