-
Notifications
You must be signed in to change notification settings - Fork 51
Command Line
You invoke frenetic
with one of the following subcommands:
-
http-controller
starts 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. -
dump
accepts NetKAT Surface Syntax files, compiles them into OpenFlow flow tables, and outputs the result. -
compile-server
accepts NetKAT surface syntax files via REST and outputs the JSON-formatted flow tables. It is likehttp-controller
but it doesn't talk to actual OpenFlow switches. -
shell
starts a REPL for Frenetic. -
help
displays command help
-
--verbosity log-level
, wherelog-level
can bedebug
,info
, orerror
. Defaults toinfo
. -
--log path
, wherepath
is the directory to write logs to, or the special pathsstdout
andstderr
.
Defaults tostderr
.
frenetic http-controller [ --http-port=9000 ] [ --openflow-port=6633 ]
-
http-port=port
is the HTTP port for the northbound web server. -
openflow-port=port
is 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-fdd
dumps a dot file encoding of the intermediate representation (FDD) generated by the local compiler -
--json
parses input file as JSON. -
--no-tables
suppresses table printing. -
--print-fdd
prints an ASCII encoding of the intermediate representation (FDD) generated by the local compiler -
--switches n
specifies 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-auto
dumps a dot file encoding of the intermediate representation generated by the global compiler (symbolic NetKAT automaton) -
--dump-fdd
dumps a dot file encoding of the intermediate representation (FDD) generated by the local compiler -
--json
parses input file as JSON. -
--no-tables
suppresses table printing. -
--print-auto
prints an ASCI encoding of the intermediate representation generated by the global compiler (symbolic NetKAT automaton) -
--print-fdd
prints 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-fdd
dumps a dot file encoding of the intermediate representation (FDD) generated by the local compiler -
--peg file
Physical egress predicate. If not specified, defaults topeg.kat
-
--ping file
Physical ingress predicate. If not specified, defaults toping.kat
-
--print-fdd
prints an ASCII encoding of the intermediate representation (FDD) generated by the local compiler -
--print-global-pol
prints global NetKAT policy generated by the virtual compiler -
--ptopo file
Physical topology. If not specified, defaults toptopo.kat
-
--veg file
Virtual egress predicate. If not specified, defaults toveg.kat
-
--ving file
Virtual ingress predicate. If not specified, defaults toving.kat
-
--ving-pol file
Virtual ingress policy. If not specified, defaults toving_pol.kat
-
--vrel file
Virtual-physical relation. If not specified, defaults tovrel.kat
-
--vtopo file
Virtual topology. If not specified, defaults tovtopo.kat
frenetic compile-server [ --http-port=9000 ]
-
http-port=port
is 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
.