skip to main content
10.1145/2784731.2784761acmconferencesArticle/Chapter ViewAbstractPublication PagesicfpConference Proceedingsconference-collections
research-article

A fast compiler for NetKAT

Published: 29 August 2015 Publication History

Abstract

High-level programming languages play a key role in a growing number of networking platforms, streamlining application development and enabling precise formal reasoning about network behavior. Unfortunately, current compilers only handle "local" programs that specify behavior in terms of hop-by-hop forwarding behavior, or modest extensions such as simple paths. To encode richer "global" behaviors, programmers must add extra state -- something that is tricky to get right and makes programs harder to write and maintain. Making matters worse, existing compilers can take tens of minutes to generate the forwarding state for the network, even on relatively small inputs. This forces programmers to waste time working around performance issues or even revert to using hardware-level APIs. This paper presents a new compiler for the NetKAT language that handles rich features including regular paths and virtual networks, and yet is several orders of magnitude faster than previous compilers. The compiler uses symbolic automata to calculate the extra state needed to implement "global" programs, and an intermediate representation based on binary decision diagrams to dramatically improve performance. We describe the design and implementation of three essential compiler stages: from virtual programs (which specify behavior in terms of virtual topologies) to global programs (which specify network-wide behavior in terms of physical topologies), from global programs to local programs (which specify behavior in terms of single-switch behavior), and from local programs to hardware-level forwarding tables. We present results from experiments on real-world benchmarks that quantify performance in terms of compilation time and forwarding table size.

References

