-
Notifications
You must be signed in to change notification settings - Fork 51
Command Line
You invoke frenetic with one of the following subcommands:
-
http-controllerstarts a web server which accepts REST commands (Northbound) and talks to OpenFlow switches (Southbound). You use this subcommand when executing network applications written in Python or REST/JSON. -
dumpaccepts NetKAT Surface Syntax files, compiles them into OpenFlow flow tables, and outputs the result. -
compile-serveraccepts NetKAT surface syntax files via REST and outputs the JSON-formatted flow tables. It is likehttp-controllerbut it doesn't talk to actual OpenFlow switches. -
shellstarts a REPL for Frenetic. -
helpdisplays command help
-
--verbosity log-level, wherelog-levelcan bedebug,info, orerror. Defaults toinfo. -
--log path, wherepathis the directory to write logs to, or the special pathsstdoutandstderr.
Defaults tostderr.
frenetic http-controller [ --http-port=9000 ] [ --openflow-port=6633 ]
-
http-port=portis the HTTP port for the northbound web server. -
openflow-port=portis the TCP port for the southbound openflow switches. This defaults to 6633, which is the default OpenFlow 1.0 port.
The commmand line compiler accepts Raw NetKAT files and compiles them into OpenFlow flow tables. The command line options vary depending on the type of compiler used:
frenetic dump local FILE [--dump-fdd] [--json] [--no-tables] [--print-fdd] [--switches n]
-
--dump-fdddumps a dot file encoding of the intermediate representation (FDD) generated by the local compiler -
--jsonparses input file as JSON. -
--no-tablessuppresses table printing. -
--print-fddprints an ASCII encoding of the intermediate representation (FDD) generated by the local compiler -
--switches nspecifies number of switches to dump flow tables for (assuming switch-numbering 1,2,...,n)
frenetic dump global FILE [--dump-auto] [--dump-fdd] [--json] [--no-tables] [--print-auto] [--print-fdd]
-
--dump-autodumps a dot file encoding of the intermediate representation generated by the global compiler (symbolic NetKAT automaton) -
--dump-fdddumps a dot file encoding of the intermediate representation (FDD) generated by the local compiler -
--jsonparses input file as JSON. -
--no-tablessuppresses table printing. -
--print-autoprints an ASCI encoding of the intermediate representation generated by the global compiler (symbolic NetKAT automaton) -
--print-fddprints an ASCII encoding of the intermediate representation (FDD) generated by the local compiler
frenetic dump virtual FILE [--dump-fdd] [--peg file] [--ping file] [--print-fdd] [--print-global-pol]
[--veg file] [--ving file] [--ving-pol file] [--vrel file] [--vtopo file]
-
--dump-fdddumps a dot file encoding of the intermediate representation (FDD) generated by the local compiler -
--peg filePhysical egress predicate. If not specified, defaults topeg.kat -
--ping filePhysical ingress predicate. If not specified, defaults toping.kat -
--print-fddprints an ASCII encoding of the intermediate representation (FDD) generated by the local compiler -
--print-global-polprints global NetKAT policy generated by the virtual compiler -
--ptopo filePhysical topology. If not specified, defaults toptopo.kat -
--veg fileVirtual egress predicate. If not specified, defaults toveg.kat -
--ving fileVirtual ingress predicate. If not specified, defaults toving.kat -
--ving-pol fileVirtual ingress policy. If not specified, defaults toving_pol.kat -
--vrel fileVirtual-physical relation. If not specified, defaults tovrel.kat -
--vtopo fileVirtual topology. If not specified, defaults tovtopo.kat
frenetic compile-server [ --http-port=9000 ]
-
http-port=portis the HTTP port for the northbound web server.
The compile server is an HTTP server, but it only compiles NetKAT policies into OpenFlow Flow Tables and outputs the response. It does not connect to any OpenFlow switch or pass back OpenFlow events.
The REST commands that the compile-server responds are listed in the NetKAT REST Reference
frenetic shell
The Shell is a REPL for Frenetic. Like the HTTP server, it connects via OpenFlow to switches.
It can load Raw NetKAT policies, compile them to the server, and print out current flow-tables.
It does not respond to OpenFlow events, however, like the HTTP server does. It's a good tool for debugging.
To see shell commands, start up Frenetic shell and type help.