Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Portless NetKAT
Portless NetKAT is a modified version of the NetKAT language for defining policies without ports. The language, takes the regular NetKAT and replaces the
SwitchandPortheader withAbstractLocationandFromheaders. Here, bothAbstractLocationandFromcan take values that either represent a host or a switch.Simple example policy
Topology:
Portful Policy:
Equivalent Portless Policy:
Compilation
As the tables that are finally generated need to talk about ports, the
Frenetic_NetKAT_Portless_Compilerprovides acompilefunction with the following signature:val compile: portless_policy -> topo -> portful_policywhere,
portless_policy=Frenetic_NetKAT_Portless.policytopo=Frenetic_NetKAT_Portless.topoportful_policy=Frenetic_NetKAT.policyFiles Added
lib/Frenetic_NetKAT_Portless.mlThis modile has the Portless NetKAT language defined. This modile also defines
topowhich is a simple representation of a topology.lib/Frenetic_Portless_Fdd.mlSimilar to
lib/Frenetic_Fdd.ml, this module is used in the compilation process of converting a portless policy into a portful one. We use an FDD to reorder the policies such that all tests come first and all the modifications at the end. This process helps getting rid of corner edge cases that might produce incorrect policies if done naively.lib/Frenetic_NetKAT_Portless_Optimize.mlModule similar to
lib/Frenetic_NetKAT_Optimize.mland us used by the compiler as a module with some helper functions.lib/Frenetic_NetKAT_Portless_Compiler.mlThis is the module that has functions to compile the local portless NetKAT to a portful one.
lib/Frenetic_NetKAT_Portless_Generated_Parser.cppo.mlyGenerated parser file similar to
lib/Frenetic_NetKAT_Generated_Parser.cppo.mly.lib/Frenetic_NetKAT_Portless_Lexer.mlThe Portless NetKAT Lexer.
lib/Frenetic_NetKAT_Portless_Parser.mlThe Portless NetKAT Parser.
lib/Portless_Parser.cppo.mlyThe grammar file for parsing the Portless NetKAT policies.
frenetic/Topologies.mlModule with simple topologies generation that are the same as mininet default topologies. It can generate
minimal,simple,linear, andtreetopologies.Files Modified
lib/Parser.cppo.mlyAs the tokens are generated only from the
lib/Parser.cppo.mly, have addedABSTRACTLOC,FROM,SWITCHPREFIX, andHOSTPREFIXtokens. The grammar to parse them is all inlib/Portless_Parser.cppo.mly.frenetic/frenetic.mlAdded a
start-controllercommand tofrenetic.nativethat takes in a topology name and a portless policy and installs the tables to the switches on the network. Here the topology name is exactly as put in--topo=argument ofmininet._oasisOASIS stuff becuase new files were added.
lib/frenetic.mldylibOASIS stuff becuase new files were added.
lib/frenetic.mllibOASIS stuff becuase new files were added.
lib/frenetic.odoclOASIS stuff becuase new files were added.
setup.mlOASIS stuff becuase new files were added.
Start Controller Command
The frenetic
start-controllercommand starts a simple controller that installs the local portless policy to the switches on the netowrk. It has the following flags:--topo topology_nameThe name of the topology. Same as mn --topo value.[--openflow-port int]Port to listen on for OpenFlow switches. Defaults to6633.[--policy-file file]containing NetKAT policy to apply to the network. Defaults topolicy.kat.Sample Policies for Fully Connected Networks
topo-name =
minimalPortless Policy:
topo-name =
single,4Portless Policy:
topo-name =
linear,3Portless Policy:
topo-name =
tree,2,2Portless Policy: