1 .TH dpctl 8 "December 2007" "OpenFlow" "OpenFlow Manual"
4 dpctl \- command line tool to administer OpenFlow datapaths
8 [OPTIONS] COMMAND [ARGS...]
13 program is a command line tool through which OpenFlow datapaths on the
14 local host can be created, deleted, modified, and monitored. A single
15 machine may host up to 32 datapaths (numbered 0 to 31). In most
16 situations, a machine hosts only one datapath.
18 A newly created datapath is not associated with any of the
19 host's network interfaces and thus does not process any incoming
20 traffic. To intercept and process traffic on a given interface, the
21 interface must be explicitly added to a datapath through the
26 .BR \-h ", " \-\^\-help
27 Prints a brief help message to the console.
30 .BR \-v ", " \-\^\-verbose
31 Prints debug messages to the console.
34 .BR \-V ", " \-\^\-version
35 Prints version information to the console.
40 Creates datapath numbered \fIDP_IDX\fR on the local host. Will fail
41 if \fIDP_IDX\fR is not in the range 0 to 31, or if the datapath with
42 that number already exists on the host.
46 Deletes datapath \fIDP_IDX\fR on the local host. \fIDP_IDX\fR must be
47 an existing datapath. All of a datapath's interfaces must be
48 explicitly removed before the datapath can be deleted (see \fBdelif\fR
53 Prints to the console information on datapath \fIDP_IDX\fR including
54 information on its flow tables and ports.
57 .BI addif " DP_IDX INTERFACE"
58 Adds \fIINTERFACE\fR to the list of network interfaces datapath
59 \fIDP_IDX\fR monitors, where \fIDP_IDX\fR is the ID of an existing
60 datapath, and \fIINTERFACE\fR is the name of one of the host's
61 interfaces, e.g. \fBeth0\fR. Once an interface has been added
62 to a datapath, the datapath has complete ownership of the interface's
63 traffic and the interface appears silent to the rest of the system.
66 .BI delif " DP_IDX INTERFACE"
67 Removes \fIINTERFACE\fR from the list of network interfaces datapath
68 \fIDP_IDX\fR monitors.
72 Prints to the console all OpenFlow packets sent by datapath
73 \fIDP_IDX\fR to its controller, where \fIDP_IDX\fR is the ID of an
77 .BI dump-tables " DP_IDX"
78 Prints to the console statistics for each of the flow tables used by
79 datapath \fIDP_IDX\fR, where \fIDP_IDX\fR is the ID of an existing
83 .BI dump-flows " DP_IDX TABLE_ID"
84 Prints to the console all flow entries in datapath \fIDP_IDX\fR's table
85 \fITABLE_ID\fR, where \fIDP_IDX\fR is the ID of an existing datapath,
86 and \fITABLE_ID\fR is the integer ID of one of the datapath's tables
87 as displayed in the output produced by \fBdump-tables\fR.
91 A typical dpctl command sequence:
94 Create datapath numbered 0:
99 Add two interfaces to the new datapath:
101 .B % dpctl addif 0 eth0
102 .B % dpctl addif 0 eth1
105 Monitor traffic received by the datapath (exit with control-C):
111 View the datapath's table stats after some traffic has passed through:
113 .B % dpctl dump-tables 0
116 View the flow entries in one of the datapath's tables (shown is the command for the table 1). (This assumes that there is running controller adding flows to the flowtables)
118 .B % dpctl dump-flows 0 1
121 Remote interfaces from the datapath when finished:
123 .B % dpctl delif 0 eth0
124 .B % dpctl delif 0 eth1
139 dump-flows currently only prints the first action of each flow. This is
140 a shortcoming in the modules netlink flow query functionality and will
141 be addressed in future releases