775
775
corresponding bit in \fItunnel-id\fR must match exactly, and a 0-bit
776
776
wildcards that bit.
778
.IP \fBtun_src=\fIip\fR[\fB/\fInetmask\fR]
779
.IQ \fBtun_dst=\fIip\fR[\fB/\fInetmask\fR]
780
Matches tunnel IPv4 source (or destination) address \fIip\fR. Only packets
781
that arrive over a tunnel will have nonzero tunnel addresses.
782
The address may be specified as an IP address or host name
783
(e.g. \fB192.168.1.1\fR or \fBwww.example.com\fR). The optional
784
\fInetmask\fR allows restricting a match to a masked IPv4 address.
785
The netmask may be specified as a dotted quad
786
(e.g. \fB192.168.1.0/255.255.255.0\fR) or as a CIDR block
787
(e.g. \fB192.168.1.0/24\fR).
778
789
.IP "\fBreg\fIidx\fB=\fIvalue\fR[\fB/\fImask\fR]"
779
790
Matches \fIvalue\fR either exactly or with optional \fImask\fR in
780
791
register number \fIidx\fR. The valid range of \fIidx\fR depends on
915
926
allows isn't supported at the moment.)
916
927
A priority of zero and the tag of zero are used for the new tag.
929
.IP \fBpush_mpls\fR:\fIethertype\fR
930
If the packet does not already contain any MPLS labels, changes the
931
packet's Ethertype to \fIethertype\fR, which must be either the MPLS
932
unicast Ethertype \fB0x8847\fR or the MPLS multicast Ethertype
933
\fB0x8848\fR, and then pushes an initial label stack entry. The label
934
stack entry's default label is 2 if the packet contains IPv6 and 0
935
otherwise, its default traffic control value is the low 3 bits of the
936
packet's DSCP value (0 if the packet is not IP), and its TTL is copied
937
from the IP TTL (64 if the packet is not IP).
939
If the packet does already contain an MPLS label, pushes a new
940
outermost label as a copy of the existing outermost label.
942
There are some limitations in the implementation. \fBpush_mpls\fR
943
followed by another \fBpush_mpls\fR will result in the first
944
\fBpush_mpls\fR being discarded.
946
.IP \fBpop_mpls\fR:\fIethertype\fR
947
Strips the outermost MPLS label stack entry.
948
Currently the implementation restricts \fIethertype\fR to a non-MPLS Ethertype
949
and thus \fBpop_mpls\fR should only be applied to packets with
950
an MPLS label stack depth of one.
953
There are some limitations in the implementation. \fBpop_mpls\fR
954
followed by another \fBpush_mpls\fR without an intermediate
955
\fBpush_mpls\fR will result in the first \fBpush_mpls\fR being
918
958
.IP \fBmod_dl_src\fB:\fImac\fR
919
959
Sets the source Ethernet address to \fImac\fR.
934
974
Sets the TCP or UDP destination port to \fIport\fR.
936
976
.IP \fBmod_nw_tos\fB:\fItos\fR
937
Sets the IPv4 ToS/DSCP field to \fItos\fR. Valid values are between 0 and
938
255, inclusive. Note that the two lower reserved bits are never
977
Sets the IPv4 ToS/DSCP field to \fItos\fR, which must be a multiple of
978
4 between 0 and 255. This action does not modify the two least
979
significant bits of the ToS field (the ECN bits).
942
982
The following actions are Nicira vendor extensions that, as of this writing, are
990
1030
``packet_in'' message will be sent only to the controllers having
991
1031
controller id zero which have registered for the invalid ttl packets.
1033
.IP \fBset_mpls_ttl\fR:\fIttl\fR
1034
Set the TTL of the outer MPLS label stack entry of a packet.
1035
\fIttl\fR should be in the range 0 to 255 inclusive.
1037
.IP \fBdec_mpls_ttl\fR
1038
Decrement TTL of the outer MPLS label stack entry of a packet. If the TTL
1039
is initially zero, no decrement occurs. Instead, a ``packet-in'' message
1040
with reason code \fBOFPR_INVALID_TTL\fR is sent to each connected
1041
controller with controller id zer that has enabled receiving them.
1042
Processing the current set of actions then stops. However, if the current
1043
set of actions was reached through ``resubmit'' then remaining actions in
1044
outer levels resume processing.
993
1046
.IP \fBnote:\fR[\fIhh\fR]...
994
1047
Does nothing at all. Any number of bytes represented as hex digits
995
1048
\fIhh\fR may be included. Pairs of hex digits may be separated by
1022
1075
Example: \fBload:55\->NXM_NX_REG2[0..5]\fR loads value 55 (bit pattern
1023
1076
\fB110111\fR) into bits 0 through 5, inclusive, in register 2.
1078
.IP "\fBpush:\fIsrc\fB[\fIstart\fB..\fIend\fB]"
1079
Pushes \fIstart\fR to \fIend\fR bits inclusive, in fields
1080
on top of the stack.
1082
Example: \fBpush:NXM_NX_REG2[0..5]\fR push the value stored in register
1083
2 bits 0 through 5, inclusive, on to the internal stack.
1085
.IP "\fBpop:\fIdst\fB[\fIstart\fB..\fIend\fB]"
1086
Pops from the top of the stack, retrieves the \fIstart\fR to \fIend\fR bits
1087
inclusive, from the value popped and store them into the corresponding
1091
Example: \fBpop:NXM_NX_REG2[0..5]\fR pops the value from top of the stack.
1092
Set register 2 bits 0 through 5, inclusive, based on bits 0 through 5 from the
1025
1095
.IP "\fBset_field:\fIvalue\fB\->\fIdst"
1026
1096
Writes the literal \fIvalue\fR into the field \fIdst\fR, which should
1027
1097
be specified as a name used for matching. (This is similar to
1029
1099
Open Flow 1.2 and above.)
1032
Example: \fBset_field:00:11:22:33:44:55->eth_src\fR.
1102
Example: \fBset_field:fe80:0123:4567:890a:a6ba:dbff:fefe:59fa\->ipv6_src\fR
1034
1104
.IP "\fBmultipath(\fIfields\fB, \fIbasis\fB, \fIalgorithm\fB, \fIn_links\fB, \fIarg\fB, \fIdst\fB[\fIstart\fB..\fIend\fB])\fR"
1035
1105
Hashes \fIfields\fR using \fIbasis\fR as a universal hash parameter,
1047
1117
Refer to \fBnicira\-ext.h\fR for more details.
1049
.IP "\fBautopath(\fIid\fB, \fIdst\fB[\fIstart\fB..\fIend\fB])\fR"
1050
Deprecated and slated for removal in Feburary 2013.
1052
Given \fIid\fR, chooses an OpenFlow port and populates it in
1053
\fIdst\fB[\fIstart\fB..\fIend\fB]\fR, which must be an NXM field as
1056
Currently, \fIid\fR should be the OpenFlow port number of an interface on the
1057
bridge. If it isn't then \fIdst\fB[\fIstart\fB..\fIend\fB]\fR will be
1058
populated with the OpenFlow port "none". If \fIid\fR is a member of a bond,
1059
the normal bond selection logic will be used to choose the destination port.
1060
Otherwise, the register will be populated with \fIid\fR itself.
1062
Refer to \fBnicira\-ext.h\fR for more details.
1064
1119
.IP "\fBbundle(\fIfields\fB, \fIbasis\fB, \fIalgorithm\fB, \fIslave_type\fB, slaves:[\fIs1\fB, \fIs2\fB, ...])\fR"
1065
1120
Hashes \fIfields\fR using \fIbasis\fR as a universal hash parameter, then
1066
1121
applies the bundle link selection \fIalgorithm\fR to choose one of the listed
1200
1255
This action was added in Open vSwitch 1.5.90.
1257
.IP "\fBsample(\fIargument\fR[\fB,\fIargument\fR]...\fB)\fR"
1258
Samples packets and sends one sample for every sampled packet.
1260
\fIargument\fR takes the following forms:
1262
.IP "\fBprobability=\fIpackets\fR"
1263
The number of sampled packets out of 65535. Must be greater or equal to 1.
1264
.IP "\fBcollector_set_id=\fIid\fR"
1265
The unsigned 32-bit integer identifier of the set of sample collectors
1266
to send sampled packets to. Defaults to 0.
1267
.IP "\fBobs_domain_id=\fIid\fR"
1268
When sending samples to IPFIX collectors, the unsigned 32-bit integer
1269
Observation Domain ID sent in every IPFIX flow record. Defaults to 0.
1270
.IP "\fBobs_point_id=\fIid\fR"
1271
When sending samples to IPFIX collectors, the unsigned 32-bit integer
1272
Observation Point ID sent in every IPFIX flow record. Defaults to 0.
1275
Refer to \fBovs\-vswitchd.conf.db\fR(8) for more details on
1276
configuring sample collector sets.
1278
This action was added in Open vSwitch 1.10.90.
1201
1280
.IP "\fBexit\fR"
1202
1281
This action causes Open vSwitch to immediately halt execution of further
1203
1282
actions. Those actions which have already been executed are unaffected. Any