Summary:
Name Bytes Mask RW? Prereqs NXM/OXM Support
───────────────────── ────── ───── ──── ───────── ─────────────────────
eth_src
aka dl_src
6 yes yes Ethernet OF 1.2+ and OVS 1.1+
eth_dst
aka dl_dst
6 yes yes Ethernet OF 1.2+ and OVS 1.1+
eth_type
aka dl_type
2 no no Ethernet OF 1.2+ and OVS 1.1+
Ethernet is the only layer-2 protocol that Open vSwitch supports.
As with most software, Open vSwitch and OpenFlow regard an
Ethernet frame to begin with the 14-byte header and end with the
final byte of the payload; that is, the frame check sequence is
not considered part of the frame.
Ethernet Source Field
Name: eth_src
(aka dl_src
)
Width: 48 bits
Format: Ethernet
Masking: arbitrary bitwise masks
Prerequisites: Ethernet
Access: read/write
OpenFlow 1.0: yes (exact match only)
OpenFlow 1.1: yes
OXM: OXM_OF_ETH_SRC
(4) since OpenFlow 1.2 and Open
vSwitch 1.7
NXM: NXM_OF_ETH_SRC
(2) since Open vSwitch 1.1
The Ethernet source address:
Ethernet
<---------->
48 48 16
+---+---+----+
|dst|src|type| ...
+---+---+----+
Ethernet Destination Field
Name: eth_dst
(aka dl_dst
)
Width: 48 bits
Format: Ethernet
Masking: arbitrary bitwise masks
Prerequisites: Ethernet
Access: read/write
OpenFlow 1.0: yes (exact match only)
OpenFlow 1.1: yes
OXM: OXM_OF_ETH_DST
(3) since OpenFlow 1.2 and Open
vSwitch 1.7
NXM: NXM_OF_ETH_DST
(1) since Open vSwitch 1.1
The Ethernet destination address:
Ethernet
<---------->
48 48 16
+---+---+----+
|dst|src|type| ...
+---+---+----+
Open vSwitch 1.8 and later support arbitrary masks for source
and/or destination. Earlier versions only support masking the
destination with the following masks:
01:00:00:00:00:00
Match only the multicast bit. Thus,
dl_dst=01:00:00:00:00:00/01:00:00:00:00:00
matches
all multicast (including broadcast) Ethernet
packets, and
dl_dst=00:00:00:00:00:00/01:00:00:00:00:00
matches
all unicast Ethernet packets.
fe:ff:ff:ff:ff:ff
Match all bits except the multicast bit. This is
probably not useful.
ff:ff:ff:ff:ff:ff
Exact match (equivalent to omitting the mask).
00:00:00:00:00:00
Wildcard all bits (equivalent to dl_dst=*
).
Ethernet Type Field
Name: eth_type
(aka dl_type
)
Width: 16 bits
Format: hexadecimal
Masking: not maskable
Prerequisites: Ethernet
Access: read-only
OpenFlow 1.0: yes (exact match only)
OpenFlow 1.1: yes (exact match only)
OXM: OXM_OF_ETH_TYPE
(5) since OpenFlow 1.2 and Open
vSwitch 1.7
NXM: NXM_OF_ETH_TYPE
(3) since Open vSwitch 1.1
The most commonly seen Ethernet frames today use a format called
``Ethernet II,'' in which the last two bytes of the Ethernet
header specify the Ethertype. For such a frame, this field is
copied from those bytes of the header, like so:
Ethernet
<---------------->
48 48 16
+---+---+----------+
|dst|src| type | ...
+---+---+----------+
≥0x600
Every Ethernet type has a value 0x600 (1,536) or greater. When
the last two bytes of the Ethernet header have a value too small
to be an Ethernet type, then the value found there is the total
length of the frame in bytes, excluding the Ethernet header. An
802.2 LLC header typically follows the Ethernet header. OpenFlow
and Open vSwitch only support LLC headers with DSAP and SSAP 0xaa
and control byte 0x03
, which indicate that a SNAP header follows
the LLC header. In turn, OpenFlow and Open vSwitch only support a
SNAP header with organization 0x000000
. In such a case, this
field is copied from the type field in the SNAP header, like
this:
Ethernet LLC SNAP
<------------> <------------> <----------------->
48 48 16 8 8 8 24 16
+---+---+------+ +----+----+----+ +--------+----------+
|dst|src| type | |DSAP|SSAP|cntl| | org | type | ...
+---+---+------+ +----+----+----+ +--------+----------+
<0x600 0xaa 0xaa 0x03 0x000000 ≥0x600
When an 802.1Q header is inserted after the Ethernet source and
destination, this field is populated with the encapsulated
Ethertype, not the 802.1Q Ethertype. With an Ethernet II inner
frame, the result looks like this:
Ethernet 802.1Q Ethertype
<------> <--------> <-------->
48 48 16 16 16
+----+---+ +------+---+ +----------+
|dst |src| | TPID |TCI| | type | ...
+----+---+ +------+---+ +----------+
0x8100 ≥0x600
LLC and SNAP encapsulation look like this with an 802.1Q header:
Ethernet 802.1Q Ethertype LLC SNAP
<------> <--------> <-------> <------------> <----------------->
48 48 16 16 16 8 8 8 24 16
+----+---+ +------+---+ +---------+ +----+----+----+ +--------+----------+
|dst |src| | TPID |TCI| | type | |DSAP|SSAP|cntl| | org | type | ...
+----+---+ +------+---+ +---------+ +----+----+----+ +--------+----------+
0x8100 <0x600 0xaa 0xaa 0x03 0x000000 ≥0x600
When a packet doesn't match any of the header formats described
above, Open vSwitch and OpenFlow set this field to 0x5ff
(OFP_DL_TYPE_NOT_ETH_TYPE
).