[1]
S. B. Akers. Binary decision diagrams. IEEE Trans. Comput., 27(6):509–516, June 1978.
[2]
Mohammad Al-Fares, Alex Loukissas, and Amin Vahdat. A scalable, commodity, data center network architecture. In SIGCOMM, 2008.
[3]
Ali Al-Shabibi, Marc De Leenheer, Matteo Gerola, Ayaka Koshibe, Guru Parulkar, Elio Salvadori, and Bill Snow. OpenVirteX: Make your virtual SDNs programmable. In HotSDN, 2014.
[4]
Carolyn Jane Anderson, Nate Foster, Arjun Guha, Jean-Baptiste Jeannin, Dexter Kozen, Cole Schlesinger, and David Walker. NetKAT: Semantic foundations for networks. In POPL, 2014.
[5]
Valentin Antimirov. Partial derivatives of regular expressions and finite automaton constructions. Theoretical Computer Science, 155(2):291–319, 1996.
[6]
Randal E. Bryant. Graph-based algorithms for boolean function manipulation. IEEE Trans. Comput., 35(8):677–691, August 1986.
[7]
Martin Casado, Teemu Koponen, Rajiv Ramanathan, and Scott Shenker. Virtualizing the network forwarding plane. In PRESTO, 2010.
[8]
Andrew D. Ferguson, Arjun Guha, Chen Liang, Rodrigo Fonseca, and Shriram Krishnamurthi. Hierarchical policies for software defined networks. In HotSDN, 2012.
[9]
Andrew D. Ferguson, Arjun Guha, Chen Liang, Rodrigo Fonseca, and Shriram Krishnamurthi. Participatory networking: An api for application control of sdns. In SIGCOMM, 2013.
[10]
Nate Foster, Rob Harrison, Michael J. Freedman, Christopher Monsanto, Jennifer Rexford, Alec Story, and David Walker. Frenetic: A Network Programming Language. In ICFP, 2011.
[11]
Nate Foster, Dexter Kozen, Matthew Milano, Alexandra Silva, and Laure Thompson. A coalgebraic decision procedure for NetKAT. In POPL, 2015.
[12]
Arjun Guha, Mark Reitblatt, and Nate Foster. Machine-verified network controllers. In PLDI, 2013.
[13]
Arpit Gupta, Laurent Vanbever, Muhammad Shahbaz, Sean Donovan, Brandon Schlinker, Nick Feamster, Jennifer Rexford, Scott Shenker, Russ Clark, and Ethan Katz-Bassett. SDX: A software defined internet exchange. In SIGCOMM, 2014.
[14]
Stephen Gutz, Alec Story, Cole Schlesinger, and Nate Foster. Splendid isolation: A slice abstraction for software-defined networks. In HotSDN, 2012.
[15]
Xin Jin, Jennifer Gossels, Jennifer Rexford, and David Walker. Co-Visor: A compositional hypervisor for software-defined networks. In NSDI, 2015.
[16]
Lavanya Jose, Lisa Yan, George Varghese, and Nick McKeown. Compiling packet programs to reconfigurable switches. In NSDI, 2015.
[17]
Ahmed Khurshid, Xuan Zou, Wenxuan Zhou, Matthew Caesar, and P. Brighten Godfrey. Veriflow: Verifying network-wide invariants in real time. In NSDI, 2013.
[18]
Simon Knight, Hung X. Nguyen, Nickolas Falkner, Rhys Bowden, and Matthew Roughan. The internet topology zoo. IEEE Journal on Selected Areas in Communications, 2011.
[19]
Teemu Koponen, Keith Amidon, Peter Balland, Mart´ın Casado, Anupam Chanda, Bryan Fulton, Jesse Gross Igor Ganichev, Natasha Gude, Paul Ingram, Ethan Jackson, Andrew Lambeth, Romain Lenglet, Shih-Hao Li, Amar Padmanabhan, Justin Pettit, Ben Pfaff, Rajiv Ramanathan, Scott Shenker, Alan Shieh, Jeremy Stribling, Pankaj Thakkar, Dan Wendlandt, Alexander Yip, and Ronghua Zhang. Network virtualization in multi-tenant datacenters. In NSDI, 2014.
[20]
Dexter Kozen. Kleene algebra with tests. Transactions on Programming Languages and Systems, 19(3):427–443, May 1997.
[21]
Alex X. Liu, Fei Chen, JeeHyun Hwang, and Tao Xie. XEngine: A fast and scalable XACML policy evaluation engine. In International Conference on Measurement and Modeling of Computer Systems (SIGMETRICS), 2008.
[22]
Alex X. Liu, Chad R. Meiners, and Eric Torng. TCAM Razor: A systematic approach towards minimizing packet classifiers in TCAMs. TON, 18(2):490–500, April 2010.
[23]
Nick McKeown, Tom Anderson, Hari Balakrishnan, Guru Parulkar, Larry Peterson, Jennifer Rexford, Scott Shenker, and Jonathan Turner. OpenFlow: Enabling innovation in campus networks. SIGCOMM CCR, 38(2):69–74, 2008.
[24]
Christopher Monsanto, Nate Foster, Rob Harrison, and David Walker. A compiler and run-time system for network programming languages. In POPL, 2012.
[25]
Christopher Monsanto, Joshua Reich, Nate Foster, Jennifer Rexford, and David Walker. Composing software-defined networks. In NSDI, 2013.
[26]
Tim Nelson, Andrew D. Ferguson, Michael J. G. Scheer, and Shriram Krishnamurthi. Tierless programming and reasoning for softwaredefined networks. In NSDI, 2014.
[27]
Damien Pous. Symbolic algorithms for language equivalence and Kleene Algebra with Tests. In POPL, 2015.
[28]
ONOS Project. Intent framework, November 2014. Available at http://onos.wpengine.com/wp-content/uploads/2014/11/ ONOS-Intent-Framework.pdf.
[29]
Open Daylight Project. Group policy, January 2014. Available at https://wiki.opendaylight.org/view/Group_Policy:Main.
[30]
Cole Schlesinger, Michael Greenberg, and David Walker. Concurrent netcore: From policies to pipelines. In ICFP, 2014.
[31]
O. Tange. GNU parallel - the command-line power tool. ;login: The USENIX Magazine, 36(1):42–47, Feb 2011.
[32]
David E. Taylor and Jonathan S. Turner. ClassBench: A packet classification benchmark. TON, 15:499–511, June 2007.
[33]
Andreas Voellmy, Junchang Wang, Y. Richard Yang, Bryan Ford, and Paul Hudak. Maple: Simplifying SDN programming using algorithmic policies. In SIGCOMM, 2013.

Cited By

