Initial import
[sliver-openvswitch.git] / man / man8 / dpctl.8
1 .TH dpctl 8 "December 2007" "OpenFlow" "OpenFlow Manual"
2
3 .SH NAME
4 dpctl \- command line tool to administer OpenFlow datapaths
5
6 .SH SYNOPSIS
7 .B dpctl
8 [OPTIONS] COMMAND [ARGS...]
9
10 .SH DESCRIPTION
11 The
12 .B dpctl
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.
17
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
22 \fBaddif\fR command.
23
24 .SH OPTIONS
25 .TP
26 .BR \-h ", " \-\^\-help
27 Prints a brief help message to the console.
28
29 .TP
30 .BR \-v ", " \-\^\-verbose
31 Prints debug messages to the console.
32
33 .TP
34 .BR \-V ", " \-\^\-version
35 Prints version information to the console.
36
37 .SH COMMANDS
38 .TP
39 .BI adddp " DP_IDX"
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.
43
44 .TP
45 .BI deldp " DP_IDX"
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
49 command).
50
51 .TP
52 .BI show " DP_IDX"
53 Prints to the console information on datapath \fIDP_IDX\fR including
54 information on its flow tables and ports.
55
56 .TP
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.
64
65 .TP
66 .BI delif " DP_IDX INTERFACE"
67 Removes \fIINTERFACE\fR from the list of network interfaces datapath
68 \fIDP_IDX\fR monitors.
69
70 .TP
71 .BI monitor " DP_IDX"
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
74 existing datapath.
75
76 .TP
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
80 datapath.
81
82 .TP
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.
88
89 .SH EXAMPLES
90
91 A typical dpctl command sequence:
92 .nf
93 .TP
94 Create datapath numbered 0:
95
96 .B % dpctl adddp 0
97
98 .TP
99 Add two interfaces to the new datapath:
100
101 .B % dpctl addif 0 eth0
102 .B % dpctl addif 0 eth1
103
104 .TP
105 Monitor traffic received by the datapath (exit with control-C):
106
107 .B % dpctl monitor 0
108
109
110 .TP
111 View the datapath's table stats after some traffic has passed through:
112
113 .B % dpctl dump-tables 0
114
115 .TP
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)
117
118 .B % dpctl dump-flows 0 1
119
120 .TP
121 Remote interfaces from the datapath when finished:
122
123 .B % dpctl delif 0 eth0
124 .B % dpctl delif 0 eth1
125
126 .TP
127 Delete the datapath:
128
129 .B % dpctl deldp 0
130 .fi
131 .SH "SEE ALSO"
132
133 .BR secchan (8),
134 .BR controller (8)
135 .BR vlogconf (8)
136
137 .SH BUGS
138
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