Путеводитель по Руководству Linux

  User  |  Syst  |  Libr  |  Device  |  Files  |  Other  |  Admin  |  Head  |



   ovs-fields    ( 7 )

поля заголовка протокола в OpenFlow и Open vSwitch (protocol header fields in OpenFlow and Open vSwitch)

LAYER 3: ARP FIELDS

Summary: Name Bytes Mask RW? Prereqs NXM/OXM Support

──────── ────── ───── ──── ──────── ───────────────────── arp_op 2 no yes ARP OF 1.2+ and OVS 1.1+ arp_spa 4 yes yes ARP OF 1.2+ and OVS 1.1+

arp_tpa 4 yes yes ARP OF 1.2+ and OVS 1.1+ arp_sha 6 yes yes ARP OF 1.2+ and OVS 1.1+ arp_tha 6 yes yes ARP OF 1.2+ and OVS 1.1+

In theory, Address Resolution Protocol, or ARP, is a generic protocol generic protocol that can be used to obtain the hardware address that corresponds to any higher-level protocol address. In contemporary usage, ARP is used only in Ethernet networks to obtain the Ethernet address for a given IPv4 address. OpenFlow and Open vSwitch only support this usage of ARP. For this use case, an ARP packet has the following format, with the ARP fields exposed as Open vSwitch fields highlighted:

Ethernet ARP <-----------> <----------------------------------> 48 48 16 16 16 8 8 16 48 16 48 16 +---+---+-----+ +---+-----+---+---+--+---+---+---+---+ |dst|src|type | |hrd| pro |hln|pln|op|sha|spa|tha|tpa| +---+---+-----+ +---+-----+---+---+--+---+---+---+---+ 0x806 1 0x800 6 4

The ARP fields are also used for RARP, the Reverse Address Resolution Protocol, which shares ARP's wire format.

ARP Opcode Field

Name: arp_op Width: 16 bits Format: decimal

Masking: not maskable Prerequisites: ARP Access: read/write

OpenFlow 1.0: yes (exact match only) OpenFlow 1.1: yes (exact match only)

OXM: OXM_OF_ARP_OP (21) since OpenFlow 1.2 and Open vSwitch 1.7 NXM: NXM_OF_ARP_OP (15) since Open vSwitch 1.1

Even though this is a 16-bit field, Open vSwitch does not support ARP opcodes greater than 255; it treats them to zero. This works adequately because in practice ARP and RARP only use opcodes 1 through 4.

ARP Source IPv4 Address Field

Name: arp_spa Width: 32 bits Format: IPv4

Masking: arbitrary bitwise masks Prerequisites: ARP Access: read/write

OpenFlow 1.0: yes (CIDR match only) OpenFlow 1.1: yes

OXM: OXM_OF_ARP_SPA (22) since OpenFlow 1.2 and Open vSwitch 1.7 NXM: NXM_OF_ARP_SPA (16) since Open vSwitch 1.1

ARP Target IPv4 Address Field

Name: arp_tpa

Width: 32 bits Format: IPv4 Masking: arbitrary bitwise masks

Prerequisites: ARP Access: read/write OpenFlow 1.0: yes (CIDR match only)

OpenFlow 1.1: yes OXM: OXM_OF_ARP_TPA (23) since OpenFlow 1.2 and Open vSwitch 1.7

NXM: NXM_OF_ARP_TPA (17) since Open vSwitch 1.1

ARP Source Ethernet Address Field

Name: arp_sha Width: 48 bits Format: Ethernet

Masking: arbitrary bitwise masks Prerequisites: ARP Access: read/write

OpenFlow 1.0: not supported OpenFlow 1.1: not supported

OXM: OXM_OF_ARP_SHA (24) since OpenFlow 1.2 and Open vSwitch 1.7 NXM: NXM_NX_ARP_SHA (17) since Open vSwitch 1.1

ARP Target Ethernet Address Field

Name: arp_tha

Width: 48 bits Format: Ethernet Masking: arbitrary bitwise masks

Prerequisites: ARP Access: read/write OpenFlow 1.0: not supported

OpenFlow 1.1: not supported OXM: OXM_OF_ARP_THA (25) since OpenFlow 1.2 and Open vSwitch 1.7

NXM: NXM_NX_ARP_THA (18) since Open vSwitch 1.1