View all
  • (2024)KATch: A Fast Symbolic Verifier for NetKATProceedings of the ACM on Programming Languages10.1145/36564548:PLDI(1905-1928)Online publication date: 20-Jun-2024
  • (2023)Completeness and the Finite Model Property for Kleene Algebra, ReconsideredRelational and Algebraic Methods in Computer Science10.1007/978-3-031-28083-2_10(158-175)Online publication date: 3-Apr-2023
  • (2022)Software-Defined Networking: Categories, Analysis, and Future DirectionsSensors10.3390/s2215555122:15(5551)Online publication date: 25-Jul-2022
  • Show More Cited By

Recommendations

Comments

Information & Contributors

Information

Published In

cover image ACM Conferences
ICFP 2015: Proceedings of the 20th ACM SIGPLAN International Conference on Functional Programming
August 2015
436 pages
ISBN:9781450336697
DOI:10.1145/2784731
  • cover image ACM SIGPLAN Notices
    ACM SIGPLAN Notices  Volume 50, Issue 9
    ICFP '15
    September 2015
    436 pages
    ISSN:0362-1340
    EISSN:1558-1160
    DOI:10.1145/2858949
    • Editor:
    • Andy Gill
    Issue’s Table of Contents
Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected]

Sponsors

Publisher

Association for Computing Machinery

New York, NY, United States

Publication History

Published: 29 August 2015

Permissions

Request permissions for this article.

Check for updates

Author Tags

  1. Frenetic
  2. Kleene Algebra with tests
  3. NetKAT
  4. Software-defined networking
  5. binary decision diagrams
  6. domain-specific languages
  7. virtualization

Qualifiers

  • Research-article

Funding Sources

Conference

ICFP'15
Sponsor:

Acceptance Rates

Overall Acceptance Rate 333 of 1,064 submissions, 31%

Upcoming Conference

ICFP '25
ACM SIGPLAN International Conference on Functional Programming
October 12 - 18, 2025
Singapore , Singapore

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • Downloads (Last 12 months)28
  • Downloads (Last 6 weeks)12
Reflects downloads up to 13 Dec 2024

Other Metrics

Citations

Cited By

View all
  • (2024)KATch: A Fast Symbolic Verifier for NetKATProceedings of the ACM on Programming Languages10.1145/36564548:PLDI(1905-1928)Online publication date: 20-Jun-2024
  • (2023)Completeness and the Finite Model Property for Kleene Algebra, ReconsideredRelational and Algebraic Methods in Computer Science10.1007/978-3-031-28083-2_10(158-175)Online publication date: 3-Apr-2023
  • (2022)Software-Defined Networking: Categories, Analysis, and Future DirectionsSensors10.3390/s2215555122:15(5551)Online publication date: 25-Jul-2022
  • (2022)Kleene algebra modulo theories: a framework for concrete KATsProceedings of the 43rd ACM SIGPLAN International Conference on Programming Language Design and Implementation10.1145/3519939.3523722(594-608)Online publication date: 9-Jun-2022
  • (2022)Forwarding and Routing With Packet SubscriptionsIEEE/ACM Transactions on Networking10.1109/TNET.2022.317206630:6(2464-2479)Online publication date: Dec-2022
  • (2022)Local Completeness Logic on Kleene Algebra with TestsStatic Analysis10.1007/978-3-031-22308-2_16(350-371)Online publication date: 2-Dec-2022
  • (2020)A domain-specific language for filtering in application-level gatewaysProceedings of the 19th ACM SIGPLAN International Conference on Generative Programming: Concepts and Experiences10.1145/3425898.3426955(111-123)Online publication date: 16-Nov-2020
  • (2020)Forwarding and routing with packet subscriptionsProceedings of the 16th International Conference on emerging Networking EXperiments and Technologies10.1145/3386367.3431315(282-294)Online publication date: 23-Nov-2020
  • (2020)An Intent-Based Automation Framework for Securing Dynamic Consumer IoT InfrastructuresProceedings of The Web Conference 202010.1145/3366423.3380234(1625-1636)Online publication date: 20-Apr-2020
  • (2019)An Extensible Automated Failure Localization Framework Using NetKAT, Felix, and SDN TracerouteFuture Internet10.3390/fi1105010711:5(107)Online publication date: 4-May-2019
  • Show More Cited By

View Options

Login options

View options

PDF

View or Download as a PDF file.

PDF

eReader

View online with eReader.

eReader

Media

Figures

Other

Tables

Share

Share

Share this Publication link

Share on social media