ovs-vswitchd.conf.db(5)
okay bestie, sit down, hydrate, and get comfy โ this is ovs-vswitchd.conf.db(5) straight out of the Open vSwitch Manual, and it's genuinely a whole universe. We're doing it in parts because it's long long. This is part one, so no, I'm not leaving, we're just catching our breath. ๐ซถ
โจ NAME โจ
ovs-vswitchd.conf.db โ the Open_vSwitch database schema ๐
So basically: a database with this schema holds the configuration for one Open vSwitch daemon. That's the whole vibe.
The top-level configuration for the daemon is the Open_vSwitch table, and it must have exactly one record. One. Not zero, not two. Like, no cap, exactly one. ๐
Records in other tables only matter when they can be reached โ directly or indirectly โ from the Open_vSwitch table. Anything not reachable from Open_vSwitch gets automatically deleted from the database, except for records in a few distinguished ``root setโโ tables. So yeah, if you're not connected to the main character, you're getting removed from the group chat. ๐ญ
๐ธ Common Columns ๐ธ
Most tables have two special columns called other_config and external_ids. They have the exact same form and purpose everywhere they show up, so we're describing them once here to save space later. Efficient queens only. โจ
other_config: map of string-string pairs โ key-value pairs for configuring rarely used features. The supported keys, plus the forms their values take, are documented individually for each table. (A few tables straight up don't haveother_configcolumns because nobody's defined any key-value pairs for them yet. It's giving "empty notes app". ๐)external_ids: map of string-string pairs โ key-value pairs for external frameworks that integrate with Open vSwitch, not for Open vSwitch itself. System integrators should either use the Open vSwitch development mailing list to coordinate on common key-value definitions, or just pick key names that are likely to be unique. In some cases, where key-value pairs have been defined that are likely to be widely useful, they're documented individually for each table. iykyk. ๐ฆ
๐ TABLE SUMMARY ๐
Here's the rundown of what each table in the Open_vSwitch database is for. Each table gets its own detailed glow-up on a later page. ๐
Open_vSwitchโ Open vSwitch configuration.Bridgeโ Bridge configuration.Portโ Port configuration.Interfaceโ One physical network device in a Port.Flow_Tableโ OpenFlow table configurationQoSโ Quality of Service configurationQueueโ QoS output queue.Mirrorโ Port mirroring.Controllerโ OpenFlow controller configuration.Managerโ OVSDB management connection.NetFlowโ NetFlow configuration.Datapathโ Datapath configuration.CT_Zoneโ CT_Zone configuration.CT_Timeout_Policyโ CT_Timeout_Policy configuration.SSLโ SSL configuration.sFlowโ sFlow configuration.IPFIXโ IPFIX configuration.Flow_Sample_Collector_Setโ Flow_Sample_Collector_Set configuration.AutoAttachโ AutoAttach configuration.
๐ Open_vSwitch TABLE ๐
Configuration for an Open vSwitch daemon. There must be exactly one record in the Open_vSwitch table. (Said it once, saying it again, because people keep trying it. ๐)
๐ Summary: ๐
Configuration:
datapathsโ map of string-Datapath pairsbridgesโ set of Bridgessslโ optional SSLexternal_ids : system-idโ optional stringexternal_ids : hostnameโ optional stringexternal_ids : rundirโ optional stringother_config : stats-update-intervalโ optional string, containing an integer, at least 5,000other_config : flow-restore-waitโ optional string, eithertrueorfalseother_config : flow-limitโ optional string, containing an integer, at least 0other_config : max-idleโ optional string, containing an integer, at least 500other_config : max-revalidatorโ optional string, containing an integer, at least 100other_config : min-revalidate-ppsโ optional string, containing an integer, at least 0other_config : offloaded-stats-delayโ optional string, containing an integer, at least 0other_config : hw-offloadโ optional string, eithertrueorfalseother_config : hw-offload-priorityโ optional stringother_config : n-offload-threadsโ optional string, containing an integer, in range 1 to 10other_config : tc-policyโ optional string, one ofnone,skip_hw, orskip_swother_config : dpdk-initโ optional string, one offalse,true, ortryother_config : dpdk-lcore-maskโ optional string, containing an integer, at least 1other_config : pmd-cpu-maskโ optional stringother_config : dpdk-alloc-memโ optional string, containing an integer, at least 0other_config : dpdk-socket-memโ optional stringother_config : dpdk-socket-limitโ optional stringother_config : dpdk-hugepage-dirโ optional stringother_config : dpdk-probe-at-initโ optional string, eithertrueorfalseother_config : dpdk-extraโ optional stringother_config : vhost-sock-dirโ optional stringother_config : vhost-iommu-supportโ optional string, eithertrueorfalseother_config : vhost-postcopy-supportโ optional string, eithertrueorfalseother_config : per-port-memoryโ optional string, eithertrueorfalseother_config : shared-mempool-configโ optional stringother_config : tx-flush-intervalโ optional string, containing an integer, in range 0 to 1,000,000other_config : pmd-perf-metricsโ optional string, eithertrueorfalseother_config : smc-enableโ optional string, eithertrueorfalseother_config : pmd-rxq-assignโ optional string, one ofcycles,group, orroundrobinother_config : pmd-rxq-isolateโ optional string, eithertrueorfalseother_config : n-handler-threadsโ optional string, containing an integer, at least 1other_config : n-revalidator-threadsโ optional string, containing an integer, at least 1other_config : emc-insert-inv-probโ optional string, containing an integer, in range 0 to 4,294,967,295other_config : vlan-limitโ optional string, containing an integer, at least 0other_config : bundle-idle-timeoutโ optional string, containing an integer, at least 1other_config : offload-rebalanceโ optional string, eithertrueorfalseother_config : pmd-auto-lbโ optional string, eithertrueorfalseother_config : pmd-auto-lb-rebal-intervalโ optional string, containing an integer, in range 0 to 20,000other_config : pmd-auto-lb-load-thresholdโ optional string, containing an integer, in range 0 to 100other_config : pmd-auto-lb-improvement-thresholdโ optional string, containing an integer, in range 0 to 100other_config : pmd-sleep-maxโ optional stringother_config : userspace-tso-enableโ optional string, eithertrueorfalseother_config : explicit-sampled-dropsโ optional string, eithertrueorfalse
Status:
next_cfgโ integercur_cfgโ integerdpdk_initializedโ boolean
Statistics:
other_config : enable-statisticsโ optional string, eithertrueorfalsestatistics : cpuโ optional string, containing an integer, at least 1statistics : load_averageโ optional stringstatistics : memoryโ optional stringstatistics : process_NAMEโ optional stringstatistics : file_systemsโ optional string
Version Reporting:
ovs_versionโ optional stringdb_versionโ optional stringsystem_typeโ optional stringsystem_versionโ optional stringdpdk_versionโ optional string
Capabilities:
datapath_typesโ set of stringsiface_typesโ set of strings
Database Configuration:
manager_optionsโ set of Managers
IPsec:
other_config : private_keyโ optional stringother_config : certificateโ optional stringother_config : ca_certโ optional stringother_config : ipsec_skb_markโ optional string
(that last one lives under the Plaintext Tunnel Policy sub-heading, for the record ๐ซถ)
Common Columns:
other_configโ map of string-string pairsexternal_idsโ map of string-string pairs
๐ฅ Details: ๐ฅ
Configuration:
datapaths: map of string-Datapath pairs โ map of datapath types to datapaths. Thedatapath_typecolumn of theBridgetable is used as a key for this map, and the value points to a row in theDatapathtable. It's giving lookup table realness. โจbridges: set of Bridges โ the set of bridges managed by the daemon. Iconic. ๐ssl: optional SSL โ the SSL/TLS used globally by the daemon. One TLS to rule them all, periodt. ๐ฅexternal_ids : system-id: optional string โ a unique identifier for the Open vSwitch's physical host. The form of the identifier depends on the type of the host, so don't come for me about the format. ๐ฆexternal_ids : hostname: optional string โ the hostname for the host running Open vSwitch. Heads up: this is a fully qualified domain name since version 2.6.2. Mark the date, bestie. ๐
and that's literally just the first bite of this page โ there is SO much more, so stay with me, the rest is coming ๐
external_ids:rundirโ optional string ๐ In Open vSwitch 2.8 and later, this is the run directory of the running Open vSwitch daemon, periodt. It's where all the runtime state lives โ control sockets, management sockets, the whole vibe. And heads up: the value ofother_config:vhost-sock-diris relative to this directory, so don't come for me if it's giving "where did my socket go" energy.other_config:stats-update-intervalโ optional string, containing an integer, at least 5,000 ๐ This is the interval for updating statistics to the database, in milliseconds. It affects the update of thestatisticscolumn in these tables, bestie:Port,Interface,Mirror. The default value is5000ms. If you want stats more frequently than that, you can get them via OpenFlow. Slay.other_config:flow-restore-waitโ optional string, eithertrueorfalse๐ฆ Okay so whenovs-vswitchdstarts up, it has an empty flow table, which means it handles all arriving packets in its default fashion per its configuration โ dropping them, sending them to an OpenFlow controller, or switching them as a standalone switch. Ordinarily that behavior is desirable, no cap. BUT. Ifovs-vswitchdis restarting as part of a ``hot-upgrade,'' then you get a relatively long period where packets are mishandled. ๐ญ Not iconic.
This option allows for improvement. When ovs-vswitchd starts with this value set as true, it will neither flush nor expire previously set datapath flows, and it won't send or receive any packets to or from the datapath. When this value is later set to false, ovs-vswitchd will start receiving packets from the datapath and re-setup the flows. โจ
Additionally, ovs-vswitchd is prevented from connecting to controllers when this value is set to true. This prevents controllers from making changes to the flow table in the middle of flow restoration, which could result in undesirable intermediate states. Once this value has been set to false and the desired flow state has been restored, ovs-vswitchd will be able to reconnect to controllers and process any new flow table modifications.
So with this option, the procedure for a hot-upgrade of ovs-vswitchd becomes roughly the following:
- Stop
ovs-vswitchd. - Set
other_config:flow-restore-waittotrue. - Start
ovs-vswitchd. - Use
ovs-ofctl(or some other program, such as an OpenFlow controller) to restore the OpenFlow flow table to the desired state. - Set
other_config:flow-restore-waittofalse(or remove it entirely from the database).
The ovs-ctl's restart'' and force-reload-kmod'' functions use the above config option during hot upgrades. ๐ซถ
other_config:flow-limitโ optional string, containing an integer, at least 0 ๐ฅ The maximum number of flows allowed in the datapath flow table. Internally OVS will choose a flow limit which will likely be lower than this number, based on real time network conditions. Tweaking this value is discouraged unless you know exactly what you're doing. The default is200000.other_config:max-idleโ optional string, containing an integer, at least 500 โญ The maximum time (in ms) that idle flows will remain cached in the datapath. Internally OVS will check the validity and activity for datapath flows regularly and may expire flows quicker than this number, based on real time network conditions. Again, tweaking this value is discouraged unless you know exactly what you're doing. The default is10000.other_config:max-revalidatorโ optional string, containing an integer, at least 100 ๐ The maximum time (in ms) that revalidator threads will wait before executing flow revalidation. Note that this is the maximum allowed value โ the actual timeout used by OVS is the minimum ofmax-idleandmax-revalidator. Tweaking this value is discouraged unless you know exactly what you're doing. The default is500.other_config:min-revalidate-ppsโ optional string, containing an integer, at least 0 ๐ธ Set minimum pps that flow must have in order to be revalidated when revalidation duration exceeds half ofmax-revalidatorconfig variable. Setting to0means always revalidate flows regardless of pps. The default is5.other_config:offloaded-stats-delayโ optional string, containing an integer, at least 0 ๐ Set worst case delay (in ms) it might take before statistics of offloaded flows are updated. Offloaded flows younger than this delay will always be revalidated regardless ofother_config:min-revalidate-pps. The default is2000.other_config:hw-offloadโ optional string, eithertrueorfalse๐ Set this value totrueto enable netdev flow offload. The default value isfalse. Changing this value requires restarting the daemon.
Currently Open vSwitch supports hardware offloading on Linux systems. On other systems, this value is ignored. This functionality is considered 'experimental'. Depending on which OpenFlow matches and actions are configured, which kernel version is used, and what hardware is available, Open vSwitch may not be able to offload functionality to hardware. ๐
In order to dump HW offloaded flows use ovs-appctl dpctl/dump-flows โ ovs-dpctl doesn't support this functionality. See ovs-vswitchd(8) for details.
other_config:hw-offload-priorityโ optional string ๐ This configuration sets the order of the hardware offload providers to try when multiple exist for a given datapath implementation. The argument provided should be a list of comma-separated hardware offload provider names. If implementations are missing from the list, they are added at the end in undefined order. The default value istc,dpdk. Changing this value requires restarting the daemon if hardware offload is already enabled.other_config:n-offload-threadsโ optional string, containing an integer, in range 1 to 10 ๐ Set this value to the number of threads created to manage hardware offloads. The default value is1. Changing this value requires restarting the daemon. This is only relevant for userspace datapath and only ifother_config:hw-offloadis enabled.other_config:tc-policyโ optional string, one ofnone,skip_hw, orskip_sw๐ง Specifies the policy used with HW offloading. Options:noneโ Add software rule and offload rule to HW.skip_swโ Offload rule to HW only.skip_hwโ Add software rule without offloading rule to HW.
This is only relevant if other_config:hw-offload is enabled. The default value is none.
other_config:dpdk-initโ optional string, one offalse,true, ortry๐ Set this value totrueortryto enable runtime support for DPDK ports. The vswitch must have compile-time support for DPDK as well.
A value of true will cause the ovs-vswitchd process to abort if DPDK cannot be initialized. A value of try will allow the ovs-vswitchd process to continue running even if DPDK cannot be initialized. Choose wisely bestie ๐ญ
The default value is false. Changing this value requires restarting the daemon.
If this value is false at startup, any dpdk ports which are configured in the bridge will fail due to memory errors.
other_config:dpdk-lcore-maskโ optional string, containing an integer, at least 1 ๐ฅ Specifies the CPU cores where dpdk lcore threads should be spawned. The DPDK lcore threads are used for DPDK library tasks, such as library internal message processing, logging, etc. Value should be in the form of a hex string (so'0x123') similar to the'taskset'mask input.
The lowest order bit corresponds to the first CPU core. A set bit means the corresponding core is available and an lcore thread will be created and pinned to it. If the input does not cover all cores, those uncovered cores are considered not set.
The lowest set core will be assigned in DPDK as the DPDK main thread. Other set bits will be assigned by DPDK as DPDK worker threads. As OVS implements its own threading for the datapath (see other_config:pmd-cpu-mask), DPDK worker threads will be unused.
If this option is specified, all OVS main, handler, and revalidator threads will be pinned to the selected DPDK main thread core. This means that potentially many threads will share a single CPU core, which may not be desirable for performance reasons. ๐
If this option is not specified the value for DPDK initialization will be auto-determined and all OVS main, revalidator and handler threads will float on the OVS cpu affinity list.
other_config:pmd-cpu-maskโ optional string ๐ฆ Specifies CPU mask for setting the cpu affinity of PMD (Poll Mode Driver) threads. Value should be in the form of hex string, similar to the dpdk EAL'-c COREMASK'option input or the'taskset'mask input.
The lowest order bit corresponds to the first CPU core. A set bit means the corresponding core is available and a pmd thread will be created and pinned to it. If the input does not cover all cores, those uncovered cores are considered not set.
If not specified, one pmd thread will be created for each numa node and pinned to any available core on the numa node by default.
other_config:dpdk-alloc-memโ optional string, containing an integer, at least 0 ๐ธ Specifies the amount of memory to preallocate from the hugepage pool, regardless of socket. It is recommended thatdpdk-socket-memis used instead. (Like, this one is giving "legacy," iykyk.)other_config:dpdk-socket-memโ optional string ๐ Specifies the amount of memory to preallocate from the hugepage pool, on a per-socket basis.
The specifier is a comma-separated string, in ascending order of CPU socket. E.g. On a four socket system 1024,0,2048 would set socket 0 to preallocate 1024MB, socket 1 to preallocate 0MB, socket 2 to preallocate 2048MB and socket 3 (no value given) to preallocate 0MB. Math ate, honestly. โจ
If other_config:dpdk-socket-mem and other_config:dpdk-alloc-mem are both not specified, then neither of them gets used and there's justโฆ no default value for each numa node, bestie ๐. DPDK's own defaults take over instead. And if you set other_config:dpdk-socket-mem and other_config:dpdk-alloc-mem at the same time? Then other_config:dpdk-socket-mem gets used as the default, slay. Changing this value requires restarting the daemon.
other_config : dpdk-socket-limit โ optional string
Caps the maximum amount of memory that can be pulled from the hugepage pool, and it does it per-socket ๐.
The specifier is a comma-separated list of memory limits per socket, and 0 will disable the limit for a particular socket.
If you don't specify it, OVS won't configure any limits by default. Changing this value requires restarting the daemon.
other_config : dpdk-hugepage-dir โ optional string
Tells OVS where the hugetlbfs mount point lives, path-wise ๐ฆ.
If not specified, the DPDK library guesses it for you (default is /dev/hugepages). Changing this value requires restarting the daemon.
other_config : dpdk-probe-at-init โ optional string, either true or false
This one decides whether DPDK should probe all the devices available at the time DPDK gets initialized ๐. When it's set to false (which is the default, btw), OVS tells DPDK to skip probing devices at initialization โ unless other_config:dpdk-extra already contains allowed or blocked devices. You literally need this when you're declaring DPDK ports using the class=eth,mac=XX:XX:XX:XX:XX:XX syntax, iykyk.
Turning this on implies higher resource consumption, because OVS may not use all the probed devices ๐ญ. It can also cause undesired side effects like additional interrupt handling and link status checks for unused devices. For example, mlx5 devices maintain link status and liveness by taking kernel locks frequently, even when OVS only uses a subset of the available ports.
Lowkey important note: this option has no effect when other_config:dpdk-extra contains allowed (-a or --allow) or blocked (-b or --block) devices, since DPDK will honor those specifications regardless of this setting. Periodt.
Defaults to false.
other_config : dpdk-extra โ optional string
Specifies additional eal command line arguments for DPDK โจ.
The default is empty. Changing this value requires restarting the daemon.
other_config : vhost-sock-dir โ optional string
Specifies a relative path from external_ids:rundir to the vhost-user unix domain socket files ๐ง. If this value is unset, the sockets are put directly in external_ids:rundir.
Changing this value requires restarting the daemon.
other_config : vhost-iommu-support โ optional string, either true or false
vHost IOMMU is a security feature that restricts the vhost memory a virtio device is allowed to access ๐ฅ. It's disabled by default because of a bug in QEMU implementations of the vhost REPLY_ACK protocol (which vHost IOMMU relies on) prior to v2.9.1 โ so like, not us, it's them ๐. Setting this value to true enables vHost IOMMU support for vHost User Client ports in OvS-DPDK, starting from DPDK v17.11.
Changing this value requires restarting the daemon.
other_config : vhost-postcopy-support โ optional string, either true or false
vHost post-copy is a feature that lets you switch live migration of a VM attached to a dpdkvhostuserclient port over to post-copy mode โ which you want when the default pre-copy migration can't converge or is taking way too long to converge ๐ฎโ๐จ. Setting this value to true enables vHost post-copy support for all dpdkvhostuserclient ports. Available starting from DPDK v18.11 and QEMU 2.12.
Changing this value requires restarting the daemon.
other_config : per-port-memory โ optional string, either true or false
By default OVS DPDK uses a shared memory model where devices that have the same MTU and socket values can share the same mempool ๐ซถ. Setting this value to true changes that behaviour โ per-port memory lets DPDK devices use private memory per device. It gives you way more transparency as far as memory usage goes, but potentially at the cost of greater memory requirements.
Changing this value requires restarting the daemon if dpdk-init has already been set to true.
other_config : shared-mempool-config โ optional string
Specifies the dpdk shared mempool config ๐.
The value should be set in the following form:
other_config:shared-mempool-config=<user-shared-mempool-mtu-list>
where:
<user-shared-mempool-mtu-list>::=NULL|<non-empty-list><non-empty-list>::=<user-mtus>|<user-mtus>,<non-empty-list><user-mtus>::=<mtu-all-socket>|<mtu-socket-pair><mtu-all-socket>::=<mtu><mtu-socket-pair>::=<mtu>:<socket-id>
Changing this value requires restarting the daemon if dpdk-init has already been set to true.
other_config : tx-flush-interval โ optional string, containing an integer, in range 0 to 1,000,000
Specifies the time in microseconds that a packet can wait in the output batch before sending โ basically the amount of time a packet can chill in an intermediate output queue before it goes to the netdev โณ. Use this to configure the balance between throughput and latency. Lower values decrease latency, while higher values may be useful for achieving higher performance.
Defaults to 0, i.e. instant packet sending (latency optimized) โก.
other_config : pmd-perf-metrics โ optional string, either true or false
Enables recording of detailed PMD performance metrics for analysis and trouble-shooting ๐. Heads up: this can have a performance impact in the order of 1%.
Defaults to false, but can be changed at any time.
other_config : smc-enable โ optional string, either true or false
Signature match cache, or SMC, is a cache sitting between EMC and the megaflow cache ๐ธ. It doesn't store the full key of the flow, so it's more memory efficient compared to EMC cache. SMC is especially useful when the flow count is larger than EMC capacity.
Defaults to false, but can be changed at any time.
other_config : pmd-rxq-assign โ optional string, one of cycles, group, or roundrobin
Specifies how RX queues get automatically assigned to CPU cores ๐ . The options:
cyclesโ Rxqs will be sorted by order of measured processing cycles before being assigned to CPU cores.roundrobinโ Rxqs will be round-robined across CPU cores.groupโ Rxqs will be sorted by order of measured processing cycles before being assigned to CPU cores with lowest estimated load.
The default value is cycles.
Changing this value will affect an automatic re-assignment of Rxqs to CPUs. Note: Rxqs mapped to CPU cores with pmd-rxq-affinity are unaffected ๐
โโ๏ธ.
other_config : pmd-rxq-isolate โ optional string, either true or false
Specifies if a CPU core will be isolated after being pinned with an Rx queue ๐.
Set this value to false to non-isolate a CPU core after it's pinned with an Rxq using pmd-rxq-affinity. That lets OVS assign other Rxqs to that CPU core.
The default value is true.
This can only befalsewhenpmd-rxq-assignis set togroup. So like, don't try it otherwise ๐ญ.
other_config : n-handler-threads โ optional string, containing an integer, at least 1
Attempts to specify the number of threads for software datapaths to use for handling new flows ๐งต. Some datapaths may choose to ignore this and it'll be set to a sensible option for the datapath type.
This configuration is per datapath. If you have more than one software datapath (e.g. some system bridges and some netdev bridges), then the total number of threads is n-handler-threads times the number of software datapaths.
other_config : n-revalidator-threads โ optional string, containing an integer, at least 1
Attempts to specify the number of threads for software datapaths to use for revalidating flows in the datapath ๐. Some datapaths may choose to ignore this and will set to a sensible option for the datapath type.
Typically, there's a direct correlation between the number of revalidator threads and the number of flows allowed in the datapath. The default is the number of cpu cores divided by four plus one. If n-handler-threads is set, the default changes to the number of cpu cores minus the number of handler threads.
This configuration is per datapath. If you have more than one software datapath (e.g. some system bridges and some netdev bridges), then the total number of threads is n-handler-threads times the number of software datapaths.
other_config : emc-insert-inv-prob โ optional string, containing an integer, in range 0 to 4,294,967,295
Specifies the inverse probability (1/emc-insert-inv-prob) of a flow being inserted into the Exact Match Cache (EMC) ๐. On average, one in every emc-insert-inv-prob packets that generate a unique flow will cause an insertion into the EMC. A value of 1 results in an insertion for every flow (1/1 = 100%), whereas a value of zero results in no insertions at all and essentially disables the EMC.
Defaults to 100, ie. there's (1/100 =) 1% chance of EMC insertion.
other_config : vlan-limit โ optional string, containing an integer, at least 0
Limits the number of VLAN headers that can be matched to the specified number ๐. Any further VLAN headers get treated as payload โ e.g. a packet with more 802.1q headers will match Ethernet type 0x8100.
Open vSwitch userspace currently supports at most 2 VLANs, and each datapath has its own limit. If vlan-limit is nonzero, it acts as a further limit.
If this value is absent, the default is currently 1. That keeps backward compatibility with controllers that were designed for use with Open vSwitch versions earlier than 2.8, which only supported one VLAN ๐.
other_config : bundle-idle-timeoutโ optional string, containing an integer, at least 1. The maximum time (in seconds) that idle bundles will wait to be expired since it was either opened, modified, or closed. The OpenFlow specification mandates the timeout be at least one second. The default is10seconds. ๐other_config : offload-rebalanceโ optional string, either true or false. Configures HW offload rebalancing, which allows flows to be dynamically offloaded and un-offloaded while anoffload-deviceis out of resources (OOR). This policy allows flows to be selected for offloading based on the packets-per-second (pps) rate of flows. Set this value totrueto enable this option. The default value isfalse. Changing this value requires restarting the daemon. This is only relevant if HW offloading is enabled (hw-offload). When this policy is enabled, it also requirestc-policyto be set toskip_sw. ๐ฅother_config : pmd-auto-lbโ optional string, either true or false. Configures PMD Auto Load Balancing, which allows automatic assignment of RX queues to PMDs if any of the PMDs is overloaded (i.e. processing cycles >other_config:pmd-auto-lb-load-threshold). It uses the current scheme of cycle based assignment of RX queues that are not statically pinned to PMDs. The default value isfalse. Set this value totrueto enable this option. It is currently disabled by default and an experimental feature. This only comes into effect if cycle based assignment is enabled and there are more than one non-isolated PMDs present and at least one of them polls more than one queue. ๐ฆother_config : pmd-auto-lb-rebal-intervalโ optional string, containing an integer, in range 0 to 20,000. The minimum time (in minutes) between 2 consecutive PMD Auto Load Balancing iterations. The default value is1 min. If configured to0, then it is converted to the default value, i.e.1 min. This option can be configured to avoid frequent triggering of auto load balancing of PMDs. For e.g., set the value (in min) such that it occurs once in a few hours or a day or a week. โญother_config : pmd-auto-lb-load-thresholdโ optional string, containing an integer, in range 0 to 100. Specifies the minimum PMD thread load threshold (% of used cycles) of any non-isolated PMD threads when a PMD Auto Load Balance may be triggered. The default value is95%. ๐other_config : pmd-auto-lb-improvement-thresholdโ optional string, containing an integer, in range 0 to 100. Specifies the minimum evaluated % improvement in load distribution across the non-isolated PMD threads that will allow a PMD Auto Load Balance to occur. Note: setting this parameter to0will always allow an auto load balance to occur regardless of estimated improvement or not. The default value is25%. ๐other_config : pmd-sleep-maxโ optional string. Specifies the maximum sleep time that will be requested in microseconds per iteration for a PMD thread which has received zero or a small amount of packets from the Rx queues it is polling. The actual sleep time requested is based on the load of the Rx queues that the PMD polls and may be less than the maximum value. The default value is0microseconds, which means that the PMD will not sleep regardless of the load from the Rx queues that it polls. The maximum value is10000microseconds. The format is:
other_config:pmd-sleep-max=<pmd-sleep-list>
where
<pmd-sleep-list>::=NULL|<non-empty-list><non-empty-list>::=<pmd-sleep-value>|<pmd-sleep-value>,<non-empty-list><pmd-sleep-value>::=<global-default-sleep-value>|<pmd-core-sleep-pair><global-default-sleep-value>::=<max-sleep-time><pmd-core-sleep-pair>::=<core>:<max-sleep-time>other_config : userspace-tso-enableโ optional string, either true or false. Set this value totrueto enable userspace support for TCP Segmentation Offloading (TSO). When it is enabled, the interfaces can provide an oversized TCP segment to the datapath and the datapath will offload the TCP segmentation and checksum calculation to the interfaces when necessary. The default value isfalse. Changing this value requires restarting the daemon. The feature only works if Open vSwitch is built with DPDK support. The feature is considered experimental. ๐งother_config : explicit-sampled-dropsโ optional string, either true or false. When a flow is installed in the datapath with an empty action list, it indicates an implicit"drop"action. Most datapaths report this event for statistics and monitoring (in datapath-specific ways). However, if any of the per-bridge or per-flow sampling functionalities are enabled (e.g: sFlow, IPFIX, local sampling), the action list might not be empty, but contain an action to implement such functionality. This makes the datapaths not report the packet drop. This knob makes Open vSwitch detect when the last datapath action comes from these sampling features and add an explicit drop action at the end to keep drop statistics accurate. The default value isfalse. ๐
๐ Status ๐
next_cfgโ integer. Sequence number for client to increment. When a client modifies any part of the database configuration and wishes to wait for Open vSwitch to finish applying the changes, it may increment this sequence number.cur_cfgโ integer. Sequence number that Open vSwitch sets to the current value ofnext_cfgafter it finishes applying a set of configuration changes.dpdk_initializedโ boolean. True ifother_config:dpdk-initis set totrueand the DPDK library is successfully initialized. ๐
๐ธ Statistics ๐ธ
The statistics column contains key-value pairs that report statistics about a system running an Open vSwitch. These are updated periodically (currently, every 5 seconds). Key-value pairs that cannot be determined or that do not apply to a platform are omitted. Bestie, itโs giving system gossip but with numbers. ๐ซถ
other_config : enable-statisticsโ optional string, either true or false. Statistics are disabled by default to avoid overhead in the common case when statistics gathering is not useful. Set this value totrueto enable populating thestatisticscolumn, or tofalseto explicitly disable it.statistics : cpuโ optional string, containing an integer, at least 1. Number of CPU processors, threads, or cores currently online and available to the operating system on which Open vSwitch is running, as an integer. This may be less than the number installed if some are not online or if they are not available to the operating system.statistics : load_averageโ optional string. A comma-separated list of three floating-point numbers, representing the system load average over the last1,5, and15minutes, respectively.statistics : memoryโ optional string. A comma-separated list of integers, each of which represents a quantity of memory in kilobytes that describes the operating system on which Open vSwitch is running. In respective order, these values are:- Total amount of RAM allocated to the OS.
- RAM allocated to the OS that is in use.
- RAM that can be flushed out to disk or otherwise discarded if that space is needed for another purpose. This number is necessarily less than or equal to the previous value.
- Total disk space allocated for swap.
- Swap space currently in use.
On Linux, all five values can be determined and are included. On other operating systems, only the first two values can be determined, so the list will only have two values. ๐ง
statistics : process_NAMEโ optional string. One such key-value pair, withNAMEreplaced by a process name, will exist for each running Open vSwitch daemon process, with name replaced by the daemonโs name (e.g.process_ovs-vswitchd). The value is a comma-separated list of integers. The integers represent the following, with memory measured in kilobytes and durations in milliseconds:- The processโs virtual memory size.
- The processโs resident set size.
- The amount of user and system CPU time consumed by the process.
- The number of times that the process has crashed and been automatically restarted by the monitor.
- The duration since the process was started.
- The duration for which the process has been running.
The interpretation of some of these values depends on whether the process was started with --monitor. If it was not, then the crash count will always be 0 and the two durations will always be the same. If --monitor was given, then the crash count may be positive; if it is, the latter duration is the amount of time since the most recent crash and restart.
There will be one key-value pair for each file in Open vSwitchโs โrun directoryโ (usually /var/run/openvswitch) whose name ends in .pid, whose contents are a process ID, and which is locked by a running process. The name is taken from the pidfileโs name.
Currently Open vSwitch is only able to obtain all of the above detail on Linux systems. On other systems, the same key-value pairs will be present but the values will always be the empty string. ๐ญ
statistics : file_systemsโ optional string. A space-separated list of information on local, writable file systems. Each item in the list describes one file system and consists in turn of a comma-separated list of the following:- Mount point, e.g.
/or/var/log. Any spaces or commas in the mount point are replaced by underscores. - Total size, in kilobytes, as an integer.
- Amount of storage in use, in kilobytes, as an integer.
- Mount point, e.g.
This key-value pair is omitted if there are no local, writable file systems or if Open vSwitch cannot obtain the needed information. ๐
๐ Version Reporting ๐
These columns are like the little ID card for the hardware and software running Open vSwitch โ types and versions, the whole vibe check. General recommendation, bestie: your software should test whether specific features are supported instead of doing version-number math, because versions lie and features don't. These values are mostly here so a human admin can read them and go "oh, okay, cool." ๐
ovs_version: optional string โ The Open vSwitch version number, like1.1.0.db_version: optional string โ The database schema version number, like1.2.3. Peepovsdb-tool(1)for the whole explanation of how that numbering scheme works.
Ngl, the schema version is literally part of the database schema, so you can also grab it by fetching the schema through the Open vSwitch database protocol. โจ
system_type: optional string โ An identifier for the type of system that Open vSwitch is running on top of, likeKVM.
System integrators are the ones responsible for picking and setting an appropriate value for this column. Not our problem, it's theirs. ๐ซถ
system_version: optional string โ The version of the system identified bysystem_type, like4.18.0-372.19.1.el8_6on RHEL 8.6 with kernel4.18.0-372.19.1.
Again: system integrators choose and set an appropriate value here. ๐
dpdk_version: optional string โ The version of the linked DPDK library.
โจ Capabilities โจ
These columns are basically the brag section โ they report what this particular Open vSwitch instance can actually do. ๐ฅ
datapath_types: set of strings โ Reports all the different dpifs registered with the system. These are exactly the values this instance supports in thedatapath_typecolumn of theBridgetable.iface_types: set of strings โ Reports all the different netdevs registered with the system. These are exactly the values this instance supports in thetypecolumn of theInterfacetable.
๐ Database Configuration ๐
Okay so these columns mainly configure the Open vSwitch database (ovsdb-server) โ not the Open vSwitch switch (ovs-vswitchd). Lowkey an important distinction, don't mix them up. The OVSDB database also uses the ssl settings, for the record.
The Open vSwitch switch does read the database configuration though, just to figure out the remote IP addresses that in-band control should apply to.
manager_options: set of Managers โ Database clients that the Open vSwitch database server should connect to or listen for, plus options for how those connections should be configured. Check theManagertable for the deets.
For this column to actually serve its purpose, ovsdb-server must be configured to honor it. The easiest way to make that happen is to invoke ovsdb-server with the option --remote=db:Open_vSwitch,Open_vSwitch,manager_options. The startup scripts that come with Open vSwitch do this by default โ iconic behavior, they got you. ๐
๐ IPsec ๐
These settings control the global configuration of IPsec tunnels. The options column of the Interface table is where you configure IPsec for individual tunnels. That options column also lets you pass custom options prefixed with ipsec_ through to the individual connections. iykyk.
OVS IPsec supports the following three forms of authentication. Currently, all IPsec tunnels must use the same form:
- Pre-shared keys: Omit the global settings. On each tunnel, set
options:psk. - Self-signed certificates: Set the
private_keyandcertificateglobal settings. On each tunnel, setoptions:remote_cert. The remote certificate can be self-signed. - CA-signed certificates: Set all of the global settings. On each tunnel, set
options:remote_nameto the common name (CN) of the remote certificate. The remote certificate must be signed by the CA.
other_config:private_key: optional string โ Name of a PEM file containing the private key used as the switch's identity for IPsec tunnels. ๐๏ธother_config:certificate: optional string โ Name of a PEM file containing a certificate that certifies the switch's private key, and identifies a trustworthy switch for IPsec tunnels. The certificate must be x.509 version 3 and must have the string in common name (CN) also set in the subject alternative name (SAN). No shortcuts, bestie. ๐other_config:ca_cert: optional string โ Name of a PEM file containing the CA certificate used to verify that a remote switch of the IPsec tunnel is trustworthy.
๐ฆ Plaintext Tunnel Policy ๐ฆ
Okay, storytime, because this one's kinda dramatic. ๐ญ When an IPsec tunnel is configured in this database, multiple independent components take responsibility for implementing it. ovs-vswitchd and its datapath handle packet forwarding to the tunnel, and a separate daemon pushes the tunnel's IPsec policy configuration to the kernel or whatever other entity implements it. So there's a race: if the former configuration finishes before the latter, then packets sent by the local host over the tunnel can be transmitted in plaintext. Not the vibe. Using this setting, OVS users can avoid this extremely undesirable situation.
other_config:ipsec_skb_mark: optional string โ This setting takes the form value/mask. If it's specified, then theskb_markfield in every outgoing tunneled packet sent in plaintext gets compared against it and, if it matches, the packet is dropped. This is a global setting applied to every tunneled packet, regardless of whether IPsec encryption is enabled for that tunnel, the type of tunnel, or whether OVS is even involved. Fr fr, every packet. ๐
Example policies:
1/1โ Drop all unencrypted tunneled packets in which the least-significant bit ofskb_markis1. This would be a useful policy given an OpenFlow flow table that setsskb_markto1for traffic that should be encrypted. The defaultskb_markis0, so this wouldn't affect other traffic. Slay.0/1โ Drop all unencrypted tunneled packets in which the least-significant bit ofskb_markis0. This would be a useful policy if no unencrypted tunneled traffic should exit the system without being specially permitted by settingskb_markto1.- (empty) โ If this setting is empty or unset, then all unencrypted tunneled packets are transmitted in the usual way.
๐ Common Columns ๐
The overall purpose of these columns is explained under Common Columns at the beginning of this document โ go peek if you missed it, bestie. ๐
other_config: map of string-string pairsexternal_ids: map of string-string pairs
๐ Bridge TABLE ๐
Configuration for a bridge within an Open_vSwitch. Think of it as one whole switch, vibes and all. ๐ซถ
A Bridge record represents an Ethernet switch with one or more ``ports,'' which are the Port records pointed to by the Bridge's ports column. So the bridge is the main character and the ports are its entourage. ๐
๐งก Core Features
nameโ immutable string (must be unique within table)portsโ set of Portsmirrorsโ set of Mirrorsnetflowโ optional NetFlowsflowโ optional sFlowipfixโ optional IPFIXflood_vlansโ set of up to 4,096 integers, in range 0 to 4,095auto_attachโ optional AutoAttach
๐ OpenFlow Configuration
controllerโ set of Controllersflow_tablesโ map of integer-Flow_Table pairs, key in range 0 to 254fail_modeโ optional string, either secure or standalonedatapath_idโ optional stringdatapath_versionโ stringother_config:datapath-idโ optional stringother_config:dp-descโ optional stringother_config:dp-snโ optional stringother_config:disable-in-bandโ optional string, either true or falseother_config:in-band-queueโ optional string, containing an integer, in range 0 to 4,294,967,295other_config:controller-queue-sizeโ optional string, containing an integer, in range 1 to 512protocolsโ set of strings, one ofOpenFlow10,OpenFlow11,OpenFlow12,OpenFlow13,OpenFlow14, orOpenFlow15
๐ณ Spanning Tree Configuration
STP Configuration โ like, the whole tree-vibes setup โจ
stp_enableโ booleanother_config:stp-system-idโ optional stringother_config:stp-priorityโ optional string, containing an integer, in range 0 to 65,535other_config:stp-hello-timeโ optional string, containing an integer, in range 1 to 10other_config:stp-max-ageโ optional string, containing an integer, in range 6 to 40other_config:stp-forward-delayโ optional string, containing an integer, in range 4 to 30other_config:mcast-snooping-aging-timeโ optional string, containing an integer, at least 1other_config:mcast-snooping-table-sizeโ optional string, containing an integer, at least 1other_config:mcast-snooping-disable-flood-unregisteredโ optional string, either true or false
STP Status โ the receipts, basically ๐
status:stp_bridge_idโ optional stringstatus:stp_designated_rootโ optional stringstatus:stp_root_path_costโ optional string
๐ฆ Rapid Spanning Tree
RSTP Configuration โ STP but make it fast ๐โโ๏ธ๐จ
rstp_enableโ booleanother_config:rstp-addressโ optional stringother_config:rstp-priorityโ optional string, containing an integer, in range 0 to 61,440other_config:rstp-ageing-timeโ optional string, containing an integer, in range 10 to 1,000,000other_config:rstp-force-protocol-versionโ optional string, containing an integerother_config:rstp-max-ageโ optional string, containing an integer, in range 6 to 40other_config:rstp-forward-delayโ optional string, containing an integer, in range 4 to 30other_config:rstp-transmit-hold-countโ optional string, containing an integer, in range 1 to 10
RSTP Status โ the group chat read receipts for RSTP ๐
rstp_status:rstp_bridge_idโ optional stringrstp_status:rstp_root_idโ optional stringrstp_status:rstp_root_path_costโ optional string, containing an integer, at least 0rstp_status:rstp_designated_idโ optional stringrstp_status:rstp_designated_port_idโ optional stringrstp_status:rstp_bridge_port_idโ optional string
๐ Multicast Snooping Configuration
mcast_snooping_enableโ boolean
๐ Other Features
datapath_typeโ stringexternal_ids:bridge-idโ optional stringother_config:hwaddrโ optional stringother_config:forward-bpduโ optional string, either true or falseother_config:mac-aging-timeโ optional string, containing an integer, at least 1other_config:mac-table-sizeโ optional string, containing an integer, at least 1
๐ซถ Common Columns
other_configโ map of string-string pairsexternal_idsโ map of string-string pairs
๐ Details
๐งก Core Features
name โ immutable string (must be unique within table)
Okay so this is the bridge identifier, bestie โ the government name of the bridge. It must be unique among the names of ports, interfaces, and bridges on a host. No duplicates, periodt.
It has to be alphanumeric and it must not contain forward or backward slashes (/ or \), so no funny business. Also โ and this is the part that gets people โ the name of a bridge is also the name of an Interface (and a Port) within the bridge, so literally all the restrictions on the name column in the Interface table apply here too, especially the length ones. Go read the docs for Interface names if you need the full tea. ๐
ports โ set of Ports
The Ports that are included in the bridge. That's it, that's the vibe.
mirrors โ set of Mirrors
Port mirroring configuration. Copying traffic, but make it config.
netflow โ optional NetFlow
NetFlow configuration. Optional, obviously.
sflow โ optional sFlow
sFlow(R) configuration. Yes, with the ยฎ โ it's that official.
ipfix โ optional IPFIX
IPFIX configuration. Three flow-flavored besties, all optional, all valid.
flood_vlans โ set of up to 4,096 integers, in range 0 to 4,095
These are VLAN IDs of VLANs where MAC address learning should be disabled, so packets get flooded instead of being sent to specific ports that are believed to contain the packets' destination MACs. Basically: stop trying to be smart on these VLANs and just yell the packet into the void.
This is ordinarily used to disable MAC learning on VLANs used for mirroring (RSPAN VLANs). It may also be useful for debugging. Ngl, debugging is a mood.
โ ๏ธ SLB bonding (see thebond_modecolumn in the Port table) is incompatible withflood_vlans. Consider using another bonding mode or a different type of mirror instead. Not a suggestion, like, an actual vibe check failure if you ignore it ๐
auto_attach โ optional AutoAttach
Auto Attach configuration. Plug-and-play energy.
๐ OpenFlow Configuration
controller โ set of Controllers
The OpenFlow controller set. If it's unset, then no OpenFlow controllers will be used. Zero, zilch, none.
Now here's the part that's highkey important: if there are primary controllers, removing all of them clears the OpenFlow flow tables, group table, and meter table. And if there are no primary controllers, adding one also clears these tables. โจ Poof โจ
Other changes to the set of controllers have no effect on these tables. That includes adding or removing a service controller, adding another primary controller to supplement an existing primary controller, or removing only one of two primary controllers. None of those touch the tables. The more you know ๐ซถ
flow_tables โ map of integer-Flow_Table pairs, key in range 0 to 254
Configuration for OpenFlow tables. Each pair maps from an OpenFlow table ID to configuration for that table. Simple as that โ key says which table, value says how it's configured.
fail_mode โ optional string, either secure or standalone
Okay so when a controller is configured, it is, ordinarily, responsible for setting up all the flows on the switch. Which means if the connection to the controller fails, no new network connections can be set up. And if the connection to the controller stays down long enough, literally no packets can pass through the switch at all. Yeah. ๐ญ This setting decides how the switch responds to that whole situation. It may be set to one of these:
standaloneโ If no message is received from the controller for three times the inactivity probe interval (seeinactivity_probe), then Open vSwitch will take over responsibility for setting up flows. In this mode, Open vSwitch causes the bridge to act like an ordinary MAC-learning switch. Open vSwitch will keep retrying the connection to the controller in the background and, when the connection succeeds, it will discontinue its standalone behavior. It's giving "I'll do it myself" energy ๐ชsecureโ Open vSwitch will not set up flows on its own when the controller connection fails or when no controllers are defined. The bridge will continue to retry connecting to any defined controllers forever. Loyal to a fault, fr fr.
The default is standalone if the value is unset, but future versions of Open vSwitch may change the default. So don't get too attached.
๐จ Thestandalonemode can create forwarding loops on a bridge that has more than one uplink port unless STP is enabled. To avoid loops on such a bridge, configuresecuremode or enable STP (seestp_enable). Loops are not the cute kind, bestie โ they're the network-down kind ๐
The fail_mode setting applies only to primary controllers. When more than one primary controller is configured, fail_mode is considered only when none of the configured controllers can be contacted. Like, it's the last-resort group chat admin.
Changing fail_mode when no primary controllers are configured clears the OpenFlow flow tables, group table, and meter table. Boom, gone, iconic destructive behavior ๐
datapath_id โ optional string
Reports the OpenFlow datapath ID in use. Exactly 16 hex digits, no more, no less.
๐ Setting this column has no useful effect. Set other-config:datapath-id instead. That's the one that actually does something.
datapath_version โ string
Reports the datapath version. This column is maintained for backwards compatibility โ it's legacy, it's vintage, it's still here. The preferred location is the datapath_id column of the Datapath table. The full documentation for this column is there. Go look, iykyk ๐
okay so the other_config column has more little knobs, and they are lowkey iconic:
other_config : datapath-idโ optional string. Overrides the default OpenFlow datapath ID, setting it to the specified value in hex. The value must either have a0xprefix or be exactly 16 hex digits long. May not be all-zero. periodt.other_config : dp-descโ optional string. Human readable description of the datapath. It is a maximum 256 byte-long free-form string to describe the datapath for debugging purposes, e.g.switch3 in room 3120. The value is returned by the switch as a part of reply toOFPMP_DESCrequest (ofp_desc). The OpenFlow specification (e.g.1.3.5) describes theofp_descstructure as containing โNULL terminated ASCII stringsโ. For compatibility reasons no more than 255 ASCII characters should be used. iykyk.other_config : dp-snโ optional string. Serial number. It is a maximum 32 byte-long free-form string to provide an additional switch identification. The value is returned by the switch as a part of reply toOFPMP_DESCrequest (ofp_desc). Same as mentioned in the description ofother-config:dp-desc, the string should be no more than 31 ASCII characters for compatibility. cute little serial, slay.other_config : disable-in-bandโ optional string, eithertrueorfalse. If set totrue, disable in-band control on the bridge regardless of controller and manager settings. no cap, it just turns it off.other_config : in-band-queueโ optional string, containing an integer, in range0 to 4,294,967,295. A queue ID as a nonnegative integer. This sets the OpenFlow queue ID that will be used by flows set up by in-band control on this bridge. If unset, or if the port used by an in-band control flow does not have QoS configured, or if the port does not have a queue with the specified ID, the default queue is used instead. default queue said โI got you.โother_config : controller-queue-sizeโ optional string, containing an integer, in range1 to 512. This sets the maximum size of the queue of packets that need to be sent to the OpenFlow management controller. The value must be less than512. If not specified the queue size is limited to100packets by default. Note: increasing the queue size might have a negative impact on latency. big queue, big feelings, maybe big delay.protocolsโ set of strings, one ofOpenFlow10,OpenFlow11,OpenFlow12,OpenFlow13,OpenFlow14, orOpenFlow15. List of OpenFlow protocols that may be used when negotiating a connection with a controller. OpenFlow1.0,1.1,1.2,1.3,1.4, and1.5are enabled by default if this column is empty. protocol negotiation era ๐
๐ณ Spanning Tree Configuration ๐ณ
The IEEE 802.1D Spanning Tree Protocol (STP) is a network protocol that ensures loop-free topologies. It allows redundant links to be included in the network to provide automatic backup paths if the active links fails. backup path bestie behavior.
These settings configure the slower-to-converge but still widely supported version of Spanning Tree Protocol, sometimes known as 802.1D-1998. Open vSwitch also supports the newer Rapid Spanning Tree Protocol (RSTP), documented later in the section titled Rapid Spanning Tree Configuration. yes, there are two STP eras, and weโre covering both.
๐ STP Configuration ๐
stp_enableโ boolean. Enable spanning tree on the bridge. By default, STP is disabled on bridges. Bond, internal, and mirror ports are not supported and will not participate in the spanning tree. STP and RSTP are mutually exclusive. If both are enabled, RSTP will be used.other_config : stp-system-idโ optional string. The bridgeโs STP identifier (the lower 48 bits of the bridge-id) in the formxx:xx:xx:xx:xx:xx. By default, the identifier is the MAC address of the bridge. MAC address main character energy.other_config : stp-priorityโ optional string, containing an integer, in range0 to 65,535. The bridgeโs relative priority value for determining the root bridge (the upper 16 bits of the bridge-id). A bridge with the lowest bridge-id is elected the root. By default, the priority is0x8000. lowest bridge-id wins the root crown ๐other_config : stp-hello-timeโ optional string, containing an integer, in range1 to 10. The interval between transmissions of hello messages by designated ports, in seconds. By default the hello interval is2seconds. hello? yes, every 2 seconds.other_config : stp-max-ageโ optional string, containing an integer, in range6 to 40. The maximum age of the information transmitted by the bridge when it is the root bridge, in seconds. By default, the maximum age is20seconds. aging gracefully, but make it STP.other_config : stp-forward-delayโ optional string, containing an integer, in range4 to 30. The delay to wait between transitioning root and designated ports to forwarding, in seconds. By default, the forwarding delay is15seconds. wait for itโฆ wait for itโฆ forward.other_config : mcast-snooping-aging-timeโ optional string, containing an integer, at least1. The maximum number of seconds to retain a multicast snooping entry for which no packets have been seen. The default is currently300seconds (5 minutes). The value, if specified, is forced into a reasonable range, currently15 to 3600seconds. multicast memory: not forever, bestie.other_config : mcast-snooping-table-sizeโ optional string, containing an integer, at least1. The maximum number of multicast snooping addresses to learn. The default is currently2048. The value, if specified, is forced into a reasonable range, currently10 to 1,000,000. big table energy, within reason.other_config : mcast-snooping-disable-flood-unregisteredโ optional string, eithertrueorfalse. If set tofalse, unregistered multicast packets are forwarded to all ports. If set totrue, unregistered multicast packets are forwarded to ports connected to multicast routers. flood check: unregistered edition.
๐ STP Status ๐
These key-value pairs report the status of 802.1D-1998. They are present only if STP is enabled (via the stp_enable column). status girlies, only when STP is on.
status : stp_bridge_idโ optional string. The bridge ID used in spanning tree advertisements, in the formxxxx.yyyyyyyyyyyywhere the xs are the STP priority, the ys are the STP system ID, and each x and y is a hex digit. hex digits eating, no crumbs.status : stp_designated_rootโ optional string. The designated root for this spanning tree, in the same form asstatus:stp_bridge_id. If this bridge is the root, this will have the same value asstatus:stp_bridge_id, otherwise it will differ. root check: is it me or not?status : stp_root_path_costโ optional string. The path cost of reaching the designated bridge. A lower number is better. The value is0if this bridge is the root, otherwise it is higher. lower cost = better vibes.
โก Rapid Spanning Tree โก
Rapid Spanning Tree Protocol (RSTP), like STP, is a network protocol that ensures loop-free topologies. RSTP superseded STP with the publication of 802.1D-2004. Compared to STP, RSTP converges more quickly and recovers more quickly from failures. faster convergence, faster comeback, periodt.
๐ ๏ธ RSTP Configuration ๐ ๏ธ
rstp_enableโ boolean. Enable Rapid Spanning Tree on the bridge. By default, RSTP is disabled on bridges. Bond, internal, and mirror ports are not supported and will not participate in the spanning tree. STP and RSTP are mutually exclusive. If both are enabled, RSTP will be used.other_config : rstp-addressโ optional string. The bridgeโs RSTP address (the lower 48 bits of the bridge-id) in the formxx:xx:xx:xx:xx:xx. By default, the address is the MAC address of the bridge. address reveal: itโs giving MAC.other_config : rstp-priorityโ optional string, containing an integer, in range0 to 61,440. The bridgeโs relative priority value for determining the root bridge (the upper 16 bits of the bridge-id). A bridge with the lowest bridge-id is elected the root. By default, the priority is0x8000(32768). This value needs to be a multiple of4096, otherwise itโs rounded to the nearest inferior one. math check: multiple of 4096 or get rounded down.other_config : rstp-ageing-timeโ optional string, containing an integer, in range10 to 1,000,000. The Ageing Time parameter for the Bridge. The default value is300seconds. ageing time, not a skincare routine.other_config : rstp-force-protocol-versionโ optional string, containing an integer. The Force Protocol Version parameter for the Bridge. This can take the value0(STP Compatibility mode) or2(the default, normal operation). version check: 0 for compat, 2 for normal.other_config : rstp-max-ageโ optional string, containing an integer, in range6 to 40. The maximum age of the information transmitted by the Bridge when it is the Root Bridge. The default value is20. root bridge info, max age 20.other_config : rstp-forward-delayโ optional string, containing an integer, in range4 to 30. The delay used by STP Bridges to transition Root and Designated Ports to Forwarding. The default value is15. STP bridges taking their sweet 15 seconds.other_config : rstp-transmit-hold-countโ optional string, containing an integer, in range1 to 10. The Transmit Hold Count used by the Port Transmit state machine to limit transmission rate. The default value is6. hold count: keeping the transmit rate in check.
๐ RSTP Status ๐
These key-value pairs report the status of 802.1D-2004. They are present only if RSTP is enabled (via the rstp_enable column). status again, but make it rapid.
rstp_status : rstp_bridge_idโ optional string. The bridge ID used in rapid spanning tree advertisements, in the formx.yyy.zzzzzzzzzzzzwhere x is the RSTP priority, the ys are a locally assigned system ID extension, the zs are the STP system ID, and each x, y, or z is a hex digit. hex digits, but make it dotted.rstp_status : rstp_root_idโ optional string. The root of this spanning tree, in the same form asrstp_status:rstp_bridge_id. If this bridge is the root, this will have the same value asrstp_status:rstp_bridge_id, otherwise it will differ. root ID check: same or different, no in-between.rstp_status : rstp_root_path_costโ optional string, containing an integer, at least0. The path cost of reaching the root. A lower number is better. The value is0if this bridge is the root, otherwise it is higher. 0 cost if youโre root, otherwise keep climbing.rstp_status : rstp_designated_idโ optional string. The RSTP designated ID, in the same form asrstp_status:rstp_bridge_id. designated ID said โsame format as before.โrstp_status : rstp_designated_port_idโ optional string. The RSTP designated port ID, as a 4-digit hex number. four hex digits, cute and compact.rstp_status : rstp_bridge_port_idโ optional string. The RSTP bridge port ID, as a 4-digit hex number. another 4-digit hex moment.
๐ Multicast Snooping Configuration ๐
Multicast snooping (RFC 4541) monitors the Internet Group Management Protocol (IGMP) and Multicast Listener Discovery traffic between hosts and multicast routers. The switch uses what IGMP and MLD snooping learns to forward multicast traffic only to interfaces that are connected to interested receivers. Currently it supports IGMPv1, IGMPv2, IGMPv3, MLDv1 and MLDv2 protocols. multicast said โonly send it where itโs wanted.โ
Okay so bestie, vibe check: weโre still in Bridge territory โ one more column, then we slide into Other Features and the Port TABLE. ๐
mcast_snooping_enableโ boolean. Enable multicast snooping on the bridge. For now, the default is disabled. ๐ซถ
โจ Other Features โจ
datapath_typeโ string. Name of datapath provider. The kernel datapath has typesystem. The userspace datapath has typenetdev. A manager may refer to thedatapath_typescolumn of theOpen_vSwitchtable for a list of the types accepted by this Open vSwitch instance. ๐ฆexternal_ids : bridge-idโ optional string. A unique identifier of the bridge. ๐other_config : hwaddrโ optional string. An Ethernet address in the formxx:xx:xx:xx:xx:xxto set the hardware address of the local port and influence the datapath ID. ๐ธother_config : forward-bpduโ optional string, eithertrueorfalse. Controls forwarding of BPDUs and other network control frames whenNORMALaction is invoked. When this option isfalseor unset, frames with reserved Ethernet addresses (see the table below) will not be forwarded. When this option istrue, such frames will not be treated specially. ๐ฅ
The above general rule has the following exceptions:
- If STP is enabled on the bridge (see the
stp_enablecolumn in theBridgetable), the bridge processes all received STP packets and never passes them to OpenFlow or forwards them. This is true even if STP is disabled on an individual port. - If LLDP is enabled on an interface (see the
lldpcolumn in theInterfacetable), the interface processes received LLDP packets and never passes them to OpenFlow or forwards them.
Set this option to true if the Open vSwitch bridge connects different Ethernet networks and is not configured to participate in STP.
This option affects packets with the following destination MAC addresses:
01:80:c2:00:00:00โ IEEE 802.1D Spanning Tree Protocol (STP).01:80:c2:00:00:01โ IEEE Pause frame.01:80:c2:00:00:0xโ Other reserved protocols.00:e0:2b:00:00:00โ Extreme Discovery Protocol (EDP).00:e0:2b:00:00:04and00:e0:2b:00:00:06โ Ethernet Automatic Protection Switching (EAPS).01:00:0c:cc:cc:ccโ Cisco Discovery Protocol (CDP), VLAN Trunking Protocol (VTP), Dynamic Trunking Protocol (DTP), Port Aggregation Protocol (PAgP), and others.01:00:0c:cc:cc:cdโ Cisco Shared Spanning Tree Protocol PVSTP+.01:00:0c:cd:cd:cdโ Cisco STP Uplink Fast.01:00:0c:00:00:00โ Cisco Inter Switch Link.01:00:0c:cc:cc:cxโ Cisco CFM.
other_config : mac-aging-timeโ optional string, containing an integer, at least 1. The maximum number of seconds to retain a MAC learning entry for which no packets have been seen. The default is currently300seconds (5minutes). The value, if specified, is forced into a reasonable range, currently15to3600seconds. ๐
A short MAC aging time allows a network to more quickly detect that a host is no longer connected to a switch port. However, it also makes it more likely that packets will be flooded unnecessarily, when they are addressed to a connected host that rarely transmits packets. To reduce the incidence of unnecessary flooding, use a MAC aging time longer than the maximum interval at which a host will ordinarily transmit packets.
other_config : mac-table-sizeโ optional string, containing an integer, at least 1. The maximum number of MAC addresses to learn. The default is currently8192. The value, if specified, is forced into a reasonable range, currently10to1,000,000. ๐
๐งฌ Common Columns ๐งฌ
The overall purpose of these columns is described under Common Columns at the beginning of this document. ๐
other_configโ map of string-string pairs.external_idsโ map of string-string pairs.
๐ช Port TABLE ๐ช
A port within a Bridge. ๐
Most commonly, a port has exactly one interface, pointed to by its interfaces column. Such a port logically corresponds to a port on a physical Ethernet switch. A port with more than one interface is a bonded port (see Bonding Configuration). ๐
Some properties that one might think as belonging to a port are actually part of the portโs Interface members. ๐ซถ
๐ Summary (continued)
nameโ immutable string (must be unique within table)interfacesโ set of 1 or more Interfaces- VLAN Configuration:
vlan_modeโ optional string, one ofaccess,dot1q-tunnel,native-tagged,native-untagged, ortrunktagโ optional integer, in range0to4,095trunksโ set of up to4,096integers, in range0to4,095cvlansโ set of up to4,096integers, in range0to4,095other_config : qinq-ethtypeโ optional string, either802.1ador802.1qother_config : priority-tagsโ optional string, one ofalways,if-nonzero, ornever
- Bonding Configuration:
bond_modeโ optional string, one ofactive-backup,balance-slb, orbalance-tcpother_config : bond-hash-basisโ optional string, containing an integerother_config : lb-output-actionโ optional string, eithertrueorfalseother_config : bond-primaryโ optional stringother_config : all-members-activeโ optional string, eithertrueorfalse- Link Failure Detection:
other_config : bond-detect-modeโ optional string, eithercarrierormiimonother_config : bond-miimon-intervalโ optional string, containing an integerbond_updelayโ integerbond_downdelayโ integer
- LACP Configuration:
lacpโ optional string, one ofactive,off, orpassiveother_config : lacp-system-idโ optional stringother_config : lacp-system-priorityโ optional string, containing an integer, in range1to65,535other_config : lacp-timeโ optional string, eitherfastorslowother_config : lacp-fallback-abโ optional string, eithertrueorfalse
- Rebalancing Configuration:
other_config : bond-rebalance-intervalโ optional string, containing an integer, in range0to2,147,483,647
bond_fake_ifaceโ boolean
- Spanning Tree Protocol:
- STP Configuration:
other_config : stp-enableโ optional string, eithertrueorfalseother_config : stp-port-numโ optional string, containing an integer, in range1to255other_config : stp-port-priorityโ optional string, containing an integer, in range0to255other_config : stp-path-costโ optional string, containing an integer, in range0to65,535
- STP Status:
status : stp_port_idโ optional stringstatus : stp_stateโ optional string, one ofblocking,disabled,forwarding,learning, orlisteningstatus : stp_sec_in_stateโ optional string, containing an integer, at least0status : stp_roleโ optional string, one ofalternate,designated, orroot
- STP Configuration:
- Rapid Spanning Tree Protocol:
- RSTP Configuration:
other_config : rstp-enableโ optional string, eithertrueorfalseother_config : rstp-port-priorityโ optional string, containing an integer, in range0to240other_config : rstp-port-numโ optional string, containing an integer, in range1to4,095other_config : rstp-path-costโ optional string, containing an integerother_config : rstp-port-admin-edgeโ optional string, eithertrueorfalseother_config : rstp-port-auto-edgeโ optional string, eithertrueorfalseother_config : rstp-port-mcheckโ optional string, eithertrueorfalse
- RSTP Status:
rstp_status : rstp_port_idโ optional stringrstp_status : rstp_port_roleโ optional string, one ofAlternate,Backup,Designated,Disabled, orRootrstp_status : rstp_port_stateโ optional string, one ofDisabled,Discarding,Forwarding, orLearningrstp_status : rstp_designated_bridge_idโ optional stringrstp_status : rstp_designated_port_idโ optional stringrstp_status : rstp_designated_path_costโ optional string, containing an integer
- RSTP Statistics:
rstp_statistics : rstp_tx_countโ optional integerrstp_statistics : rstp_rx_countโ optional integerrstp_statistics : rstp_error_countโ optional integerrstp_statistics : rstp_uptimeโ optional integer
- RSTP Configuration:
- Multicast Snooping:
other_config : mcast-snooping-floodโ optional string, eithertrueorfalseother_config : mcast-snooping-flood-reportsโ optional string, eithertrueorfalse
- Other Features:
qosโ optional QoSmacโ optional stringfake_bridgeโ booleanprotectedโ booleanexternal_ids : fake-bridge-*โ optional stringother_config : transientโ optional string, eithertrueorfalse
bond_active_slaveโ optional string- Port Statistics:
- Statistics: STP transmit and receive counters:
statistics : stp_tx_countโ optional integerstatistics : stp_rx_countโ optional integerstatistics : stp_error_countโ optional integer
- Statistics: STP transmit and receive counters:
- Common Columns:
other_configโ map of string-string pairsexternal_idsโ map of string-string pairs
๐ Details
name: immutable string (must be unique within table) โ okay so this is the Port name, bestie. For a non-bonded port, this should be the same as its interface's name. Port names must otherwise be unique among the names of ports, interfaces, and bridges on a host. And because port and interfaces names are usually the same, the restrictions on thenamecolumn in theInterfacetable โ particularly on length โ also apply to port names. Refer to the documentation forInterfacenames for details. ๐interfaces: set of 1 or more Interfaces โ the port's interfaces. If there's more than one, congrats, this is a bonded Port. ๐
๐ VLAN Configuration
In short, a VLAN (short for virtual LAN'') is a way to partition a single switch into multiple switches. VLANs can be confusing, so for an introduction, please refer to the question What's a VLAN?'' in the Open vSwitch FAQ. (yes, the FAQ is your bestie here, go read it) ๐
A VLAN is sometimes encoded into a packet using a 802.1Q or 802.1ad VLAN header, but every packet is part of some VLAN whether or not it is encoded in the packet. (A packet that appears to have no VLAN is part of VLAN 0, by default.) As a result, it's useful to think of a VLAN as a metadata property of a packet, separate from how the VLAN is encoded. For a given port, this column determines how the encoding of a packet that ingresses or egresses the port maps to the packet's VLAN. When a packet enters the switch, its VLAN is determined based on its setting in this column and its VLAN headers, if any, and then, conceptually, the VLAN headers are then stripped off. Conversely, when a packet exits the switch, its VLAN and the settings in this column determine what VLAN headers, if any, are pushed onto the packet before it egresses the port. ๐ฆ
Heads up, bestie ๐: the VLAN configuration in this column affects Open vSwitch **only when it is doing normal switching.''** It does **not** affect flows set up by an OpenFlow controller, outside of the OpenFlow normal action.''
Bridge ports support the following types of VLAN configuration:
trunkโ a trunk port carries packets on one or more specified VLANs specified in thetrunkscolumn (often, on every VLAN). A packet that ingresses on a trunk port is in the VLAN specified in its802.1Qheader, or VLAN0if the packet has no802.1Qheader. A packet that egresses through a trunk port will have an802.1Qheader if it has a nonzero VLAN ID. Any packet that ingresses on a trunk port tagged with a VLAN that the port does not trunk is dropped. ๐accessโ an access port carries packets on exactly one VLAN specified in thetagcolumn. Packets egressing on an access port have no802.1Qheader. Any packet with an802.1Qheader with a nonzero VLAN ID that ingresses on an access port is dropped, regardless of whether the VLAN ID in the header is the access port's VLAN ID. ๐ญnative-taggedโ a native-tagged port resembles a trunk port, with the exception that a packet without an802.1Qheader that ingresses on a native-tagged port is in the ``native VLAN'' (specified in thetagcolumn). โจnative-untaggedโ a native-untagged port resembles a native-tagged port, with the exception that a packet that egresses on a native-untagged port in the native VLAN will not have an802.1Qheader. ๐ซถdot1q-tunnelโ okay so a dot1q-tunnel port is kind of like an access port, but make it fashion โจ Like an access port, it carries packets on the single VLAN specified in thetagcolumn, and that VLAN โ called the service VLAN โ does not appear in an 802.1Q header for packets that ingress or egress on the port. The main character difference? It's all about what happens when packets that include an 802.1Q header ingress on the port. An access port drops those packets ๐ญ, but a dot1q-tunnel port treats them as double-tagged, with the outer service VLAN tag and the inner customer VLAN taken from the 802.1Q header. Correspondingly, to egress on the port, a packet outer VLAN (or only VLAN) must betag, which gets removed before egress, which exposes the inner (customer) VLAN if one is present. ๐
If cvlans is set, only allows packets in the specified customer VLANs.
A packet will only egress through bridge ports that carry the VLAN of the packet, as described by the rules above. No cap, that's the vibe check for every packet. ๐ฆ
vlan_mode: optional string, one ofaccess,dot1q-tunnel,native-tagged,native-untagged, ortrunkโ the VLAN mode of the port, as described above. When this column is empty, a default mode is selected like this:- If
tagcontains a value, the port is anaccessport. Thetrunkscolumn should be empty. - Otherwise, the port is a
trunkport. Thetrunkscolumn value is honored if it is present.
- If
tag: optional integer, in range0to4,095โ for an access port, the port's implicitly tagged VLAN. For anative-taggedornative-untaggedport, the port's native VLAN. Must be empty if this is a trunk port. ๐trunks: set of up to4,096integers, in range0to4,095โ for atrunk,native-tagged, ornative-untaggedport, the 802.1Q VLAN or VLANs that this port trunks; if it is empty, then the port trunks all VLANs. Must be empty if this is an access port.
A native-tagged or native-untagged port always trunks its native VLAN, regardless of whether trunks includes that VLAN. Periodt. ๐
cvlans: set of up to4,096integers, in range0to4,095โ for adot1q-tunnelport, the customer VLANs that this port includes. If this is empty, the port includes all customer VLANs.
For other kinds of ports, this setting is ignored. Not me being irrelevant ๐
other_config:qinq-ethtype: optional string, either802.1ador802.1qโ for adot1q-tunnelport, this is the TPID for the service tag, that is, for the 802.1Q header that contains the service VLAN ID. Because packets that actually ingress and egress a dot1q-tunnel port do not include an 802.1Q header for the service VLAN, this does not affect packets on the dot1q-tunnel port itself. Rather, it determines the service VLAN for a packet that ingresses on a dot1q-tunnel port and egresses on a trunk port. ๐
The value 802.1ad specifies TPID 0x88a8, which is also the default if the setting is omitted. The value 802.1q specifies TPID 0x8100.
For other kinds of ports, this setting is ignored.
other_config:priority-tags: optional string, one ofalways,if-nonzero, orneverโ an 802.1Q header contains two important pieces of information: a VLAN ID and a priority. A frame with a zero VLAN ID, called a ``priority-tagged'' frame, is supposed to be treated the same way as a frame without an 802.1Q header at all (except for the priority). ๐ง
However โ and this is the messy part ๐ โ some network elements ignore any frame that has 802.1Q header at all, even when the VLAN ID is zero. Therefore, by default Open vSwitch does not output priority-tagged frames, instead omitting the 802.1Q header entirely if the VLAN ID is zero. Set this key to if-nonzero to enable priority-tagged frames on a port.
For if-nonzero Open vSwitch omits the 802.1Q header on output if both the VLAN ID and priority would be zero. Set to always to retain the 802.1Q header in such frames as well.
All frames output to native-tagged ports have a nonzero VLAN ID, so this setting is not meaningful on native-tagged ports. iykyk ๐ซ
๐ Bonding Configuration ๐
A port that has more than one interface is a ``bonded port.'' Bonding allows for load balancing and fail-over. It's giving teamwork, it's giving main character energy ๐ซถ
The following types of bonding will work with any kind of upstream switch. On the upstream switch, do not configure the interfaces as a bond:
balance-slbโ balances flows among members based on source MAC address and output VLAN, with periodic rebalancing as traffic patterns change.active-backupโ assigns all flows to one member, failing over to a backup member when the active member is disabled. This is the only bonding mode in which interfaces may be plugged into different upstream switches. ๐
The following modes require the upstream switch to support 802.3ad with successful LACP negotiation. If LACP negotiation fails and other-config:lacp-fallback-ab is true, then active-backup mode is used:
balance-tcpโ balances flows among members based on L3 and L4 protocol information such as IP addresses and TCP/UDP ports. ๐ฅ
These columns apply only to bonded ports. Their values are otherwise ignored.
bond_mode: optional string, one ofactive-backup,balance-slb, orbalance-tcpโ the type of bonding used for a bonded port. Defaults toactive-backupif unset.other_config:bond-hash-basis: optional string, containing an integer โ an integer hashed along with flows when choosing output members in load balanced bonds. When changed, all flows will be assigned different hash values possibly causing member selection decisions to change. Does not affect bonding modes which do not employ load balancing such asactive-backup. ๐other_config:lb-output-action: optional string, eithertrueorfalseโ enable/disable usage of optimizedlb_outputaction for balancing flows among output members in load balanced bonds inbalance-tcp. When enabled, it uses optimized path forbalance-tcpmode by using rss hash and avoids recirculation. This knob does not affect other balancing modes. โกother_config:bond-primary: optional string โ if a member interface with this name exists in the bond and is up, it will be made active. Relevant only whenother_config:bond_modeisactive-backupor ifbalance-tcpfalls back toactive-backup(e.g., LACP negotiation fails andother_config:lacp-fallback-abis true). ๐other_config:all-members-active: optional string, eithertrueorfalseโ enable/Disable delivery of broadcast/multicast packets on secondary interface of abalance-slbbond. Relevant only whenlacpis off. ๐
This parameter is identical to all_slaves_active for Linux kernel bonds. Disabled by default as it is not a desirable configuration for most users. fr fr, leave it alone unless you know what you're doing ๐
๐ธ Link Failure Detection ๐ธ
An important part of link bonding is detecting that links are down so that they may be disabled. These settings determine how Open vSwitch detects link failure.
other_config:bond-detect-mode: optional string, eithercarrierormiimonโ the means used to detect link failures. Defaults tocarrierwhich uses each interface's carrier to detect failures. When set tomiimon, will check for failures by polling each interface's MII. ๐ฆother_config:bond-miimon-interval: optional string, containing an integer โ the interval, in milliseconds, between successive attempts to poll each interface's MII. Relevant only whenother_config:bond-detect-modeismiimon. โฑ๏ธbond_updelay: integer โ the number of milliseconds for which the link must stay up on an interface before the interface is considered to be up. Specify0to enable the interface immediately.
This setting is honored only when at least one bonded interface is already enabled. When no interfaces are enabled, then the first bond interface to come up is enabled immediately. โจ
bond_downdelay: integer โ the number of milliseconds for which the link must stay down on an interface before the interface is considered to be down. Specify0to disable the interface immediately.
๐ LACP Configuration ๐
LACP, the Link Aggregation Control Protocol, is an IEEE standard that allows switches to automatically detect that they are connected by multiple links and aggregate across those links. These settings control LACP behavior. Honestly iconic of the IEEE ๐ซถ
lacp: optional string, one ofactive,off, orpassiveโ configures LACP on this port. LACP allows directly connected switches to negotiate which links may be bonded. LACP may be enabled on non-bonded ports for the benefit of any switches they may be connected to.activeports are allowed to initiate LACP negotiations.passiveports are allowed to participate in LACP negotiations initiated by a remote switch, but not allowed to initiate such negotiations themselves. If LACP is enabled on a port whose partner switch does not support LACP, the bond will be disabled, unlessother-config:lacp-fallback-abis set totrue. Defaults tooffif unset. ๐คother_config:lacp-system-id: optional string โ the LACP system ID of this Port. The system ID of a LACP bond is used to identify itself to its partners. Must be a nonzero MAC address. Defaults to the bridge Ethernet address if unset. ๐other_config:lacp-system-priority: optional string, containing an integer, in range1to65,535โ the LACP system priority of this Port. In LACP negotiations, link status decisions are made by the system with the numerically lower priority. Lowest number wins, it's giving oldest sibling energy ๐other_config:lacp-time: optional string, eitherfastorslowโ the LACP timing which should be used on this Port. By defaultslowis used. When configured to befastLACP heartbeats are requested at a rate of once per second causing connectivity problems to be detected more quickly. Inslowmode, heartbeats are requested at a rate of once every 30 seconds. ๐other_config : lacp-fallback-abโ optional string, eithertrueorfalse. This one's the vibe check for openvswitch bonds running in LACP mode ๐ซถ. If the partner switch straight up does not support LACP, setting this totruelets openvswitch fall back to active-backup. Set it tofalseand the bond just gets disabled, no cap. Either way tho โ the moment the partner switch gets configured into LACP mode, the bond goes right back to using LACP. โจ
๐ซ Rebalancing Configuration ๐ซ
These settings control behavior when a bond is in balance-slb or balance-tcp mode.
other_config : bond-rebalance-intervalโ optional string, containing an integer, in range0to2,147,483,647. For a load balanced bonded port, this is the number of milliseconds between successive attempts to rebalance the bond โ like, moving flows from one interface on the bond to another, trying to keep each interface's usage roughly equal ๐ . If it's zero, load balancing is disabled on the bond (tho link failure still causes flows to move, bestie, that part doesn't stop). And if it's less than1000ms, the rebalance interval will be1000ms. Periodt.bond_fake_ifaceโ boolean. For a bonded port, whether to create a fake internal interface with the name of the port. Use only for compatibility with legacy software that requires this. Like, legacy legacy. ๐
๐ณ Spanning Tree Protocol ๐ณ
The configuration here is only meaningful, and the status is only populated, when 802.1D-1998 Spanning Tree Protocol is enabled on the port's Bridge with its stp_enable column. iykyk.
๐ STP Configuration ๐
other_config : stp-enableโ optional string, eithertrueorfalse. When STP is enabled on a bridge, it is enabled by default on all of the bridge's ports except bond, internal, and mirror ports (which do not work with STP, they're literally not invited to the party ๐). If this column's value isfalse, STP is disabled on the port.other_config : stp-port-numโ optional string, containing an integer, in range1to255. The port number used for the lower 8 bits of the port-id. By default, the numbers will be assigned automatically. But heads up: if any port's number is manually configured on a bridge, then they must all be. No picking favorites โจother_config : stp-port-priorityโ optional string, containing an integer, in range0to255. The port's relative priority value for determining the root port (that's the upper 8 bits of the port-id). A port with a lower port-id will be chosen as the root port ๐. By default, the priority is0x80.other_config : stp-path-costโ optional string, containing an integer, in range0to65,535. Spanning tree path cost for the port. A lower number indicates a faster link ๐ฅ. By default, the cost is based on the maximum speed of the link.
๐ฆ STP Status ๐ฆ
status : stp_port_idโ optional string. The port ID used in spanning tree advertisements for this port, as 4 hex digits. Configuring the port ID is described in thestp-port-numandstp-port-prioritykeys of theother_configsection earlier. Go scroll back bestie ๐status : stp_stateโ optional string, one ofblocking,disabled,forwarding,learning, orlistening. STP state of the port. That's the whole mood of the port rn.status : stp_sec_in_stateโ optional string, containing an integer, at least0. The amount of time this port has been in the current STP state, in seconds. Lowkey a "how long have you been standing there" counter โฑ๏ธstatus : stp_roleโ optional string, one ofalternate,designated, orroot. STP role of the port.
๐ Rapid Spanning Tree Protocol ๐
The configuration here is only meaningful, and the status and statistics are only populated, when 802.1D-1998 Spanning Tree Protocol is enabled on the port's Bridge with its stp_enable column. Same deal as before, just faster โก
๐ง RSTP Configuration ๐ง
other_config : rstp-enableโ optional string, eithertrueorfalse. When RSTP is enabled on a bridge, it is enabled by default on all of the bridge's ports except bond, internal, and mirror ports (which do not work with RSTP โ again, not invited ๐ซ). If this column's value isfalse, RSTP is disabled on the port.other_config : rstp-port-priorityโ optional string, containing an integer, in range0to240. The port's relative priority value for determining the root port, in multiples of 16. By default, the port priority is0x80(128). Any value in the lower 4 bits is rounded off ๐ซ . The significant upper 4 bits become the upper 4 bits of the port-id. A port with the lowest port-id is elected as the root ๐.other_config : rstp-port-numโ optional string, containing an integer, in range1to4,095. The local RSTP port number, used as the lower 12 bits of the port-id. By default the port numbers are assigned automatically, and typically may not correspond to the OpenFlow port numbers โ yeah, they're doing their own thing ๐. A port with the lowest port-id is elected as the root.other_config : rstp-path-costโ optional string, containing an integer. The port path cost. The Port's contribution, when it is the Root Port, to the Root Path Cost for the Bridge. By default the cost is automatically calculated from the port's speed ๐๏ธother_config : rstp-port-admin-edgeโ optional string, eithertrueorfalse. The admin edge port parameter for the Port. Default isfalse.other_config : rstp-port-auto-edgeโ optional string, eithertrueorfalse. The auto edge port parameter for the Port. Default istrue.other_config : rstp-port-mcheckโ optional string, eithertrueorfalse. The mcheck port parameter for the Port. Default isfalse. May be set to force the Port Protocol Migration state machine to transmit RST BPDUs for aMigrateTimeperiod, to test whether all STP Bridges on the attached LAN have been removed and the Port can continue to transmit RSTP BPDUs. Setting mcheck has no effect if the Bridge is operating in STP Compatibility mode.
Also, ngl, this is the sneaky one: changing the value fromtruetofalsehas no effect, but it needs to be done if this behavior is to be triggered again by subsequently changing the value fromfalsetotrue. So you gotta toggle it back, bestie. Flipping it off is just clearing the vibe so you can flip it on again ๐
โญ RSTP Status โญ
rstp_status : rstp_port_idโ optional string. The port ID used in spanning tree advertisements for this port, as 4 hex digits. Configuring the port ID is described in therstp-port-numandrstp-port-prioritykeys of theother_configsection earlier.rstp_status : rstp_port_roleโ optional string, one ofAlternate,Backup,Designated,Disabled, orRoot. RSTP role of the port.rstp_status : rstp_port_stateโ optional string, one ofDisabled,Discarding,Forwarding, orLearning. RSTP state of the port.rstp_status : rstp_designated_bridge_idโ optional string. The port's RSTP designated bridge ID, in the same form asrstp_status:rstp_bridge_idin the Bridge table. Same format, different table ๐rstp_status : rstp_designated_port_idโ optional string. The port's RSTP designated port ID, as 4 hex digits.rstp_status : rstp_designated_path_costโ optional string, containing an integer. The port's RSTP designated path cost. Lower is better, always ๐ฅ
๐ RSTP Statistics ๐
rstp_statistics : rstp_tx_countโ optional integer. Number of RSTP BPDUs transmitted through this port. Sending, slaying ๐คrstp_statistics : rstp_rx_countโ optional integer. Number of valid RSTP BPDUs received by this port.rstp_statistics : rstp_error_countโ optional integer. Number of invalid RSTP BPDUs received by this port. The drama ๐rstp_statistics : rstp_uptimeโ optional integer. The duration covered by the other RSTP statistics, in seconds.
๐ Multicast Snooping ๐
other_config : mcast-snooping-floodโ optional string, eithertrueorfalse. If set totrue, multicast packets (except Reports) are unconditionally forwarded to the specific port. No thoughts, just forwarding โจother_config : mcast-snooping-flood-reportsโ optional string, eithertrueorfalse. If set totrue, multicast Reports are unconditionally forwarded to the specific port.
๐ Other Features ๐
qosโ optionalQoS. Quality of Service configuration for this port. Give your traffic the luxury treatment ๐macโ optional string. The MAC address to use for this port for the purpose of choosing the bridge's MAC address. This column does not necessarily reflect the port's actual MAC address, nor will setting it change the port's actual MAC address. So like... it's a vibe, not a fact, okay? ๐fake_bridgeโ boolean. Does this port represent a sub-bridge for its tagged VLAN within the Bridge? Seeovs-vsctl(8)for more information.protectedโ boolean. The protected ports feature allows certain ports to be designated as protected ๐ก๏ธ. Traffic between protected ports is blocked. Protected ports can send traffic to unprotected ports. Unprotected ports can send traffic to any port. Default isfalse.external_ids : fake-bridge-*โ optional string. External IDs for a fake bridge (see thefake_bridgecolumn) are defined by prefixing a Bridgeexternal_idskey withfake-bridge-, e.g.fake-bridge-bridge-id. Cute little naming convention fr fr ๐other_config : transientโ optional string, eithertrueorfalse. If set totrue, the port will be removed whenovs-ctl start --delete-transient-portsis used. Bye bestie ๐bond_active_slaveโ optional string. For a bonded port, record the MAC address of the current active member. Main character energy, honestly ๐
๐ธ Port Statistics ๐ธ
Key-value pairs that report port statistics. The update period is controlled by other_config:stats-update-interval in the Open_vSwitch table.
๐ Statistics: STP transmit and receive counters ๐
statistics : stp_tx_countโ optional integer. Number of STP BPDUs sent on this port by the spanning tree library.statistics : stp_rx_countโ optional integer. Number of STP BPDUs received on this port and accepted by the spanning tree library.statistics : stp_error_countโ optional integer. Number of bad STP BPDUs received on this port. Bad BPDUs include runt packets and those with an unexpected protocol ID. Messy ๐
๐ซถ Common Columns ๐ซถ
The overall purpose of these columns is described under Common Columns at the beginning of this document. (Yes, the iconique opening, go check it ๐)
other_configโ map of string-string pairsexternal_idsโ map of string-string pairs
๐ฆ Interface TABLE ๐ฆ
An interface within a Port.
๐ Summary:
The full vibe check on every field an Interface can have, grouped by what it's for. Buckle up bestie, there's a lot โจ
๐ Core Features:
nameโ an immutable string, and it must be unique within table (no twin names, we don't do that here ๐ฏ)ifindexโ optional integer, in range0to4,294,967,295mac_in_useโ optional stringmacโ optional stringerrorโ optional string
๐ฅ OpenFlow Port Number:
ofportโ optional integerofport_requestโ optional integer, in range1to65,279
๐ฆ System-Specific Details:
typeโ string
๐ Tunnel Options:
options : remote_ipโ optional stringoptions : local_ipโ optional stringoptions : in_keyโ optional stringoptions : out_keyโ optional stringoptions : dst_portโ optional stringoptions : keyโ optional stringoptions : tosโ optional stringoptions : ttlโ optional stringoptions : df_defaultโ optional string, eithertrueorfalseoptions : egress_pkt_markโ optional string
๐ธ Tunnel Options: vxlan only:
options : extsโ optional stringoptions : packet_typeโ optional string, one oflegacy_l2,legacy_l3, orptap
๐ Tunnel Options: gre only:
options : packet_typeโ optional string, one oflegacy_l2,legacy_l3, orptapoptions : seqโ optional string, eithertrueorfalse
โญ Tunnel Options: gre, ip6gre, geneve, bareudp and vxlan:
options : csumโ optional string, eithertrueorfalse
๐ Tunnel Options: IPsec:
options : pskโ optional stringoptions : remote_certโ optional stringoptions : remote_nameโ optional string
๐ง Tunnel Options: erspan only:
options : erspan_idxโ optional stringoptions : erspan_verโ optional stringoptions : erspan_dirโ optional stringoptions : erspan_hwidโ optional string
๐ Tunnel Options: Bareudp only:
options : payload_typeโ optional string
๐ Tunnel Options: srv6 only:
options : srv6_segsโ optional stringoptions : srv6_flowlabelโ optional string, one ofcompute,copy, orzero
๐ซถ Patch Options:
options : peerโ optional string
๐ PMD (Poll Mode Driver) Options:
options : n_rxqโ optional string, containing an integer, at least1options : dpdk-devargsโ optional stringother_config : pmd-rxq-affinityโ optional stringoptions : xdp-modeโ optional string, one ofbest-effort,generic,native-with-zerocopy, ornativeoptions : vhost-server-pathโ optional stringoptions : vhost-max-queue-pairsโ optional string, containing an integer, in range1to128options : tx-retries-maxโ optional string, containing an integer, in range0to32options : n_rxq_descโ optional string, containing an integer, at least1options : n_txq_descโ optional string, containing an integer, at least1options : dpdk-vf-macโ optional stringoptions : rx-steeringโ optional string, eitherrss+lacporrssother_config : tx-steeringโ optional string, eitherhashorthread
๐ EMC (Exact Match Cache) Configuration:
other_config : emc-enableโ optional string, eithertrueorfalse
๐ MTU:
mtuโ optional integermtu_requestโ optional integer, at least1
๐ฆ Interface Status:
admin_stateโ optional string, eitherdownoruplink_stateโ optional string, eitherdownoruplink_resetsโ optional integerlink_speedโ optional integerduplexโ optional string, eitherfullorhalflacp_currentโ optional booleanstatusโ map of string-string pairsstatus : driver_nameโ optional stringstatus : driver_versionโ optional stringstatus : firmware_versionโ optional stringstatus : peer_ifindexโ optional stringstatus : source_ipโ optional stringstatus : tunnel_egress_ifaceโ optional stringstatus : tunnel_egress_iface_carrierโ optional string, eitherdownorup
๐ dpdk:
status : port_noโ optional stringstatus : numa_idโ optional stringstatus : min_rx_bufsizeโ optional stringstatus : max_rx_pktlenโ optional stringstatus : max_rx_queuesโ optional stringstatus : max_tx_queuesโ optional stringstatus : max_mac_addrsโ optional stringstatus : max_hash_mac_addrsโ optional stringstatus : max_vfsโ optional stringstatus : max_vmdq_poolsโ optional stringstatus : n_rxqโ optional stringstatus : n_txqโ optional stringstatus : rx_csum_offloadโ optional stringstatus : if_typeโ optional stringstatus : if_descrโ optional stringstatus : bus_infoโ optional stringstatus : dpdk-vf-macโ optional stringstatus : rx-steeringโ optional stringstatus : rx_steering_queueโ optional stringstatus : rss_queuesโ optional string
๐ธ dpdkvhostuser:
status : modeโ optional stringstatus : featuresโ optional stringstatus : num_of_vringsโ optional stringstatus : numaโ optional stringstatus : socketโ optional stringstatus : statusโ optional stringstatus : vring_n_sizeโ optional stringstatus : userspace-tsoโ optional string
โญ afxdp:
status : xdp-modeโ optional string
๐ Statistics:
๐ Statistics: Successful transmit and receive counters:
statistics : rx_packetsโ optional integerstatistics : rx_bytesโ optional integerstatistics : tx_packetsโ optional integerstatistics : tx_bytesโ optional integer
๐ญ Statistics: Receive errors:
statistics : rx_droppedโ optional integerstatistics : rx_frame_errโ optional integerstatistics : rx_over_errโ optional integerstatistics : rx_crc_errโ optional integerstatistics : rx_errorsโ optional integer
๐ Statistics: Transmit errors:
statistics : tx_droppedโ optional integerstatistics : collisionsโ optional integerstatistics : tx_errorsโ optional integer
๐ฆ Ingress Policing:
ingress_policing_rateโ integer, at least0ingress_policing_kpkts_rateโ integer, at least0ingress_policing_burstโ integer, at least0ingress_policing_kpkts_burstโ integer, at least0
๐ฉบ Bidirectional Forwarding Detection (BFD):
๐ BFD Configuration:
bfd : enableโ optional string, eithertrueorfalsebfd : min_rxโ optional string, containing an integer, at least1bfd : min_txโ optional string, containing an integer, at least1bfd : decay_min_rxโ optional string, containing an integerbfd : forwarding_if_rxโ optional string, eithertrueorfalsebfd : cpath_downโ optional string, eithertrueorfalsebfd : check_tnl_keyโ optional string, eithertrueorfalsebfd : bfd_local_src_macโ optional stringbfd : bfd_local_dst_macโ optional stringbfd : bfd_remote_dst_macโ optional stringbfd : bfd_src_ipโ optional stringbfd : bfd_dst_ipโ optional stringbfd : oamโ optional stringbfd : multโ optional string, containing an integer, in range1to255
๐ BFD Status:
bfd_status : stateโ optional string, one ofadmin_down,down,init, orupbfd_status : forwardingโ optional string, eithertrueorfalsebfd_status : diagnosticโ optional stringbfd_status : remote_stateโ optional string, one ofadmin_down,down,init, orupbfd_status : remote_diagnosticโ optional stringbfd_status : flap_countโ optional string, containing an integer, at least0
๐ง Connectivity Fault Management:
cfm_mpidโ optional integercfm_flap_countโ optional integercfm_faultโ optional booleancfm_fault_status : recvโnonecfm_fault_status : rdiโnonecfm_fault_status : maidโnonecfm_fault_status : loopbackโnonecfm_fault_status : overflowโnonecfm_fault_status : overrideโnonecfm_fault_status : intervalโnonecfm_remote_opstateโ optional string, eitherdownorupcfm_healthโ optional integer, in range0to100cfm_remote_mpidsโ set of integersother_config : cfm_intervalโ optional string, containing an integerother_config : cfm_extendedโ optional string, eithertrueorfalseother_config : cfm_demandโ optional string, eithertrueorfalseother_config : cfm_opstateโ optional string, eitherdownorupother_config : cfm_ccm_vlanโ optional string, containing an integer, in range1to4,095other_config : cfm_ccm_pcpโ optional string, containing an integer, in range1to7
๐ Bonding Configuration:
other_config : lacp-port-idโ optional string, containing an integer, in range1to65,535other_config : lacp-port-priorityโ optional string, containing an integer, in range1to65,535other_config : lacp-aggregation-keyโ optional string, containing an integer, in range1to65,535
๐ท๏ธ Virtual Machine Identifiers:
external_ids : attached-macexternal_ids : iface-idโ optional stringexternal_ids : iface-statusโ optional string, eitheractiveorinactiveexternal_ids : vm-idโ optional string
Auto Attach Configuration: ๐
lldp : enableโ optional string, eithertrueorfalse
Flow control Configuration: ๐
options : rx-flow-ctrlโ optional string, eithertrueorfalseoptions : tx-flow-ctrlโ optional string, eithertrueorfalseoptions : flow-ctrl-autonegโ optional string, eithertrueorfalse
Link State Change detection mode: ๐ซ
options : dpdk-lsc-interruptโ optional string, eithertrueorfalse
Hardware Offload Configuration: ๐ฅ
other_config : hw-offload-priorityโ optional string
Common Columns: ๐
other_configโ map of string-string pairsexternal_idsโ map of string-string pairs
โจ Details โจ
Core Features: ๐
name: immutable string (must be unique within table)
Interface name. Should be alphanumeric. For a non-bonded port, this should be the same as the port name. It must otherwise be unique among the names of ports, interfaces, and bridges on a host.
The maximum length of an interface name depends on the underlying datapath, and bestie, it varies:
- The names of interfaces implemented as Linux and BSD network devices โ including interfaces with type
internal,tap, orsystemplus the different types of tunnel ports โ are limited to 15 bytes. In general, different datapath implementations may have different limitations. - The names of patch ports are literally not used in the underlying datapath at all, so operating system restrictions do not apply. Which means they may have arbitrary length. slay ๐
Regardless of other restrictions, OpenFlow only supports 15-byte names, which means that ovs-ofctl and OpenFlow controllers will show names truncated to 15 bytes. Not a vibe, but that's the deal.
ifindex: optional integer, in range 0 to 4,294,967,295
A positive interface index as defined for SNMP MIB-II in RFCs 1213 and 2863, if the interface has one โ otherwise 0. The ifindex is useful for seamless integration with protocols such as SNMP and sFlow. iykyk ๐ฆ
mac_in_use: optional string
The MAC address in use by this interface. That's it, that's the whole thing.
mac: optional string
Ethernet address to set for this interface. If unset then the default MAC address is used:
- For the local interface, the default is the lowest-numbered MAC address among the other bridge ports โ either the value of the
macin its Port record, if set, or its actual MAC (for bonded ports, the MAC of its member whose name is first in alphabetical order). Internal ports and bridge ports that are used as port mirroring destinations (see the Mirror table) are ignored. Bye ๐ - For other internal interfaces, the default MAC is randomly generated.
- External interfaces typically have a MAC address associated with their hardware.
Some interfaces may not have a software-controllable MAC address. This option only affects internal ports. For other type ports, you can change the MAC address outside Open vSwitch, using ip command.
error: optional string
If the configuration of the port failed โ as indicated by -1 in ofport โ Open vSwitch sets this column to an error description in human readable form. Otherwise, Open vSwitch clears this column. So if you see something in here, something went wrong, bestie ๐ญ
๐ข OpenFlow Port Number ๐ข
When a client adds a new interface, Open vSwitch chooses an OpenFlow port number for the new port. If the client that adds the port fills in ofport_request, then Open vSwitch tries to use its value as the OpenFlow port number. Otherwise โ or if the requested port number is already in use or cannot be used for another reason โ Open vSwitch automatically assigns a free port number. And regardless of how the port number was obtained, Open vSwitch then reports in ofport the port number actually assigned. That's the whole system, and honestly? It works. โจ
Open vSwitch limits the port numbers that it automatically assigns to the range 1 through 32,767, inclusive. Controllers therefore have free use of ports 32,768 and up. Gotta leave room for the girlies upstairs ๐
ofport: optional integer
OpenFlow port number for this interface. Open vSwitch sets this column's value, so other clients should treat it as read-only. Don't touch, fr fr ๐
The OpenFlow ``local'' port (OFPP_LOCAL) is 65,534. The other valid port numbers are in the range 1 to 65,279, inclusive. Value -1 indicates an error adding the interface.
ofport_request: optional integer, in range 1 to 65,279
Requested OpenFlow port number for this interface.
A client should ideally set this column's value in the same database transaction that it uses to create the interface. Open vSwitch version 2.1 and later will honor a later request for a specific port number, althuogh it might confuse some controllers: OpenFlow does not have a way to announce a port number change, so Open vSwitch represents it over OpenFlow as a port deletion followed immediately by a port addition. Chaotic? A little. But that's how it goes ๐ซ
If ofport_request is set or changed to some other port's automatically assigned port number, Open vSwitch chooses a new port number for the latter port. Not me stealing your port number ๐ญ
๐ ๏ธ System-Specific Details ๐ ๏ธ
type: string
The interface type. The types supported by a particular instance of Open vSwitch are listed in the iface_types column in the Open_vSwitch table. The following types are defined:
systemโ An ordinary network device, e.g.eth0on Linux. Sometimes referred to as ``external interfaces'' since they are generally connected to hardware external to that on which the Open vSwitch is running. The empty string is a synonym forsystem.internalโ A simulated network device that sends and receives traffic. An internal interface whose name is the same as its bridge's name is called thelocal interface.'' It does not make sense to bond an internal interface, so the termsport'' and ``interface'' are often used imprecisely for internal interfaces.tapโ A TUN/TAP device managed by Open vSwitch.
Open vSwitch checks the interface state before send packets to the device. When it is down, the packets are dropped and the tx_dropped statistic is updated accordingly. Older versions of Open vSwitch did not check the interface state and then the tx_packets was incremented along with tx_dropped. Glow-up behavior right there ๐ธ
geneveโ An Ethernet over Geneve (http://tools.ietf.org/html/draft-ietf-nvo3-geneve) IPv4/IPv6 tunnel. A description of how to match and set Geneve options can be found in theovs-ofctlmanual page.greโ Generic Routing Encapsulation (GRE) over IPv4 tunnel, configurable to encapsulate layer 2 or layer 3 traffic.ip6greโ Generic Routing Encapsulation (GRE) over IPv6 tunnel, encapsulate layer 2 traffic.vxlanโ An Ethernet tunnel over the UDP-based VXLAN protocol described in RFC 7348.
Open vSwitch uses IANA-assigned UDP destination port 4789. The source port used for VXLAN traffic varies on a per-flow basis and is in the ephemeral port range. ๐
patchโ A pair of virtual devices that act as a patch cable.gtpuโ GPRS Tunneling Protocol (GTP) is a group of IP-based communications protocols used to carry general packet radio service (GPRS) within GSM, UMTS and LTE networks. GTP-U is used for carrying user data within the GPRS core network and between the radio access network and the core network. The user data transported can be packets in any of IPv4, IPv6, or PPP formats.
The protocol is documented at http://www.3gpp.org/DynaReport/29281.htm
Open vSwitch uses UDP destination port 2152. The source port used for GTP traffic varies on a per-flow basis and is in the ephemeral port range. Same energy as VXLAN, different port ๐
Bareudpโ The Bareudp tunnel provides a generic L3 encapsulation support for tunnelling different L3 protocols like MPLS, IP, NSH etc. inside a UDP tunnel.srv6โ Segment Routing IPv6 (SRv6) tunnel encapsulates L3 traffic as "IPv6 in IPv6" or "IPv4 in IPv6" with Segment Routing Header (SRH) defined in RFC 8754. The segment list in SRH can be set using a SRv6 specific option.
๐ Tunnel Options ๐
These options apply to interfaces with type of geneve, bareudp, gre, ip6gre, vxlan, and srv6.
Each tunnel must be uniquely identified by the combination of type, options:remote_ip, options:local_ip, and options:in_key. If two ports are defined that are the same except one has an optional identifier and the other does not, the more specific one is matched first. options:in_key is considered more specific than options:local_ip if a port defines one and another port defines the other. options:in_key is not applicable for bareudp and srv6 tunnels. Hence it is not considered while identifying bareudp or srv6 tunnels. Rules are rules, bestie ๐
options : remote_ip: optional string
Required. The remote tunnel endpoint, one of:
- An IPv4 or IPv6 address (not a DNS name), e.g.
192.168.0.123. Only unicast endpoints are supported. - The word
flow. The tunnel accepts packets from any remote tunnel endpoint. To process only packets from a specific remote tunnel endpoint, the flow entries may match on thetun_srcortun_ipv6_srcfield. When sending packets to aremote_ip=flowtunnel, the flow actions must explicitly set thetun_dstortun_ipv6_dstfield to the IP address of the desired remote tunnel endpoint, e.g. with aset_fieldaction. Main character energy: you gotta name your destination yourself ๐
The remote tunnel endpoint for any packet received from a tunnel is available in the tun_src field for matching in the flow table. ๐ฆ
options : local_ip: optional string โ optional bestie, it's the tunnel destination IP that received packets have to match on. Default? Match all the addresses, no filter, very chill. If you do set it, it can be one of these:- An IPv4/IPv6 address (๐ not a DNS name, don't even try), like
192.168.12.3. - The word
flow. Then the tunnel accepts packets sent to any of the local IP addresses of the system running OVS. Wanna process only packets sent to one specific IP? Then the flow entries can match on thetun_dstortun_ipv6_dstfield. And when sending packets to alocal_ip=flowtunnel, the flow actions may explicitly set thetun_srcortun_ipv6_srcfield to whatever IP you want, like with aset_fieldaction. โ ๏ธ But heads up: while routing the tunneled packet out, the local system may override the specified address with the local IP address configured for the outgoing system interface.
- An IPv4/IPv6 address (๐ not a DNS name, don't even try), like
This option is only valid for tunnels that are also configured with the remote_ip=flow option. Pair it up or it's not happening โจ
The tunnel destination IP address for any packet received from a tunnel is available in the tun_dst or tun_ipv6_dst field for matching in the flow table. Very handy, love that for us ๐
options : in_key: optional string โ optional, and not applicable forbareudpandsrv6(sorry besties). It's the key that received packets must contain, and it's one of:0. The tunnel receives packets with no key or with a key of0. This is equivalent to specifying nooptions:in_keyat all. Basically the "no thoughts, head empty" setting ๐ซถ- A positive 24-bit (for Geneve and VXLAN) or 32-bit (for GRE) number. Then the tunnel receives only packets with the specified key. Picky, and honestly? Valid.
- The word
flow. The tunnel accepts packets with any key, and the key gets placed in thetun_idfield for matching in the flow table. Theovs-fields(7)manual page has additional info about matching fields in OpenFlow flows, go read it iykyk ๐
options : out_key: optional string โ optional, again not applicable forbareudpandsrv6. It's the key to be set on outgoing packets, one of:0. Packets sent through the tunnel will have no key. This is equivalent to specifying nooptions:out_keyat all.- A positive 24-bit (for Geneve and VXLAN) or 32-bit (for GRE) number. Packets sent through the tunnel will have the specified key. Periodt.
- The word
flow. Packets sent through the tunnel will have the key set using theset_tunnelNicira OpenFlow vendor extension (0is used in the absence of an action). Theovs-fields(7)manual page has additional info about the Nicira OpenFlow vendor extensions ๐
options : dst_port: optional string โ optional. It's the tunnel transport layer destination port, for UDP based tunnel protocols (Geneve, VXLAN). Port queen ๐options : key: optional string โ optional. It's just a shorthand to setin_keyandout_keyat the same time. Efficiency icon ๐options : tos: optional string โ optional. The value of the ToS bits to be set on the encapsulating packet. ToS is interpreted as DSCP and ECN bits, and the ECN part must be zero (no cap, that's the rule). It may also be the wordinherit, in which case the ToS will be copied from the inner packet if it's IPv4 or IPv6 (otherwise it'll be0). The ECN fields are always inherited, no exceptions. Default is0.options : ttl: optional string โ optional. The TTL to be set on the encapsulating packet. It may also be the wordinherit, in which case the TTL will be copied from the inner packet if it's IPv4 or IPv6 (otherwise it'll be the system default, typically64). Default is the system default TTL โจoptions : df_default: optional string, eithertrueorfalseโ optional. If enabled, the Don't Fragment bit will be set on tunnel outer headers to allow path MTU discovery. Default is enabled; set tofalseto disable. She's on by default, respect her ๐ฆoptions : egress_pkt_mark: optional string โ optional. Thepkt_markto be set on the encapsulating packet. This option sets packet mark for the tunnel endpoint for all tunnel packets, including tunnel monitoring. Marked and monitored ๐
๐ง Tunnel Options: vxlan only ๐ธ
options : exts: optional string โ optional. A comma separated list of optional VXLAN extensions to enable. These are the supported ones:gbp: VXLAN-GBP lets you transport the group policy context of a packet across the VXLAN tunnel to other network peers. See the description oftun_gbp_idandtun_gbp_flagsinovs-fields(7)for additional info. (https://tools.ietf.org/html/draft-smith-vxlan-group-policy)gpe: Support for Generic Protocol Encapsulation in accordance with IETF drafthttps://tools.ietf.org/html/draft-ietf-nvo3-vxlan-gpe. Without this option, a VXLAN packet always encapsulates an Ethernet frame. With this option, a VXLAN packet may also encapsulate an IPv4, IPv6, NSH, or MPLS packet. Iconic behaviour honestly ๐ฅ
options : packet_type: optional string, one oflegacy_l2,legacy_l3, orptapโ this option controls what types of packets the tunnel sends and receives and how it represents them:- By default, or if this option is
legacy_l2, the tunnel sends and receives only Ethernet frames. - If this option is
legacy_l3, the tunnel sends and receives only non-Ethernet (L3) packets, but the packets are represented as Ethernet frames for compatibility with legacy OpenFlow controllers that expect this behavior. This requires enablinggpeinoptions:exts. - If this option is
ptap, Open vSwitch represents packets in the tunnel using thepacket_typemechanism introduced in OpenFlow 1.5. This mechanism supports any kind of packet, but actually sending and receiving non-Ethernet packets requires additionally enablinggpeinoptions:exts. Two steps, bestie, don't skip one ๐
- By default, or if this option is
๐ Tunnel Options: gre only ๐
gre interfaces support these options.
options : packet_type: optional string, one oflegacy_l2,legacy_l3, orptapโ this option controls what types of packets the tunnel sends and receives and how it represents them:- By default, or if this option is
legacy_l2, the tunnel sends and receives only Ethernet frames. - If this option is
legacy_l3, the tunnel sends and receives only non-Ethernet (L3) packets, but the packets are represented as Ethernet frames for compatibility with legacy OpenFlow controllers that expect this behavior. - If this option is
ptap, the tunnel sends and receives any kind of packet. Open vSwitch represents packets in the tunnel using thepacket_typemechanism introduced in OpenFlow 1.5. Main character energy โญ
- By default, or if this option is
options : seq: optional string, eithertrueorfalseโ optional. A 4-byte sequence number field for GRE tunnel only. Default is disabled; set totrueto enable. The sequence number is incremented by one on each outgoing packet. Counting up, one by one, we love a consistent queen ๐
๐ฆ Tunnel Options: gre, ip6gre, geneve, bareudp and vxlan ๐ธ
gre, ip6gre, geneve, bareudp and vxlan interfaces support these options.
options : csum: optional string, eithertrueorfalseโ optional. Compute encapsulation header (either GRE or UDP) checksums on outgoing packets. When unset (the default value), checksum computing for outgoing packets is enabled for UDP IPv6 tunnels, and disabled for GRE and IPv4 UDP tunnels. When set tofalse, no checksums will be computed for outgoing tunnel encapsulation headers. Whentrue, checksums will be computed for all outgoing tunnel encapsulation headers. Checksums present on incoming packets will be validated regardless of this setting, and incoming packets without a checksum will also be accepted regardless of this setting. She's flexible like that ๐
When using the Linux kernel datapath, computation of checksums for geneve and vxlan requires Linux kernel version 4.0 or higher. gre and ip6gre support checksums for all versions of Open vSwitch that support GRE. Ngl, upgrade your kernel bestie ๐ญ
๐ฅ Tunnel Options: IPsec ๐
Setting any of these options enables IPsec support for a given tunnel. gre, geneve and vxlan interfaces support these options. See the IPsec section in the Open_vSwitch table for a description of each mode. Go check it, it's all connected ๐ซถ
options : psk: optional string โ in PSK mode only, the preshared secret to negotiate the tunnel. This value must match on both tunnel ends. Both sides or it's not working, no cap ๐options : remote_cert: optional string โ in self-signed certificate mode only, name of a PEM file containing a certificate of the remote switch. The certificate must be x.509 version 3 and with the string in common name (CN) also set in the subject alternative name (SAN). Very specific requirements, very demure โจoptions : remote_name: optional string โ in CA-signed certificate mode only, common name (CN) of the remote certificate.
๐ Tunnel Options: erspan only ๐
Only erspan interfaces support these options.
options : erspan_idx: optional string โ 20 bit index/port number associated with the ERSPAN traffic's source port and direction (ingress/egress). This field is platform dependent. So it depends on the platform, don't @ me ๐options : erspan_ver: optional string โ ERSPAN version:1for version 1 (type II) or2for version 2 (type III). Pick your era ๐ฆoptions : erspan_dir: optional string โ specifies the ERSPAN v2 mirrored traffic's direction.1for egress traffic, and0for ingress traffic. In or out, choose your vibe ๐ธoptions : erspan_hwid: optional string โ ERSPAN hardware ID is a 6-bit unique identifier of an ERSPAN v2 engine within a system.
๐ Tunnel Options: Bareudp only ๐
options : payload_type: optional string โ specifies the ethertype of the l3 protocol the bareudp device is tunnelling. For the tunnels which support multiple ethertypes of a l3 protocol (IP, MPLS) this field specifies the protocol name as a string. Name it, bestie ๐ท๏ธ
โญ Tunnel Options: srv6 only ๐
options : srv6_segs: optional string โ specifies the segment list in Segment Routing Header (SRH). It consists of a comma-separated list of segments represented in IPv6 format, e.g."fc00:100::1,fc00:200::1,fc00:300::1". Note that the first segment must be the same asoptions:remote_ip. Like, mandatory, first one, same as remote_ip, that's the rule ๐options : srv6_flowlabelโ optional string, one ofcompute,copy, orzero. This one's optional bestie, and it controls how the flowlabel in the outer IPv6 header gets configured โจ. The payoff? IPv6 flow-label-based load balancing, which some popular vendor appliances actually support. Kinda likenet.ipv6.seg6_flowlabelsysconfig, it's one of these three values:- By default, or if this option is
copy, copy the flowlabel of the inner IPv6 header to the flowlabel of the outer IPv6 header. If the inner header isn't IPv6, it gets set to0. - If this option is
zero, just set flowlabel to0. Simple queen behaviour ๐ . - If this option is
compute, set flowlabel to a hash over the L3/L4 fields of the inner packet.
- By default, or if this option is
๐ Patch Options ๐
These options apply only to patch ports, aka interfaces whose type column is patch. No cap. Patch ports are mainly a way to connect otherwise independent bridges to one another โ think of it like plugging an Ethernet cable (a ``patch cable'') into two physical switches to connect those switches ๐ซถ. The effect of plugging a patch port into two switches is conceptually similar to plugging the two ends of a Linux veth device into those switches, but patch ports are much more efficient in implementation. Iconic efficiency upgrade, honestly.
Patch ports may connect two different bridges (the usual case) or the same bridge. In that latter case, take special care to avoid loops, e.g. by programming appropriate flows with OpenFlow. Not me warning you twice โ seriously, watch the loops ๐.
Patch ports do not work if their ends are attached to bridges on different datapaths, e.g. to connect bridges insystemandnetdevdatapaths. That's a hard no ๐.
The following command creates and connects patch ports p0 and p1 and adds them to bridges br0 and br1, respectively:
ovs-vsctl add-port br0 p0 -- set Interface p0 type=patch options:peer=p1 \
-- add-port br1 p1 -- set Interface p1 type=patch options:peer=p0
options : peerโ optional string. The name of theInterfacefor the other side of the patch. The namedInterface's ownpeeroption must specify thisInterface's name. That is, the two patch interfaces must have reversed name and peer values. It's giving mutuals only ๐ค.
๐ฅ PMD (Poll Mode Driver) Options ๐ฅ
Only PMD netdevs support these options. Everyone else, sit this one out.
options : n_rxqโ optional string, containing an integer, at least1. Specifies the maximum number of rx queues to be created for the PMD netdev. If it's not specified or it's specified to0, one rx queue will be created by default. Not supported by DPDK vHost interfaces โ noted bestie.options : dpdk-devargsโ optional string. Specifies the PCI address associated with the port for physical devices, or the virtual driver to be used for the port when a virtual PMD is intended to be used. For the latter, the argument string typically takes the form ofeth_driver_namex, wheredriver_nameis a valid virtual DPDK PMD driver name andxis a unique identifier of your choice for the given port. Only supported by thedpdkport type.other_config : pmd-rxq-affinityโ optional string. Specifies mapping of RX queues of this interface to CPU cores.
Value should be set in the following form:
other_config:pmd-rxq-affinity=<rxq-affinity-list>
where
<rxq-affinity-list> ::= NULL | <non-empty-list><non-empty-list> ::= <affinity-pair> | <affinity-pair> , <non-empty-list><affinity-pair> ::= <queue-id> : <core-id>
options : xdp-modeโ optional string, one ofbest-effort,generic,native-with-zerocopy, ornative. Specifies the operational mode of the XDP program. Let's break it down ๐ง:- In
native-with-zerocopymode the XDP program is loaded into the device driver with zero-copy RX and TX enabled. This mode requires device driver support and has the best performance because there should be no copying of packets. Literally zero copies, we love her ๐. nativeis the same asnative-with-zerocopy, but without zero-copy capability. This requires at least one copy between kernel and the userspace. This mode also requires support from device driver.- In
genericcase the XDP program in kernel works after skb allocation on early stages of packet processing inside the network stack. This mode doesn't require driver support, but has much lower performance. Sad but true ๐ญ. best-efforttries to detect and choose the best (fastest) from the available modes for current interface.
- In
Note that this option is specific to netdev-afxdp. Defaults to best-effort mode.
options : vhost-server-pathโ optional string. The value specifies the path to the socket associated with a vHost User client mode device that has been or will be created by QEMU. Only supported bydpdkvhostuserclientinterfaces.options : vhost-max-queue-pairsโ optional string, containing an integer, in range1to128. The value specifies the maximum number of queue pairs supported by a vHost device. This is ignored for vhost-user backends, only VDUSE is supported. Only supported bydpdkvhostuserclientinterfaces.
Default value is 1.
options : tx-retries-maxโ optional string, containing an integer, in range0to32. The value specifies the maximum amount of vhost tx retries that can be made while trying to send a batch of packets to an interface. Only supported bydpdkvhostuserclientinterfaces.
Default value is 8.
options : n_rxq_descโ optional string, containing an integer, at least1. Specifies the rx queue size (number rx descriptors) fordpdkports. The value must be a power of 2 and supported by the hardware of the device being configured. If not specified or an incorrect value is specified,2048rx descriptors will be used by default.options : n_txq_descโ optional string, containing an integer, at least1. Specifies the tx queue size (number tx descriptors) fordpdkports. The value must be a power of 2 and supported by the hardware of the device being configured. If not specified or an incorrect value is specified,2048tx descriptors will be used by default.options : dpdk-vf-macโ optional string. Ethernet address to set for this VF interface. If unset then the default MAC address is used:- For most drivers, the default MAC address assigned by their hardware.
- For bifurcated drivers, the MAC currently used by the kernel netdevice.
This option may only be used with dpdk VF representors.
options : rx-steeringโ optional string, eitherrss+lacporrss. Configure hardware Rx queue steering policy. This option takes one of the following values:rssโ Distribution of ingress packets in all Rx queues according to the RSS algorithm. This is the default behaviour.rss+lacpโ Distribution of ingress packets according to the RSS algorithm on all but the last Rx queue. An extra Rx queue is allocated for LACP packets.
If the user has already configured multiple options:n_rxq on the port, an additional one will be allocated for the specified protocols. Even if the hardware cannot satisfy the requested number of requested Rx queues, the last Rx queue will be used. If only one Rx queue is available or if the hardware does not support the rte_flow matchers/actions required to redirect the selected protocols, custom rx-steering will fall back to default rss mode. It adapts, okurrr โจ.
This feature is mutually exclusive withother_config:hw-offloadas it may conflict with the offloaded flows. If both are enabled,rx-steeringwill fall back to defaultrssmode.
This option is only applicable to interfaces with type dpdk.
other_config : tx-steeringโ optional string, eitherhashorthread. Specifies the Tx steering mode for the interface.threadenables static (1:1) thread-to-txq mapping when the number of Tx queues is greater than number of PMD threads, and dynamic (N:1) mapping if equal or lower. In this mode a single thread can not use more than 1 transmit queue of a given port.hashenables hash-based Tx steering, which distributes the packets on all the transmit queues based on their 5-tuples hashes.
Defaults to thread.
๐ฆ EMC (Exact Match Cache) Configuration ๐ฆ
These settings controls behaviour of EMC lookups/insertions for packets received from the interface.
other_config : emc-enableโ optional string, eithertrueorfalse. Specifies if Exact Match Cache (EMC) should be used while processing packets received from this interface. Iftrue,other_config:emc-insert-inv-probwill have effect on this interface.
Defaults to true.
๐ธ MTU ๐ธ
The MTU (maximum transmission unit) is the largest amount of data that can fit into a single Ethernet frame. The standard Ethernet MTU is 1500 bytes. Some physical media and many kinds of virtual interfaces can be configured with higher MTUs. Big frames, big energy ๐
A client may change an interface MTU by filling in mtu_request. Open vSwitch then reports in mtu the currently configured value.
mtuโ optional integer. The currently configured MTU for the interface.
This column will be empty for an interface that does not have an MTU as, for example, some kinds of tunnels do not. (Tunnels stay mysterious ๐.)
Open vSwitch sets this column's value, so other clients should treat it as read-only. Hands off, bestie.
mtu_requestโ optional integer, at least1. Requested MTU (Maximum Transmission Unit) for the interface. A client can fill this column to change the MTU of an interface.
RFC 791 requires every internet module to be able to forward a datagram of 68 octets without further fragmentation. The maximum size of an IP packet is 65535 bytes.
If this is not set and if the interface has internal type, Open vSwitch will change the MTU to match the minimum of the other interfaces in the bridge.
๐ Interface Status ๐
Status information about interfaces attached to bridges, updated every 5 seconds. Not all interfaces have all of these properties; virtual interfaces don't have a link speed, for example. Non-applicable columns will have empty values. No filler, just facts โจ.
admin_stateโ optional string, eitherdownorup. The administrative state of the physical network link.link_state: optional string, eitherdownorupโ bestie, this is literally just the vibe check of the physical network link ๐ it's normally the link's carrier status. BUT โจ if this interface's Port is a bond that's set up formiimonmonitoring, then it's the network link'smiimonstatus instead. Context matters, iykyk ๐link_resets: optional integer โ how many times Open vSwitch has watched this Interface'slink_stateflip. The way it keeps a whole receipts list of every glow-up and glow-down ๐ญlink_speed: optional integer โ the negotiated speed of the physical network link. Valid values are positive integers greater than0, no zeroes, no negatives, we don't do that here ๐ซถduplex: optional string, eitherfullorhalfโ the duplex mode of the physical network link. Full duplex is the main character, half duplex is giving sharing energy ๐ธlacp_current: optional boolean โ a boolean telling you the LACP status for this interface. If it's true, this interface has current LACP info about its LACP partner ๐ that info may be used to monitor the health of interfaces in a LACP enabled port. Heads up tho: this column will be empty if LACP is not enabled. No LACP, no tea, periodt ๐status: map of string-string pairs โ key-value pairs that report port status. Supported status values are type-dependent, so some interfaces may not have a validstatus:driver_name, for example. It's giving "your results may vary" energy ๐
โจ status : driver_name โจ
status : driver_name: optional string โ the name of the device driver controlling the network adapter. The little name tag of whoever's running the adapter ๐ฅstatus : driver_version: optional string โ the version string of that device driver controlling the network adapter ๐status : firmware_version: optional string โ the version string of the network adapter's firmware, if available. Keyword: if ๐ญstatus : peer_ifindex: optional string โ forvethdevices on Linux, this column contains the interface index of the peer veth device ๐ฆ the whole point is it lets applications programmatically discover veth pairs without requiring extra system calls or parsing network interface information. Efficiency slay ๐
Only present for veth devices (when status:driver_name is "veth"). Not available on non-Linux systems โ sorry bestie, Linux only ๐
status : source_ip: optional string โ the source IP address used for an IPv4/IPv6 tunnel end-point, such asgre. That's the origin story of your tunnel ๐status : tunnel_egress_iface: optional string โ the egress interface for tunnels. Currently only relevant for tunnels on Linux systems โ this column will show the name of the interface which is responsible for routing traffic destined for the configuredoptions:remote_ip. Heads up, this could be an internal interface such as a bridge port ๐ so don't be surprised, it's not a glitch, it's a feature.status : tunnel_egress_iface_carrier: optional string, eitherdownorupโ whether carrier is detected onstatus:tunnel_egress_iface. Yes/no, up/down, that's the whole column ๐
๐ธ dpdk ๐ธ
DPDK specific interface status options. Grab a snack, there's a bunch ๐
status : port_no: optional string โ DPDK port ID.status : numa_id: optional string โ NUMA socket ID to which an Ethernet device is connected.status : min_rx_bufsize: optional string โ minimum size of RX buffer.status : max_rx_pktlen: optional string โ maximum configurable length of RX pkt.status : max_rx_queues: optional string โ maximum number of RX queues.status : max_tx_queues: optional string โ maximum number of TX queues.status : max_mac_addrs: optional string โ maximum number of MAC addresses.status : max_hash_mac_addrs: optional string โ maximum number of hash MAC addresses for MTA and UTA.status : max_vfs: optional string โ "Maximum number of hash MAC addresses for MTA and UTA. Maximum number of VFs." Yeah, the description literally says both of those things, ngl I'm not gonna pretend that's not a little chaotic ๐ญ but that's what it says, so that's what you get ๐status : max_vmdq_pools: optional string โ maximum number of VMDq pools.status : n_rxq: optional string โ number of Rx queues.status : n_txq: optional string โ number of Tx queues.status : rx_csum_offload: optional string โ whether Rx Checksum offload is enabled or not. On or off, that's it โจstatus : if_type: optional string โ interface type ID according to IANA ifTYPE MIB definitions. Fancy paperwork energy ๐status : if_descr: optional string โ interface description string.status : bus_info: optional string โ bus name and bus info such as Vendor ID and Device ID of PCI device.status : dpdk-vf-mac: optional string โ Ethernet address set for this VF interface. Only reported fordpdkVF representors ๐ซถstatus : rx-steering: optional string โ hardware Rx queue steering policy in use.status : rx_steering_queue: optional string โ ID of rx steering queue. Only reported ifrx-steeringis supported by hardware ๐status : rss_queues: optional string โ IDs of rss queues. Only reported ifrx-steeringis supported by hardware.
๐ฆ dpdkvhostuser ๐ฆ
dpdkvhostuser and dpdkvhostuserclient netdev specific interface status information. Very specific, very niche, very iconic ๐
status : mode: optional string โclient(connecting) orserver(listening) in the socket communication. Pick your lane bestie ๐งstatus : features: optional string โ virtio features bitmap as per virtio specification.status : num_of_vrings: optional string โ the number of available virtqueues.status : numa: optional string โ the numa id of the device and guest memory.status : socket: optional string โ the path to the socket used for communication.status : status: optional string โ status of connection to the device. Yes the column is calledstatusand it has astatuskey inside it, we don't ask questions, we just vibe ๐ญstatus : vring_n_size: optional string โ each virtqueue will have it's size reported, where n is the virtqueue number from0..(num_of_vrings-1). (Their apostrophe, not mine, leaving it exactly as it is ๐ซถ)status : userspace-tso: optional string โ whetheruserspace-tsois enabled or disabled.
โญ afxdp โญ
AF_XDP specific interface status options. Short and sweet, we love a concise king ๐
status : xdp-mode: optional string โ XDP mode currently in use. Seeoptions:xdp-modefor description of possible values. Go read the other one, it's all there ๐ฅ
๐ Statistics ๐
Key-value pairs that report interface statistics ๐ The current implementation updates these counters periodically โ the update period is controlled by other_config:stats-update-interval in the Open_vSwitch table. So if the numbers feel stale, that's your knob, bestie ๐๏ธ
Future implementations may update them when an interface is created, when they are queried (e.g. using an OVSDB select operation), and just before an interface is deleted due to virtual interface hot-unplug or VM shutdown, and perhaps at other times, but not on any regular periodic basis. So like, right now it's a clock, later it might be a whole vibe-based schedule, nobody knows ๐
These are the same statistics reported by OpenFlow in its struct ofp_port_stats structure. If an interface does not support a given statistic, then that pair is omitted โ no fake numbers, just silence ๐
โจ Statistics: Successful transmit and receive counters โจ
statistics : rx_packets: optional integer โ number of received packets.statistics : rx_bytes: optional integer โ number of received bytes.statistics : tx_packets: optional integer โ number of transmitted packets.statistics : tx_bytes: optional integer โ number of transmitted bytes.
The good news counters, love that for you ๐ธ
โจ Statistics: Receive errors โจ
statistics : rx_dropped: optional integer โ number of packets dropped by RX.statistics : rx_frame_err: optional integer โ number of frame alignment errors.statistics : rx_over_err: optional integer โ number of packets with RX overrun.statistics : rx_crc_err: optional integer โ number of CRC errors.statistics : rx_errors: optional integer โ total number of receive errors, greater than or equal to the sum of the above. That "greater than or equal to" is doing heavy lifting, don't misread it as exactly-equal ๐ค
โจ Statistics: Transmit errors โจ
statistics : tx_dropped: optional integer โ number of packets dropped by TX.statistics : collisions: optional integer โ number of collisions.statistics : tx_errors: optional integer โ total number of transmit errors, greater than or equal to the sum of the above. Same rule, same energy ๐ซถ
๐ Ingress Policing ๐
These settings control ingress policing for packets received on this interface, and the framing here is genuinely cute so pay attention ๐ง
On a physical interface, this limits the rate at which traffic is allowed into the system from the outside. On a virtual interface (one connected to a virtual machine), this limits the rate at which the VM is able to transmit. Same knob, different direction, iykyk ๐
Policing is a simple form of quality-of-service that simply drops packets received in excess of the configured rate ๐ Because it's so simple, policing is usually less accurate and less effective than egress QoS (which is configured using the QoS and Queue tables). So like, it works, but it's the budget version โ set your expectations accordingly ๐
Policing settings can be set with byte rate or packet rate, and they can be configured together, in which case they take effect together โ that means the smaller speed limit of them is in effect ๐ the strictest one wins, no negotiation.
Currently, byte rate policing is implemented on Linux and OVS with DPDK, while packet rate policing is only implemented on Linux. Both Linux and OVS DPDK implementations use a simple โtoken bucketโ approach ๐ชฃ
๐ Byte rate policing ๐
- The size of the bucket corresponds to
ingress_policing_burst. Initially the bucket is full โจ - Whenever a packet is received, its size (converted to tokens) is compared to the number of tokens currently in the bucket. If the required number of tokens are available, they are removed and the packet is forwarded. Otherwise, the packet is dropped ๐
- Whenever it is not full, the bucket is refilled with tokens at the rate specified by
ingress_policing_rate๐
๐ Packet rate policing ๐
- The size of the bucket corresponds to
ingress_policing_kpkts_burst. Initially the bucket is full โจ - Whenever a packet is received, it will consume one token from the current bucket. If the token is available in the bucket, itโs removed and the packet is forwarded. Otherwise, the packet is dropped ๐
- Whenever it is not full, the bucket is refilled with tokens at the rate specified by
ingress_policing_kpkts_rate๐
Lowkey the whole thing is just: full bucket, spend tokens, empty bucket = dropped packets, refill at your configured rate. The token bucket ate and left no crumbs ๐ชฃ๐
Policing lowkey beefs with some network protocols โ and especially with fragmented IP packets. ๐ญ Picture this: there's so much network activity that the token bucket stays nearly empty basically all the time. Then this token bucket algorithm is gonna forward, like, one single packet every so often, and the gap between them depends on packet size and on the configured rate. But all the fragments of one IP packet normally get transmitted back-to-back, as a squad, together. So in that situation? Only one of those fragments gets forwarded and the rest get dropped. ๐ And IP gives the intended recipient absolutely no way to ask for just the remaining fragments. So there are two likely possibilities for what happens next: either all the fragments eventually get retransmitted (which is what TCP does), in which case the exact same problem just recurs, or the sender never realizes its packet got dropped and data is simply lost (which is what some UDP-based protocols do). Either way, it's possible that no forward progress ever happens. Not great, bestie.
ingress_policing_rateโ integer, at least 0. Max rate for data received on this interface, in kbps. Data received faster than this rate gets dropped. Set it to0(the default) to disable policing entirely. โจingress_policing_kpkts_rateโ integer, at least 0. Max rate for data received on this interface, in kpps (1 kppsis1000 pps). Data received faster than this rate gets dropped. Set it to0(the default) to disable policing. ๐ซถingress_policing_burstโ integer, at least 0. Max burst size for data received on this interface, in kb. The default burst size if set to0is8000 kbit. Heads up: this value has no effect ifingress_policing_rateis0.
Specifying a bigger burst size lets the algorithm be more forgiving, which is genuinely important for protocols like TCP that react severely to dropped packets. The burst size should be at least the size of the interface's MTU. And specifying a value that's numerically at least as large as 80% of ingress_policing_rate helps TCP come closer to achieving the full rate. ๐
ingress_policing_kpkts_burstโ integer, at least 0. Max burst size for data received on this interface, in kpkts (1 kpktsis1000 packets). The default burst size if set to0is16 kpkts. Also has no effect ifingress_policing_kpkts_rateis0.
Again: a larger burst size makes the algorithm more forgiving, which matters a lot for protocols like TCP that react severely to dropped packets. Specifying a value numerically at least as large as 80% of ingress_policing_kpkts_rate helps TCP come closer to achieving the full rate. ๐ฆ
๐ Bidirectional Forwarding Detection (BFD) ๐
BFD, defined in RFC 5880 and RFC 5881, lets you do point-to-point detection of connectivity failures by occasionally transmitting BFD control messages. Open vSwitch implements BFD to serve as a more popular and standards compliant alternative to CFM. Iconic behaviour, honestly.
BFD works by regularly transmitting BFD control messages at a rate negotiated independently in each direction. Each endpoint specifies the rate at which it expects to receive control messages, and the rate at which it's willing to transmit them. By default, Open vSwitch uses a detection multiplier of three, meaning an endpoint signals a connectivity fault if three consecutive BFD control messages fail to arrive. And in the case of a unidirectional connectivity issue, the system that isn't receiving BFD control messages signals the problem to its peer in the messages it transmits. Teamwork! ๐ค
The Open vSwitch implementation of BFD aims to comply faithfully with RFC 5880 requirements. But OVS does not implement the optional Authentication or "Echo Mode" features. We simply don't vibe with those.
Version tea โ: OVS 2.13 and earlier intercepted and processed all BFD packets. OVS 2.14 and later only intercept and process BFD packets destined to a configured BFD instance, and other BFD packets are made available to the OVS flow table for forwarding.
๐ธ BFD Configuration ๐ธ
A controller sets up key-value pairs in the bfd column to enable and configure BFD. Here's the whole menu:
bfd:enableโ optional string, eithertrueorfalse.trueto enable BFD on this Interface. If not specified, BFD will not be enabled by default.bfd:min_rxโ optional string, containing an integer, at least 1. The shortest interval, in milliseconds, at which this BFD session offers to receive BFD control messages. The remote endpoint may choose to send messages at a slower rate. Defaults to1000.bfd:min_txโ optional string, containing an integer, at least 1. The shortest interval, in milliseconds, at which this BFD session is willing to transmit BFD control messages. Messages will actually be transmitted at a slower rate if the remote endpoint isn't willing to receive as quickly as specified. Defaults to100.bfd:decay_min_rxโ optional string, containing an integer. An alternate receive interval, in milliseconds, that must be greater than or equal tobfd:min_rx. The implementation switches frombfd:min_rxtobfd:decay_min_rxwhen there's no obvious incoming data traffic at the interface, to reduce the CPU and bandwidth cost of monitoring an idle interface. You can disable this feature by setting a value of0. This feature is reset wheneverbfd:decay_min_rxorbfd:min_rxchanges.bfd:forwarding_if_rxโ optional string, eithertrueorfalse. Whentrue, traffic received on the Interface is used to indicate the capability of packet I/O. BFD control packets are still transmitted and received. At least one BFD control packet must be received every100 * bfd:min_rxamount of time. Otherwise, even if traffic is received, thebfd:forwardingwill befalse. ๐bfd:cpath_downโ optional string, eithertrueorfalse. Set totrueto notify the remote endpoint that traffic should not be forwarded to this system for some reason other than a connectivity failure on the interface being monitored. The typical underlying reason is "concatenated path down," that is, that connectivity beyond the local system is down. Defaults tofalse.bfd:check_tnl_keyโ optional string, eithertrueorfalse. Set totrueto make BFD accept only control messages with a tunnel key of zero. By default, BFD accepts control messages with any tunnel key.bfd:bfd_local_src_macโ optional string. Set to an Ethernet address in the formxx:xx:xx:xx:xx:xxto set the MAC used as source for transmitted BFD packets. The default is the mac address of the BFD enabled interface.bfd:bfd_local_dst_macโ optional string. Set to an Ethernet address in the formxx:xx:xx:xx:xx:xxto set the MAC used as destination for transmitted BFD packets. The default is00:23:20:00:00:01.bfd:bfd_remote_dst_macโ optional string. Set to an Ethernet address in the formxx:xx:xx:xx:xx:xxto set the MAC used for checking the destination of received BFD packets. Packets with a different destination MAC will not be considered as BFD packets. If not specified, the destination MAC address of received BFD packets is not checked.bfd:bfd_src_ipโ optional string. Set to an IPv4 address to set the IP address used as source for transmitted BFD packets. The default is169.254.1.1.bfd:bfd_dst_ipโ optional string. Set to an IPv4 address to set the IP address used as destination for transmitted BFD packets. The default is169.254.1.0.bfd:oamโ optional string. Some tunnel protocols (such as Geneve) include a bit in the header to indicate that the encapsulated packet is an OAM frame. By setting this totrue, BFD packets will be marked as OAM if encapsulated in one of these tunnels.bfd:multโ optional string, containing an integer, in range 1 to 255. The BFD detection multiplier, which defaults to3. An endpoint signals a connectivity fault if the given number of consecutive BFD control messages fail to arrive.
โญ BFD Status โญ
The switch sets key-value pairs in the bfd_status column to report the status of BFD on this interface. And when BFD is not enabled (with bfd:enable), the switch clears all key-value pairs from bfd_status. Clean slate energy.
bfd_status:stateโ optional string, one ofadmin_down,down,init, orup. Reports the state of the BFD session. The BFD session is fully healthy and negotiated if UP. ๐bfd_status:forwardingโ optional string, eithertrueorfalse. Reports whether the BFD session believes this Interface may be used to forward traffic. Typically this means the local session is signaling UP, and the remote system isn't signaling a problem such as concatenated path down.bfd_status:diagnosticโ optional string. A diagnostic code specifying the local system's reason for the last change in session state. The error messages are defined in section 4.1 of[RFC 5880].bfd_status:remote_stateโ optional string, one ofadmin_down,down,init, orup. Reports the state of the remote endpoint's BFD session. ๐bfd_status:remote_diagnosticโ optional string. A diagnostic code specifying the remote system's reason for the last change in session state. The error messages are defined in section 4.1 of[RFC 5880].bfd_status:flap_countโ optional string, containing an integer, at least 0. Counts the number ofbfd_status:forwardingflaps since start. A flap is considered as a change of thebfd_status:forwardingvalue.
๐ง Connectivity Fault Management ๐ง
802.1ag Connectivity Fault Management (CFM) allows a group of Maintenance Points (MPs) called a Maintenance Association (MA) to detect connectivity problems with each other. MPs within an MA should have complete and exclusive interconnectivity. That gets verified by occasionally broadcasting Continuity Check Messages (CCMs) at a configurable transmission interval. โจ
According to the 802.1ag specification, each Maintenance Point should be configured out-of-band with a list of Remote Maintenance Points it should have connectivity to. Open vSwitch differs from the specification in this area โ it simply assumes the link is faulted if no Remote Maintenance Points are reachable, and considers it not faulted otherwise. We do things our own way, and honestly? Slay.
One important vibe check: when operating over tunnels which have no in_key, or an in_key of flow, CFM will only accept CCMs with a tunnel key of zero. ๐ซถ
cfm_mpid: optional integer โ a Maintenance Point ID (MPID) is basically the lil name tag that uniquely identifies each endpoint inside a Maintenance Association. It's how this endpoint introduces itself to the other Maintenance Points in the MA, iykyk. Every end of a monitored link should have a different MPID, no copying your bestie's. You must set this to enable CFM on this Interface.
Per the 802.1ag spec, MPIDs can only range between [1, 8191]. But plot twist: extended mode (peep other_config:cfm_extended) supports eight byte MPIDs. โจ
cfm_flap_count: optional integer โ counts the number of cfm fault flapps since boot. A flap is considered to be a change of thecfm_faultvalue. She's keeping receipts ๐cfm_fault: optional boolean โ indicates a connectivity fault triggered by an inability to receive heartbeats from any remote endpoint. When a fault is triggered on Interfaces participating in bonds, they will be disabled. ๐
Faults can be triggered for several reasons. Most importantly they are triggered when no CCMs are received for a period of 3.5 times the transmission interval. Faults are also triggered when any CCMs indicate that a Remote Maintenance Point is not receiving CCMs but able to send them. Finally, a fault is triggered if a CCM is received which indicates unexpected configuration. Notably, this case arises when a CCM is received which advertises the local MPID. (That one's giving "wait, is that me??" ๐ช)
cfm_fault_status : recv: noneโ indicates a CFM fault was triggered due to a lack of CCMs received on the Interface.cfm_fault_status : rdi: noneโ indicates a CFM fault was triggered due to the reception of a CCM with the RDI bit flagged. Endpoints set the RDI bit in their CCMs when they are not receiving CCMs themselves. This typically indicates a unidirectional connectivity failure. ๐ฉcfm_fault_status : maid: noneโ indicates a CFM fault was triggered due to the reception of a CCM with a MAID other than the one Open vSwitch uses. CFM broadcasts are tagged with an identification number in addition to the MPID called the MAID. Open vSwitch only supports receiving CCM broadcasts tagged with the MAID it uses internally. Sorry babes, we're exclusive ๐cfm_fault_status : loopback: noneโ indicates a CFM fault was triggered due to the reception of a CCM advertising the same MPID configured in thecfm_mpidcolumn of this Interface. This may indicate a loop in the network. ๐cfm_fault_status : overflow: noneโ indicates a CFM fault was triggered because the CFM module received CCMs from more remote endpoints than it can keep track of. Too many besties, not enough group chat slots ๐ญcfm_fault_status : override: noneโ indicates a CFM fault was manually triggered by an administrator using anovs-appctlcommand. (That admin was in a mood.)cfm_fault_status : interval: noneโ indicates a CFM fault was triggered due to the reception of a CCM frame having an invalid interval.cfm_remote_opstate: optional string, eitherdownorupโ when in extended mode, indicates the operational state of the remote endpoint as eitherupordown. Seeother_config:cfm_opstate.cfm_health: optional integer, in range0to100โ indicates the health of the interface as a percentage of CCM frames received over21other_config:cfm_intervals. The health of an interface is undefined if it is communicating with more than onecfm_remote_mpids. It reduces if healthy heartbeats are not received at the expected rate, and gradually improves as healthy heartbeats are received at the desired rate. Every21other_config:cfm_intervals, the health of the interface is refreshed. It's literally a vibe check for your link ๐ซถ
As mentioned above, the faults can be triggered for several reasons. The link health will deteriorate even if heartbeats are received but they are reported to be unhealthy. An unhealthy heartbeat in this context is a heartbeat for which either some fault is set or is out of sequence. The interface health can be 100 only on receiving healthy heartbeats at the desired rate. No notes, perfect score only ๐
cfm_remote_mpids: set of integers โ when CFM is properly configured, Open vSwitch will occasionally receive CCM broadcasts. These broadcasts contain the MPID of the sending Maintenance Point. The list of MPIDs from which this Interface is receiving broadcasts from is regularly collected and written to this column.
other_config keys, CFM girlie edition ๐ฆ
other_config : cfm_interval: optional string, containing an integer โ the interval, in milliseconds, between transmissions of CFM heartbeats. Three missed heartbeat receptions indicate a connectivity fault.
In standard operation only intervals of 3, 10, 100, 1,000, 10,000, 60,000, or 600,000 ms are supported. Other values will be rounded down to the nearest value on the list. Extended mode (see other_config:cfm_extended) supports any interval up to 65,535 ms. In either mode, the default is 1000 ms.
We do not recommend using intervals less than 100 ms. Like, don't. ๐ซฃ
other_config : cfm_extended: optional string, eithertrueorfalseโ whentrue, the CFM module operates in extended mode. This causes it to use a nonstandard destination address to avoid conflicting with compliant implementations which may be running concurrently on the network. Furthermore, extended mode increases the accuracy of thecfm_intervalconfiguration parameter by breaking wire compatibility with 802.1ag compliant implementations. And extended mode allows eight byte MPIDs. Defaults tofalse. She's โจnonstandardโจ and proudother_config : cfm_demand: optional string, eithertrueorfalseโ whentrue, andother_config:cfm_extendedistrue, the CFM module operates in demand mode. When in demand mode, traffic received on the Interface is used to indicate liveness. CCMs are still transmitted and received. At least one CCM must be received every100 * other_config:cfm_intervalamount of time. Otherwise, even if traffic are received, the CFM module will raise the connectivity fault.
Demand mode has a couple of caveats:
- To ensure that
ovs-vswitchdhas enough time to pull statistics from the datapath, the fault detection interval is set to3.5 * MAX(other_config:cfm_interval, 500)ms. - To avoid ambiguity, demand mode disables itself when there are multiple remote maintenance points.
- If the Interface is heavily congested, CCMs containing the
other_config:cfm_opstatestatus may be dropped causing changes in the operational state to be delayed. Similarly, if CCMs containing the RDI bit are not received, unidirectional link failures may not be detected. ๐ฌ
other_config : cfm_opstate: optional string, eitherdownorupโ whendown, the CFM module marks all CCMs it generates as operationally down without triggering a fault. This allows remote maintenance points to choose not to forward traffic to the Interface on which this CFM module is running. Currently, in Open vSwitch, the opdown bit of CCMs affects Interfaces participating in bonds, and the bundle OpenFlow action. This setting is ignored when CFM is not in extended mode. Defaults toup. ๐other_config : cfm_ccm_vlan: optional string, containing an integer, in range1to4,095โ when set, the CFM module will apply a VLAN tag to all CCMs it generates with the given value. May be the stringrandomin which case each CCM will be tagged with a different randomly generated VLAN. Chaos mode: enabled ๐ฒother_config : cfm_ccm_pcp: optional string, containing an integer, in range1to7โ when set, the CFM module will apply a VLAN tag to all CCMs it generates with the given PCP value, the VLAN ID of the tag is governed by the value ofother_config:cfm_ccm_vlan. Ifother_config:cfm_ccm_vlanis unset, a VLAN ID of zero is used.
๐ Bonding Configuration ๐
other_config : lacp-port-id: optional string, containing an integer, in range1to65,535โ the LACP port ID of this Interface. Port IDs are used in LACP negotiations to identify individual ports participating in a bond. It's giving student ID but for ports ๐ชชother_config : lacp-port-priority: optional string, containing an integer, in range1to65,535โ the LACP port priority of this Interface. In LACP negotiations Interfaces with numerically lower priorities are preferred for aggregation. Lowkey the lower the number the more main character energy you get ๐other_config : lacp-aggregation-key: optional string, containing an integer, in range1to65,535โ the LACP aggregation key of this Interface. Interfaces with different aggregation keys may not be active within a given Port at the same time. Different keys = different friend groups, and they don't hang out together ๐ซ
๐ง Virtual Machine Identifiers ๐ง
These key-value pairs specifically apply to an interface that represents a virtual Ethernet interface connected to a virtual machine. These key-value pairs should not be present for other types of interfaces. Keys whose names end in -uuid have values that uniquely identify the entity in question.
external_ids : attached-mac: optional string โ the MAC address programmed into the ``virtual hardware'' for this interface, in the formxx:xx:xx:xx:xx:xx.external_ids : iface-id: optional string โ a system-unique identifier for the interface. โจexternal_ids : iface-status: optional string, eitheractiveorinactiveโ Hypervisors may sometimes have more than one interface associated with a givenexternal_ids:iface-id, only one of which is actually in use at a given time. For example, in some circumstances hypervisor may have both atap'' and avif'' interface for a singleexternal_ids:iface-id, but only uses one of them at a time. A hypervisor that behaves this way must mark the currently in use interfaceactiveand the othersinactive. A hypervisor that never has more than one interface for a givenexternal_ids:iface-idmay mark that interfaceactiveor omitexternal_ids:iface-statusentirely. Either way bestie, just be consistent ๐
Okay so real talk during VM migration, a given external_ids:iface-id might transiently get marked active on two different hypervisors at once ๐ญ like it's not a bug, it's just how it be. What "active" actually means here is that this external_ids:iface-id is the active instance within a single hypervisor, not across some broader scope. There's exactly one exception though: some hypervisors support "migration" from a given hypervisor to itself (most often for test purposes), and during that kind of "migration," two instances of a single external_ids:iface-id might both be briefly marked active on a single hypervisor. Rare, but there it is ๐
external_ids : vm-idโ optional string. The VM to which this interface belongs ๐ซถ
โจ Auto Attach Configuration โจ
Auto Attach configuration for a particular interface, bestie ๐
lldp : enableโ optional string, eithertrueorfalse. Set it totrueto enable LLDP on this Interface. If you don't specify it at all, LLDP stays disabled by default. No cap ๐ง
๐ธ Flow control Configuration ๐ธ
Ethernet flow control, as defined in IEEE 802.1Qbb, provides link level flow control using MAC pause frames. Heads up though: it's implemented only for interfaces with type dpdk ๐
options : rx-flow-ctrlโ optional string, eithertrueorfalse. Set totrueto enable Rx flow control on physical ports. By default, Rx flow control is disabled.options : tx-flow-ctrlโ optional string, eithertrueorfalse. Set totrueto enable Tx flow control on physical ports. By default, Tx flow control is disabled.options : flow-ctrl-autonegโ optional string, eithertrueorfalse. Set totrueto enable flow control auto negotiation on physical ports. By default, auto-neg is disabled.
๐ฆ Link State Change detection mode ๐ฆ
options : dpdk-lsc-interruptโ optional string, eithertrueorfalse. Set this value tofalseto configure poll mode for Link State Change (LSC) detection instead of interrupt mode for the DPDK interface.
If this value is not set, interrupt mode is configured โญ
This parameter has an effect only on netdev dpdk interfaces, iykyk.
๐ฅ Hardware Offload Configuration ๐ฅ
other_config : hw-offload-priorityโ optional string. This configuration sets an explicit list of hardware offload providers to try on this Interface. The argument should be a comma-separated list of hardware offload provider names, or the wordnone.
If none is encountered in the list, further trying of offload providers is stopped ๐ For example, if the list only contains none, hardware offload is disabled on this interface even if it is globally enabled. Note that unknown hardware offload provider names are ignored.
If not set, it uses the global other_config:hw-offload-priority configuration. Changing this value after offload enablement requires restarting the daemon ๐ญ To avoid restarting the daemon, set this option in the same transaction that adds the port. For example:
ovs-vsctl add-port br0 p1 -- \
set Interface p1 other_config:hw-offload-priority=none
๐ Common Columns ๐
The overall purpose of these columns is described under Common Columns at the beginning of this document. (Yes, the same crew as always.)
other_configโ map of string-string pairsexternal_idsโ map of string-string pairs
๐ Flow_Table TABLE ๐
Configuration for a particular OpenFlow table. It's giving very organized spreadsheet energy ๐
โญ Summary โญ
nameโ optional string- Eviction Policy:
flow_limitโ optional integer, at least 0overflow_policyโ optional string, eitherevictorrefusegroupsโ set of strings
- Classifier Optimization:
prefixesโ set of up to 4 strings
- Common Columns:
external_idsโ map of string-string pairs
๐ Details ๐
nameโ optional string. The table's name ๐ Set this column to change the name that controllers will receive when they request table statistics, e.g.ovs-ofctl dump-tables. The name does not affect switch behavior โ it's purely cosmetic, main character nameplate energy.
๐ Eviction Policy ๐
Open vSwitch supports limiting the number of flows that may be installed in a flow table, via the flow_limit column. When adding a flow would exceed this limit, by default Open vSwitch reports an error, but there are two ways to configure Open vSwitch to instead delete ("evict") a flow to make room for the new one:
- Set the
overflow_policycolumn toevict. - Send an OpenFlow 1.4+ "table mod request" to enable eviction for the flow table (e.g.
ovs-ofctl -O OpenFlow14 mod-table br0 0 evictto enable eviction on flow table 0 of bridge br0).
When a flow must be evicted due to overflow, the flow to evict is chosen through an approximation of the following algorithm. This algorithm is used regardless of how eviction was enabled:
- Divide the flows in the table into groups based on the values of the fields or subfields specified in the
groupscolumn, so that all of the flows in a given group have the same values for those fields. If a flow does not specify a given field, that field's value is treated as0. Ifgroupsis empty, then all of the flows in the flow table are treated as a single group. - Consider the flows in the largest group, that is, the group that contains the greatest number of flows. If two or more groups all have the same largest number of flows, consider the flows in all of those groups.
- If the flows under consideration have different importance values, eliminate from consideration any flows except those with the lowest importance. ("Importance," a 16-bit integer value attached to each flow, was introduced in OpenFlow 1.4. Flows inserted with older versions of OpenFlow always have an importance of
0.) - Among the flows under consideration, choose the flow that expires soonest for eviction.
The eviction process only considers flows that have an idle timeout or a hard timeout. That is, eviction never deletes permanent flows. (Permanent flows do count against flow_limit though โ they're still on the roster ๐)
flow_limitโ optional integer, at least 0. If set, limits the number of flows that may be added to the table. Open vSwitch may limit the number of flows in a table for other reasons, e.g. due to hardware limitations or for resource availability or performance reasons.overflow_policyโ optional string, eitherevictorrefuse. Controls the switch's behavior when an OpenFlow flow table modification request would add flows in excess offlow_limit. The supported values are:refuseโ Refuse to add the flow or flows. This is also the default policy whenoverflow_policyis unset.evictโ Delete a flow chosen according to the algorithm described above.
groupsโ set of strings. Whenoverflow_policyisevict, this controls how flows are chosen for eviction when the flow table would otherwise exceedflow_limitflows. Its value is a set of NXM fields or sub-fields, each of which takes one of the formsfield[]orfield[start..end], e.g.NXM_OF_IN_PORT[]. Please seemeta-flow.hfor a complete list of NXM field names.
Open vSwitch ignores any invalid or unknown field specifications โ it's not gonna fight you about it ๐
When eviction is not enabled, via overflow_policy or an OpenFlow 1.4+ "table mod," this column has no effect. Zero. Nada. ๐ซฅ
๐ Classifier Optimization ๐
prefixesโ set of up to 4 strings. This string set specifies which fields should be used for address prefix tracking. Prefix tracking allows the classifier to skip rules with longer than necessary prefixes, resulting in better wildcarding for datapath flows โจ
Prefix tracking may be beneficial when a flow table contains matches on IP address fields with different prefix lengths. For example, when a flow table contains IP address matches on both full addresses and proper prefixes, the full address matches will typically cause the datapath flow to un-wildcard the whole address field (depending on flow entry priorities). In this case each packet with a different address gets handed to the userspace for flow processing and generates its own datapath flow. With prefix tracking enabled for the address field in question, packets with addresses matching shorter prefixes would generate datapath flows where the irrelevant address bits are wildcarded, allowing the same datapath flow to handle all the packets within the prefix in question. In this case many userspace upcalls can be avoided and the overall performance can be better ๐ฅ
This is a performance optimization only, so packets will receive the same treatment with or without prefix tracking. It's a glow-up, not a personality change ๐
The supported fields are: tun_id, tun_src, tun_dst, tun_ipv6_src, tun_ipv6_dst, nw_src, nw_dst (or aliases ip_src and ip_dst), ipv6_src, and ipv6_dst. (Using this feature for tun_id would only make sense if the tunnel IDs have prefix structure similar to IP addresses.)
By default, the prefixes=ip_dst,ip_src,ipv6_dst,ipv6_src are used on each flow table. This instructs the flow classifier to track the IPv4 and IPv6 destination and source addresses used by the rules in this specific flow table ๐ฏ
The keyword none is recognized as an explicit override of the default values, causing no prefix fields to be tracked. Periodt.
To set the prefix fields, the flow table record needs to exist:
ovs-vsctl set Bridge br0 flow_tables:0=@N1 -- --id=@N1 create
Flow_Table name=table0
That creates a flow table record for the OpenFlow table number 0 ๐
ovs-vsctl set Flow_Table table0 prefixes=ip_dst,ip_src
And that enables prefix tracking for IPv4 source and destination address fields ๐
There is a maximum number of fields that can be enabled for any one flow table. Currently this limit is 4. Don't get greedy ๐
๐ง Common Columns ๐ง
The overall purpose of these columns is described under Common Columns at the beginning of this document.
external_idsโ map of string-string pairs
๐ QoS TABLE ๐
Quality of Service (QoS) configuration for each Port that references it. Every Port that points at a QoS record gets its own lil service tier, okurrr โจ
Summary โจ
Okay so hereโs the quick vibe check for this table, bestie โ every field and config key, all in one place:
typeโ stringqueuesโ map of integer-Queue pairs, key in range0to4,294,967,295- Configuration for
linux-htbandlinux-hfsc:other_config : max-rateโ optional string, containing an integer
- Configuration for
egress-policerQoS:other_config : cirโ optional string, containing an integerother_config : cbsโ optional string, containing an integerother_config : eirโ optional string, containing an integerother_config : ebsโ optional string, containing an integer
- Configuration for
linux-sfq:other_config : perturbโ optional string, containing an integerother_config : quantumโ optional string, containing an integer
- Configuration for
linux-netem:other_config : latencyโ optional string, containing an integerother_config : limitโ optional string, containing an integerother_config : lossโ optional string, containing an integerother_config : jitterโ optional string, containing an integer
- Common Columns:
other_configโ map of string-string pairsexternal_idsโ map of string-string pairs
Details ๐ฆ
type: string
The type of QoS to implement. The currently defined types are listed below:
linux-htbโ Linux โhierarchy token bucketโ classifier. Seetc-htb(8)(also athttp://linux.die.net/man/8/tc-htb) and the HTB manual (http://luxik.cdi.cz/~devik/qos/htb/manual/userg.htm) for information on how this classifier works and how to configure it.linux-hfscโ Linux โHierarchical Fair Service Curveโ classifier. Seehttp://linux-ip.net/articles/hfsc.en/for information on how this classifier works.linux-sfqโ Linux โStochastic Fairness Queueingโ classifier. Seetc-sfq(8)(also athttp://linux.die.net/man/8/tc-sfq) for information on how this classifier works.linux-codelโ Linux โControlled Delayโ classifier. Seetc-codel(8)(also athttp://man7.org/linux/man-pages/man8/tc-codel.8.html) for information on how this classifier works.linux-fq_codelโ Linux โFair Queuing with Controlled Delayโ classifier. Seetc-fq_codel(8)(also athttp://man7.org/linux/man-pages/man8/tc-fq_codel.8.html) for information on how this classifier works.linux-netemโ Linux โNetwork Emulatorโ classifier. Seetc-netem(8)(also athttp://man7.org/linux/man-pages/man8/tc-netem.8.html) for information on how this classifier works.linux-noopโ Linux โNo operation.โ By default, Open vSwitch manages quality of service on all of its configured ports. This can be helpful, but sometimes administrators prefer to use other software to manage QoS. This type prevents Open vSwitch from changing the QoS configuration for a port.egress-policerโ A DPDK egress policer algorithm using the DPDKrte_meterlibrary. Therte_meterlibrary provides an implementation which allows the metering and policing of traffic. The implementation in OVS essentially creates a single token bucket used to police traffic. It should be noted that when therte_meteris configured as part of QoS there will be a performance overhead as therte_meteritself will consume CPU cycles in order to police traffic. These CPU cycles ordinarily are used for packet processing. As such the drop in performance will be noticed in terms of overall aggregate traffic throughput.trtcm-policerโ A DPDK egress policer algorithm using RFC 4115โs Two-Rate, Three-Color marker. Itโs a two-level hierarchical policer which first does a color-blind marking of the traffic at the queue level, followed by a color-aware marking at the port level. At the end traffic marked as Green or Yellow is forwarded, Red is dropped. For details on how traffic is marked, see RFC 4115. If the โdefault queueโ,0, is not configured itโs automatically created with the sameother_configvalues as the physical port.
queues: map of integer-Queue pairs, key in range 0 to 4,294,967,295
A map from queue numbers to Queue records. The supported range of queue numbers depend on type. The queue numbers are the same as the queue_id used in OpenFlow in struct ofp_action_enqueue and other structures.
Queue 0 is the โdefault queue.โ It is used by OpenFlow output actions when no specific queue has been set. When no configuration for queue 0 is present, it is automatically configured as if a Queue record with empty dscp and other_config columns had been specified. (Before version 1.6, Open vSwitch would leave queue 0 unconfigured in this case. With some queuing disciplines, this dropped all packets destined for the default queue.)
Configuration for linux-htb and linux-hfsc:
The linux-htb and linux-hfsc classes support the following key-value pair:
other_config : max-rateโ optional string, containing an integer. Maximum rate shared by all queued traffic, in bit/s. Optional. If not specified, for physical interfaces, the default is the link rate. For other interfaces or if the link rate cannot be determined, the default is currently10 Gbps.
Configuration for egress-policer QoS:
QoS type egress-policer provides egress policing for userspace port types with DPDK. It has the following key-value pairs defined.
other_config : cirโ optional string, containing an integer. The Committed Information Rate (CIR) is measured in bytes of IP packets per second, i.e. it includes the IP header, but not link specific (e.g. Ethernet) headers. This represents the bytes per second rate at which the token bucket will be updated. Thecirvalue is calculated by(pps x packet data size). For example, assuming a user wishes to limit a stream consisting of64byte packets to1million packets per second the CIR would be set to46000000. This value can be broken into1,000,000 x 46. Where1,000,000is the policing rate for the number of packets per second and46represents the size of the packet data for a64bytes IP packet without14bytes Ethernet and4bytes FCS header.other_config : cbsโ optional string, containing an integer. The Committed Burst Size (CBS) is measured in bytes and represents a token bucket. At a minimum this value should be set to the expected largest size packet in the traffic stream. In practice larger values may be used to increase the size of the token bucket. If a packet can be transmitted then thecbswill be decremented by the number of bytes/tokens of the packet. If there are not enough tokens in thecbsbucket the packet will be dropped.other_config : eirโ optional string, containing an integer. The Excess Information Rate (EIR) is measured in bytes of IP packets per second, i.e. it includes the IP header, but not link specific (e.g. Ethernet) headers. This represents the bytes per second rate at which the token bucket will be updated. Theeirvalue is calculated by(pps x packet data size). For example, assuming a user wishes to limit a stream consisting of64byte packets to1million packets per second the EIR would be set to46000000. This value can be broken into1,000,000 x 46. Where1,000,000is the policing rate for the number of packets per second and46represents the size of the packet data for a64bytes IP packet without14bytes Ethernet and4bytes FCS header.other_config : ebsโ optional string, containing an integer. The Excess Burst Size (EBS) is measured in bytes and represents a token bucket. At a minimum this value should be set to the expected largest size packet in the traffic stream. In practice larger values may be used to increase the size of the token bucket. If a packet can be transmitted then theebswill be decremented by the number of bytes/tokens of the packet. If there are not enough tokens in thecbsbucket the packet might be dropped.
Configuration for linux-sfq:
The linux-sfq QoS supports the following key-value pairs:
other_config : perturbโ optional string, containing an integer. Number of seconds between consecutive perturbations in hashing algorithm. Different flows can end up in the same hash bucket causing unfairness. Perturbationโs goal is to remove possible unfairness. The default and recommended value is10. Too low a value is discouraged because each perturbation can cause packet reordering.other_config : quantumโ optional string, containing an integer. Number of byteslinux-sfqQoS can dequeue in one turn in round-robin from one flow. The default and recommended value is equal to interfaceโs MTU.
Configuration for linux-netem:
The linux-netem QoS supports the following key-value pairs:
other_config : latencyโ optional string, containing an integer. Adds the chosen delay to the packets outgoing to chosen network interface. The latency value expressed inus.other_config : limitโ optional string, containing an integer. Maximum number of packets the qdisc may hold queued at a time. The default value is1000.other_config : lossโ optional string, containing an integer. Adds an independent loss probability to the packets outgoing from the chosen network interface.other_config : jitterโ optional string, containing an integer. Adds the provided jitter to the latency outgoing to the chosen network interface. The jitter value expressed inus.
Common Columns: ๐
The overall purpose of these columns is described under Common Columns at the beginning of this document.
other_configโ map of string-string pairsexternal_idsโ map of string-string pairs
๐ธ Queue TABLE ๐ธ
Okay so this is the Queue table โ it's basically the config for a port output queue, and you use it when you're setting up Quality of Service (QoS) stuff. Lowkey iconic behavior. It may be referenced by the queues column over in the QoS table, so yeah, they're besties ๐ซถ.
โจ Summary:
dscpโ optional integer, in range 0 to 63
Configuration for linux-htb QoS:
other_config:min-rateโ optional string, containing an integer, at least 1other_config:max-rateโ optional string, containing an integer, at least 1other_config:burstโ optional string, containing an integer, at least 1other_config:priorityโ optional string, containing an integer, in range 0 to 4,294,967,295
Configuration for linux-hfsc QoS:
other_config:min-rateโ optional string, containing an integer, at least 1other_config:max-rateโ optional string, containing an integer, at least 1
Common Columns:
other_configโ map of string-string pairsexternal_idsโ map of string-string pairs
๐ Details:
dscp: optional integer, in range 0 to 63
So if you set this, Open vSwitch will mark all traffic egressing this Queue with the given DSCP bits. Big main character energy for your packets fr. Here's the little catch though โ traffic egressing the default Queue only gets marked if it was explicitly selected as the Queue at the time the packet was output. And if you don't set it? Then the DSCP bits of traffic egressing this Queue just stay unchanged, no cap. ๐ฆ
๐ Configuration for linux-htb QoS:
QoS type linux-htb may use queue_ids less than 61440. It has the following key-value pairs defined.
other_config : min-rate: optional string, containing an integer, at least 1
Minimum guaranteed bandwidth, in bit/s. Like the bare minimum it's gonna get, periodt.
other_config : max-rate: optional string, containing an integer, at least 1
Maximum allowed bandwidth, in bit/s. Optional! If you specify it, the queue's rate will not be allowed to exceed the specified value โ even if there's excess bandwidth just sitting there available. If you don't specify it, it defaults to no limit. ๐
other_config : burst: optional string, containing an integer, at least 1
Burst size, in bits. This is the maximum amount of ``credits'' that a queue can accumulate while it is idle. Optional. And ngl, details of the linux-htb implementation require a minimum burst size, so a too-small burst will be silently ignored ๐ (it's giving "no thoughts, just vibes" โ it won't even tell you).
other_config : priority: optional string, containing an integer, in range 0 to 4,294,967,295
A queue with a smaller priority will receive all the excess bandwidth that it can use before a queue with a larger value receives any. Specific priority values are unimportant โ only relative ordering matters, iykyk. Defaults to 0 if unspecified. ๐
๐ง Configuration for linux-hfsc QoS:
QoS type linux-hfsc may use queue_ids less than 61440. It has the following key-value pairs defined.
other_config : min-rate: optional string, containing an integer, at least 1
Minimum guaranteed bandwidth, in bit/s. Same deal as before, bestie.
other_config : max-rate: optional string, containing an integer, at least 1
Maximum allowed bandwidth, in bit/s. Optional. If specified, the queue's rate will not be allowed to exceed the specified value, even if excess bandwidth is available. If unspecified, defaults to no limit. โจ
๐ Common Columns:
The overall purpose of these columns is described under Common Columns at the beginning of this document โ so go peek up there if you're confused, no worries.
other_config: map of string-string pairs
external_ids: map of string-string pairs
๐ช MIRROR TABLE ๐ช
A port mirror within a Bridge.
Okay so bestie, a port mirror is literally how you tell a bridge โhey, send selected frames to special mirrored ports too, in addition to their normal destinations.โ Mirroring traffic may also be called SPAN or RSPAN, depending on how the mirrored traffic gets sent. ๐
When a packet enters an Open vSwitch bridge, it becomes eligible for mirroring based on its ingress port and VLAN. As the packet travels through the flow tables, each time it is output to a port, it becomes eligible for mirroring based on the egress port and VLAN. In Open vSwitch 2.5 and later, mirroring happens just after a packet first becomes eligible, using the packet as it exists at that point. In Open vSwitch 2.4 and earlier, mirroring happens only after a packet has traversed all the flow tables, using the original packet as it entered the bridge. This makes a difference only when the flow table modifies the packet: in Open vSwitch 2.4, the modifications are never visible to mirrors, whereas in Open vSwitch 2.5 and later, modifications made before the first output that makes it eligible for mirroring to a particular destination are visible. โจ
A packet that enters an Open vSwitch bridge is mirrored to a particular destination only once, even if it is eligible for multiple reasons. For example, a packet would be mirrored to a particular output_port only once, even if it is selected for mirroring to that port by select_dst_port and select_src_port in the same or different Mirror records. No double-dipping, periodt. ๐ซถ
๐ Summary ๐
nameโstring- Selecting Packets for Mirroring:
select_allโbooleanselect_dst_portโ set of weak reference toPortsselect_src_portโ set of weak reference toPortsselect_vlanโ set of up to 4,096 integers, in range 0 to 4,095filterโ optionalstring
- Mirroring Destination Configuration:
output_portโ optional weak reference toPortoutput_vlanโ optional integer, in range 1 to 4,095snaplenโ optional integer, in range 14 to 65,535
- Statistics: Mirror counters:
statistics : tx_packetsโ optional integerstatistics : tx_bytesโ optional integer
- Common Columns:
external_idsโ map of string-string pairs
๐ Details ๐
name: string โ Arbitrary identifier for theMirror. Itโs the mirrorโs little name tag, bestie. ๐
๐ฏ Selecting Packets for Mirroring ๐ฏ
To be selected for mirroring, a given packet must enter or leave the bridge through a selected port and it must also be in one of the selected VLANs. Both boxes gotta be checked, iykyk. โ
select_all: boolean โ If true, every packet arriving or departing on any port is selected for mirroring. Literally all of them. ๐select_dst_port: set of weak reference toPortsโ Ports on which departing packets are selected for mirroring. The โleavingโ girlies. ๐ฆselect_src_port: set of weak reference toPortsโ Ports on which arriving packets are selected for mirroring. The โenteringโ girlies. ๐ธselect_vlan: set of up to 4,096 integers, in range 0 to 4,095 โ VLANs on which packets are selected for mirroring. An empty set selects packets on all VLANs. So if you leave it empty, itโs giving โeveryoneโs invited.โ ๐filter: optional string โ When set, only packets that matchfilterare selected for mirroring. Packets that do not match are ignored by this mirror. The filter syntax is described inovs-fields(7). However, thein_portfield is not supported;select_src_portshould be used to limit the mirror to a source port. This filter is applied afterselect_all,select_dst_port,select_src_port, andselect_vlan. Order matters, bestie. ๐
๐ช Mirroring Destination Configuration ๐ช
These columns are mutually exclusive. Exactly one of them must be nonempty. Not two, not zero โ exactly one. Itโs giving โpick a lane.โ ๐ฃ๏ธ
output_port: optional weak reference toPortโ Output port for selected packets, if nonempty.
Specifying a port for mirror output reserves that port exclusively for mirroring. No frames other than those selected for mirroring via this column will be forwarded to the port, and any frames received on the port will be discarded. So yeah, that port is booked and busy. ๐
The output port may be any kind of port supported by Open vSwitch. It may be, for example, a physical port (sometimes called SPAN) or a GRE tunnel. Any kind, no cap. ๐ฅ
output_vlan: optional integer, in range 1 to 4,095 โ Output VLAN for selected packets, if nonempty.
The frames will be sent out all ports that trunk output_vlan, as well as any ports with implicit VLAN output_vlan. When a mirrored frame is sent out a trunk port, the frameโs VLAN tag will be set to output_vlan, replacing any existing tag; when it is sent out an implicit VLAN port, the frame will not be tagged. This type of mirroring is sometimes called RSPAN. ๐
See the documentation for other_config:forward-bpdu in the Interface table for a list of destination MAC addresses which will not be mirrored to a VLAN to avoid confusing switches that interpret the protocols that they represent. Important little cross-reference, bestie. ๐ซถ
โ ๏ธ Please note: Mirroring to a VLAN can disrupt a network that contains unmanaged switches. Consider an unmanaged physical switch with two ports: port 1, connected to an end host, and port 2, connected to an Open vSwitch configured to mirror received packets into VLAN 123 on port 2. Suppose that the end host sends a packet on port 1 that the physical switch forwards to port 2. The Open vSwitch forwards this packet to its destination and then reflects it back on port 2 in VLAN 123. This reflected packet causes the unmanaged physical switch to replace the MAC learning table entry, which correctly pointed to port 1, with one that incorrectly points to port 2. Afterward, the physical switch will direct packets destined for the end host to the Open vSwitch on port 2, instead of to the end host on port 1, disrupting connectivity. If mirroring to a VLAN is desired in this scenario, then the physical switch must be replaced by one that learns Ethernet addresses on a per-VLAN basis. In addition, learning should be disabled on the VLAN containing mirrored traffic. If this is not done then intermediate switches will learn the MAC address of each end host from the mirrored traffic. If packets being sent to that end host are also mirrored, then they will be dropped since the switch will attempt to send them out the input port. Disabling learning for the VLAN will cause the switch to correctly send the packet out all ports configured for that VLAN. If Open vSwitch is being used as an intermediate switch, learning can be disabled by adding the mirrored VLAN toflood_vlansin the appropriateBridgetable or tables. ๐จ
Mirroring to a GRE tunnel has fewer caveats than mirroring to a VLAN and should generally be preferred. So likeโฆ GRE is the safer slay here. ๐ง
snaplen: optional integer, in range 14 to 65,535 โ Maximum per-packet number of bytes to mirror.
A mirrored packet with size larger than snaplen will be truncated in datapath to snaplen bytes before sending to the mirror output port. If omitted, packets are not truncated. So snaplen is the โokay but only this many bytes, bestieโ limit. โ๏ธ
๐ Statistics: Mirror counters ๐
Key-value pairs that report mirror statistics. The update period is controlled by other_config:stats-update-interval in the Open_vSwitch table. Gotta love a configurable refresh, honestly. โฑ๏ธ
statistics : tx_packets: optional integer โ Number of packets transmitted through this mirror. Counting the girlies. ๐statistics : tx_bytes: optional integer โ Number of bytes transmitted through this mirror. Counting the bytes too, because data is data. ๐
๐งต Common Columns ๐งต
The overall purpose of these columns is described under Common Columns at the beginning of this document.
external_ids: map of string-string pairs โ Your little external bookkeeping bestie.
๐๏ธ CONTROLLER TABLE ๐๏ธ
An OpenFlow controller. Yes bestie, this is the switchโs controller connection era. ๐
๐ Summary ๐
- Core Features:
typeโ optional string, eitherprimaryorservicetargetโ stringconnection_modeโ optional string, eitherin-bandorout-of-band
- Controller Failure Detection and Handling:
max_backoffโ optional integer, at least 1,000inactivity_probeโ optional integer
- Asynchronous Messages:
enable_async_messagesโ optional boolean
- Controller Rate Limiting:
controller_queue_sizeโ optional integer, in range 1 to 512controller_rate_limitโ optional integer, at least 100controller_burst_limitโ optional integer, at least 25- Controller Rate Limiting Statistics:
status : packet-in-TYPE-bypassedโ optional string, containing an integer, at least 0status : packet-in-TYPE-queuedโ optional string, containing an integer, at least 0status : packet-in-TYPE-droppedโ optional string, containing an integer, at least 0status : packet-in-TYPE-backlogโ optional string, containing an integer, at least 0
- Additional In-Band Configuration:
local_ipโ optional stringlocal_netmaskโ optional stringlocal_gatewayโ optional string
- Controller Status:
is_connectedโ booleanroleโ optional string, one ofmaster,other, orslavestatus : last_errorโ optional stringstatus : stateโ optional string, one ofACTIVE,BACKOFF,CONNECTING,IDLE, orVOIDstatus : sec_since_connectโ optional string, containing an integer, at least 0status : sec_since_disconnectโ optional string, containing an integer, at least 1
- Connection Parameters:
other_config : dscpโ optional string, containing an integer
- Common Columns:
external_idsโ map of string-string pairsother_configโ map of string-string pairs
๐ Details ๐
๐ Core Features ๐
type: optional string, eitherprimaryorserviceโ Open vSwitch supports two kinds of OpenFlow controllers. A bridge may have any number of each kind:
Primary controllers โ This is the kind of controller envisioned by the OpenFlow specifications. Usually, a primary controller implements a network policy by taking charge of the switchโs flow table. Main character energy fr fr. ๐
Okay so first: the fail_mode column in the Bridge table applies to primary controllers. No cap.
When multiple primary controllers are configured, Open vSwitch connects to all of them simultaneously. OpenFlow provides few facilities to allow multiple controllers to coordinate in interacting with a single switch, so more than one primary controller should be specified only if the controllers are themselves designed to coordinate with each other. Periodt.
๐๏ธ Service controllers
These kinds of OpenFlow controller connections are intended for occasional support and maintenance use, e.g. with ovs-ofctl. Usually a service controller connects only briefly to inspect or modify some of a switch's state.
The fail_mode column in the Bridge table does not apply to service controllers. Noted, bestie.
By default, Open vSwitch treats controllers with active connection methods as primary controllers and those with passive connection methods as service controllers. Set this column to the desired type to override this default.
๐ฏ target: string
Connection method for controller.
The following active connection methods are currently supported:
ssl:host[:port]โ The specified SSL/TLS port on the host at the givenhost, which can either be a DNS name (if built with unbound library) or an IP address. Thesslcolumn in the Open_vSwitch table must point to a valid SSL/TLS configuration when this form is used. Ifportis not specified, it defaults to6653. SSL/TLS support is an optional feature that is not always built as part of Open vSwitch.tcp:host[:port]โ The specified TCP port on the host at the givenhost, which can either be a DNS name (if built with unbound library) or an IP address (IPv4 or IPv6). Ifhostis an IPv6 address, wrap it in square brackets, e.g.tcp:[::1]:6653. Ifportis not specified, it defaults to6653.
The following passive connection methods are currently supported:
pssl:[port][:host]โ Listens for SSL/TLS connections on the specified TCP port. Ifhost, which can either be a DNS name (if built with unbound library) or an IP address, is specified, then connections are restricted to the resolved or specified local IP address (either IPv4 or IPv6). Ifhostis an IPv6 address, wrap it in square brackets, e.g.pssl:6653:[::1]. Ifportis not specified, it defaults to6653. Ifhostis not specified then it listens only on IPv4 (but not IPv6) addresses. Thesslcolumn in the Open_vSwitch table must point to a valid SSL/TLS configuration when this form is used. The page repeats the port default here: ifportis not specified, it currently defaults to6653. SSL/TLS support is an optional feature that is not always built as part of Open vSwitch.ptcp:[port][:host]โ Listens for connections on the specified TCP port. Ifhost, which can either be a DNS name (if built with unbound library) or an IP address, is specified, then connections are restricted to the resolved or specified local IP address (either IPv4 or IPv6). Ifhostis an IPv6 address, wrap it in square brackets, e.g.ptcp:6653:[::1]. Ifhostis not specified then it listens only on IPv4 addresses. Ifportis not specified, it defaults to6653.
When multiple controllers are configured for a single bridge, the target values must be unique. Duplicate target values yield unspecified results. Like, do not do that.
๐ connection_mode: optional string, either in-band or out-of-band
If it is specified, this setting must be one of the following strings that describes how Open vSwitch contacts this OpenFlow controller over the network:
in-bandโ In this mode, this controller's OpenFlow traffic travels over the bridge associated with the controller. With this setting, Open vSwitch allows traffic to and from the controller regardless of the contents of the OpenFlow flow table. (Otherwise, Open vSwitch would never be able to connect to the controller, because it did not have a flow to enable it.) This is the most common connection mode because it is not necessary to maintain two independent networks.out-of-bandโ In this mode, OpenFlow traffic uses a control network separate from the bridge associated with this controller, that is, the bridge does not use any of its own network devices to communicate with the controller. The control network must be configured separately, before or afterovs-vswitchdis started.
If not specified, the default is implementation-specific.
๐ Controller Failure Detection and Handling:
โณ max_backoff: optional integer, at least 1,000
Maximum number of milliseconds to wait between connection attempts. Default is implementation-specific.
๐ซง inactivity_probe: optional integer
Maximum number of milliseconds of idle time on connection to controller before sending an inactivity probe message. If Open vSwitch does not communicate with the controller for the specified number of seconds, it will send a probe. If a response is not received for the same additional amount of time, Open vSwitch assumes the connection has been broken and attempts to reconnect. Default is implementation-specific. A value of 0 disables inactivity probes.
๐จ Asynchronous Messages:
OpenFlow switches send certain messages to controllers spontaneously, that is, not in response to any request from the controller. These messages are called "asynchronous messages." These columns allow asynchronous messages to be limited or disabled to ensure the best use of network resources.
๐ enable_async_messages: optional boolean
The OpenFlow protocol enables asynchronous messages at time of connection establishment, which means that a controller can receive asynchronous messages, potentially many of them, even if it turns them off immediately after connecting. Set this column to false to change Open vSwitch behavior to disable, by default, all asynchronous messages. The controller can use the NXT_SET_ASYNC_CONFIG Nicira extension to OpenFlow to turn on any messages that it does want to receive, if any.
๐ฆ Controller Rate Limiting:
A switch can forward packets to a controller over the OpenFlow protocol. Forwarding packets this way at too high a rate can overwhelm a controller, frustrate use of the OpenFlow connection for other purposes, increase the latency of flow setup, and use an unreasonable amount of bandwidth. Therefore, Open vSwitch supports limiting the rate of packet forwarding to a controller.
There are two main reasons in OpenFlow for a packet to be sent to a controller: either the packet "misses" in the flow table, that is, there is no matching flow, or a flow table action says to send the packet to the controller. Open vSwitch limits the rate of each kind of packet separately at the configured rate. Therefore, the actual rate that packets are sent to the controller can be up to twice the configured rate, when packets are sent for both reasons.
This feature is specific to forwarding packets over an OpenFlow connection. It is not general-purpose QoS. See the QoS table for quality of service configuration, and ingress_policing_rate in the Interface table for ingress policing configuration.
๐ฆ controller_queue_size: optional integer, in range 1 to 512
This sets the maximum size of the queue of packets that need to be sent to this OpenFlow controller. The value must be less than 512. If not specified the queue size is limited to the value set for the management controller in other_config:controller-queue-size if present or 100 packets by default. Note: increasing the queue size might have a negative impact on latency.
๐ controller_rate_limit: optional integer, at least 100
The maximum rate at which the switch will forward packets to the OpenFlow controller, in packets per second. If no value is specified, rate limiting is disabled.
๐ฅ controller_burst_limit: optional integer, at least 25
When a high rate triggers rate-limiting, Open vSwitch queues packets to the controller for each port and transmits them to the controller at the configured rate. This value limits the number of queued packets. Ports on a bridge share the packet queue fairly.
This value has no effect unless controller_rate_limit is configured. The current default when this value is not specified is one-quarter of controller_rate_limit, meaning that queuing can delay forwarding a packet to the controller by up to 250 ms.
๐ Controller Rate Limiting Statistics:
These values report the effects of rate limiting. Their values are relative to establishment of the most recent OpenFlow connection, or since rate limiting was enabled, whichever happened more recently. Each consists of two values, one with TYPE replaced by miss for rate limiting flow table misses, and the other with TYPE replaced by action for rate limiting packets sent by OpenFlow actions.
These statistics are reported only when controller rate limiting is enabled.
status : packet-in-TYPE-bypassedโ optional string, containing an integer, at least0. Number of packets sent directly to the controller, without queuing, because the rate did not exceed the configured maximum.status : packet-in-TYPE-queuedโ optional string, containing an integer, at least0. Number of packets added to the queue to send later.status : packet-in-TYPE-droppedโ optional string, containing an integer, at least0. Number of packets added to the queue that were later dropped due to overflow. This value is less than or equal tostatus:packet-in-TYPE-queued.status : packet-in-TYPE-backlogโ optional string, containing an integer, at least0. Number of packets currently queued. The other statistics increase monotonically, but this one fluctuates between0and thecontroller_burst_limitas conditions change.
๐ Additional In-Band Configuration ๐
Okay so these values are <highkey>only</highkey> considered in in-band control mode (see connection_mode). ๐
When multiple controllers are configured on a single bridge, there should be only one set of unique values in these columns. If different values are set for these columns in different controllers, the effect is unspecified โ so yeah, literally don't do that. ๐ญ
local_ipโ optional string. The IP address to configure on the local port, e.g.192.168.0.123. If this value is unset, thenlocal_netmaskandlocal_gatewayare ignored.local_netmaskโ optional string. The IP netmask to configure on the local port, e.g.255.255.255.0. Iflocal_ipis set but this value is unset, then the default is chosen based on whether the IP address is class A, B, or C.local_gatewayโ optional string. The IP address of the gateway to configure on the local port, as a string, e.g.192.168.0.1. Leave this column unset if this network has no gateway.
๐ Controller Status ๐
is_connectedโ boolean.trueif currently connected to this controller,falseotherwise.roleโ optional string, one ofmaster,other, orslave. The level of authority this controller has on the associated bridge. Possible values are:otherโ Allows the controller access to all OpenFlow features.masterโ Equivalent toother, except that there may be at most one such controller at a time. If a given controller promotes itself to this role,ovs-vswitchddemotes any existing controller with the role toslave.slaveโ Allows the controller read-only access to OpenFlow features. Attempts to modify the flow table will be rejected with an error. Such controllers do not receiveOFPT_PACKET_INorOFPT_FLOW_REMOVEDmessages, but they do receiveOFPT_PORT_STATUSmessages.
status : last_errorโ optional string. A human-readable description of the last error on the connection to the controller; i.e.strerror(errno). This key will exist only if an error has occurred.status : stateโ optional string, one ofACTIVE,BACKOFF,CONNECTING,IDLE, orVOID. The state of the connection to the controller:VOIDโ Connection is disabled.BACKOFFโ Attempting to reconnect at an increasing period.CONNECTINGโ Attempting to connect.ACTIVEโ Connected, remote host responsive.IDLEโ Connection is idle. Waiting for response to keep-alive.
These values may change in the future. They are provided only for human consumption.
status : sec_since_connectโ optional string, containing an integer, at least0. The amount of time since this controller last successfully connected to the switch (in seconds). Value is empty if controller has never successfully connected.status : sec_since_disconnectโ optional string, containing an integer, at least1. The amount of time since this controller last disconnected from the switch (in seconds). Value is empty if controller has never disconnected.
๐ Connection Parameters ๐
Additional configuration for a connection between the controller and the Open vSwitch.
other_config : dscpโ optional string, containing an integer. The Differentiated Service Code Point (DSCP) is specified using 6 bits in the Type of Service (TOS) field in the IP header. DSCP provides a mechanism to classify the network traffic and provide Quality of Service (QoS) on IP networks. The DSCP value specified here is used when establishing the connection between the controller and the Open vSwitch. If no value is specified, a default value of48is chosen. Valid DSCP values must be in the range0to63.
๐งพ Common Columns ๐งพ
The overall purpose of these columns is described under Common Columns at the beginning of this document.
external_idsโ map of string-string pairsother_configโ map of string-string pairs
๐ Manager TABLE ๐
Configuration for a database connection to an Open vSwitch database (OVSDB) client.
This table primarily configures the Open vSwitch database (ovsdb-server), not the Open vSwitch switch (ovs-vswitchd). The switch does read the table to determine what connections should be treated as in-band.
The Open vSwitch database server can initiate and maintain active connections to remote clients. It can also listen for database connections.
๐ Summary ๐
- Core Features:
targetโ string (must be unique within table)connection_modeโ optional string, eitherin-bandorout-of-band
- Client Failure Detection and Handling:
max_backoffโ optional integer, at least1,000inactivity_probeโ optional integer
- Status:
is_connectedโ booleanstatus : last_errorโ optional stringstatus : stateโ optional string, one ofACTIVE,BACKOFF,CONNECTING,IDLE, orVOIDstatus : sec_since_connectโ optional string, containing an integer, at least0status : sec_since_disconnectโ optional string, containing an integer, at least0status : locks_heldโ optional stringstatus : locks_waitingโ optional stringstatus : locks_lostโ optional stringstatus : n_connectionsโ optional string, containing an integer, at least2status : bound_portโ optional string, containing an integer
- Connection Parameters:
other_config : dscpโ optional string, containing an integer
- Common Columns:
external_idsโ map of string-string pairsother_configโ map of string-string pairs
๐ Details ๐
๐ Core Features ๐
targetโ string (must be unique within table)
Connection method for managers.
The following connection methods are currently supported:
ssl:host[:port]โ The specified SSL/TLS port on the host at the givenhost, which can either be a DNS name (if built with unbound library) or an IP address. Thesslcolumn in theOpen_vSwitchtable must point to a valid SSL/TLS configuration when this form is used.
If port is not specified, it defaults to 6640.
SSL/TLS support is an optional feature that is not always built as part of Open vSwitch.
tcp:host[:port]โ The specified TCP port on the host at the givenhost, which can either be a DNS name (if built with unbound library) or an IP address (IPv4 or IPv6). Ifhostis an IPv6 address, wrap it in square brackets, e.g.tcp:[::1]:6640.
If port is not specified, it defaults to 6640.
pssl:[port][:host]โ Listens for SSL/TLS connections on the specified TCP port. Specify0forportto have the kernel automatically choose an available port. Ifhost, which can either be a DNS name (if built with unbound library) or an IP address, is specified, then connections are restricted to the resolved or specified local IP address (either IPv4 or IPv6 address). Ifhostis an IPv6 address, wrap in square brackets, e.g.pssl:6640:[::1]. Ifhostis not specified then it listens only on IPv4 (but not IPv6) addresses. Thesslcolumn in theOpen_vSwitchtable must point to a valid SSL/TLS configuration when this form is used.
If port is not specified, it defaults to 6640.
SSL/TLS support is an optional feature that is not always built as part of Open vSwitch.
ptcp:[port][:host]โ Listens for connections on the specified TCP port. Specify0forportto have the kernel automatically choose an available port. Ifhost, which can either be a DNS name (if built with unbound library) or an IP address, is specified, then connections are restricted to the resolved or specified local IP address (either IPv4 or IPv6 address). Ifhostis an IPv6 address, wrap it in square brackets, e.g.ptcp:6640:[::1]. Ifhostis not specified then it listens only on IPv4 addresses.
If port is not specified, it defaults to 6640.
When multiple managers are configured, the target values must be unique. Duplicate target values yield unspecified results.
connection_modeโ optional string, eitherin-bandorout-of-band
If it is specified, this setting must be one of the following strings that describes how Open vSwitch contacts this OVSDB client over the network:
in-bandโ In this mode, this connection's traffic travels over a bridge managed by Open vSwitch. With this setting, Open vSwitch allows traffic to and from the client regardless of the contents of the OpenFlow flow table. (Otherwise, Open vSwitch would never be able to connect to the client, because it did not have a flow to enable it.) This is the most common connection mode because it is not necessary to maintain two independent networks.out-of-bandโ In this mode, the client's traffic uses a control network separate from that managed by Open vSwitch, that is, Open vSwitch does not use any of its own network devices to communicate with the client. The control network must be configured separately, before or afterovs-vswitchdis started.
If not specified, the default is implementation-specific.
๐ ๏ธ Client Failure Detection and Handling ๐ ๏ธ
max_backoffโ optional integer, at least1,000
Maximum number of milliseconds to wait between connection attempts. Default is implementation-specific.
inactivity_probeโ optional integer. This is the maximum number of milliseconds of idle time on the connection to the client before sending an inactivity probe message. If Open vSwitch does not communicate with the client for the specified number of seconds, it will send a probe. If a response is not received for the same additional amount of time, Open vSwitch assumes the connection has been broken and attempts to reconnect. Default is implementation-specific. A value of0disables inactivity probes.
๐ฉบ Status:
Key-value pair of is_connected is always updated. Other key-value pairs in the status columns may be updated depending on the target type.
When target specifies a connection method that listens for inbound connections (e.g. ptcp: or punix:), both n_connections and is_connected may also be updated while the remaining key-value pairs are omitted.
On the other hand, when target specifies an outbound connection, all key-value pairs may be updated, except the above-mentioned two key-value pairs associated with inbound connection targets. They are omitted.
is_connected: boolean โtrueif currently connected to this manager,falseotherwise.status : last_error: optional string โ a human-readable description of the last error on the connection to the manager; i.e.strerror(errno). This key will exist only if an error has occurred.status : state: optional string, one ofACTIVE,BACKOFF,CONNECTING,IDLE, orVOIDโ the state of the connection to the manager:VOIDโ connection is disabled.BACKOFFโ attempting to reconnect at an increasing period.CONNECTINGโ attempting to connect.ACTIVEโ connected, remote host responsive.IDLEโ connection is idle. Waiting for response to keep-alive.
These values may change in the future. They are provided only for human consumption.
status : sec_since_connect: optional string, containing an integer, at least0โ the amount of time since this manager last successfully connected to the database (in seconds). Value is empty if manager has never successfully connected.status : sec_since_disconnect: optional string, containing an integer, at least0โ the amount of time since this manager last disconnected from the database (in seconds). Value is empty if manager has never disconnected.status : locks_held: optional string โ space-separated list of the names of OVSDB locks that the connection holds. Omitted if the connection does not hold any locks.status : locks_waiting: optional string โ space-separated list of the names of OVSDB locks that the connection is currently waiting to acquire. Omitted if the connection is not waiting for any locks.status : locks_lost: optional string โ space-separated list of the names of OVSDB locks that the connection has had stolen by another OVSDB client. Omitted if no locks have been stolen from this connection.status : n_connections: optional string, containing an integer, at least2โ whentargetspecifies a connection method that listens for inbound connections (e.g.ptcp:orpssl:) and more than one connection is actually active, the value is the number of active connections. Otherwise, this key-value pair is omitted.status : bound_port: optional string, containing an integer โ whentargetisptcp:orpssl:, this is the TCP port on which the OVSDB server is listening. (This is particularly useful whentargetspecifies a port of0, allowing the kernel to choose any available port.)
๐ Connection Parameters:
Additional configuration for a connection between the manager and the Open vSwitch Database.
other_config : dscp: optional string, containing an integer โ the Differentiated Service Code Point (DSCP) is specified using 6 bits in the Type of Service (TOS) field in the IP header. DSCP provides a mechanism to classify the network traffic and provide Quality of Service (QoS) on IP networks. The DSCP value specified here is used when establishing the connection between the manager and the Open vSwitch. If no value is specified, a default value of48is chosen. Valid DSCP values must be in the range0to63.
๐๏ธ Common Columns:
The overall purpose of these columns is described under Common Columns at the beginning of this document.
external_ids: map of string-string pairsother_config: map of string-string pairs
๐ NetFlow TABLE
A NetFlow target. NetFlow is a protocol that exports a number of details about terminating IP flows, such as the principals involved and duration.
๐ Summary:
targetsโ set of 1 or more stringsengine_idโ optional integer, in range0to255engine_typeโ optional integer, in range0to255active_timeoutโ integer, at least-1add_id_to_interfaceโ boolean- Common Columns:
external_idsโ map of string-string pairs
๐ Details:
targets: set of 1 or more strings โ NetFlow targets in the formip:port. Theipmust be specified numerically, not as a DNS name.engine_id: optional integer, in range0to255โ engine ID to use in NetFlow messages. Defaults to datapath index if not specified.engine_type: optional integer, in range0to255โ engine type to use in NetFlow messages. Defaults to datapath index if not specified.active_timeout: integer, at least-1โ the interval at which NetFlow records are sent for flows that are still active, in seconds. A value of0requests the default timeout (currently600seconds); a value of-1disables active timeouts.
The NetFlow passive timeout, for flows that become inactive, is not configurable. It will vary depending on the Open vSwitch version, the forms and contents of the OpenFlow flow tables, CPU and memory usage, and network activity. A typical passive timeout is about a second.
add_id_to_interface: boolean โ if this columnโs value isfalse, the ingress and egress interface fields of NetFlow flow records are derived from OpenFlow port numbers. When it istrue, the 7 most significant bits of these fields will be replaced by the least significant 7 bits of the engine id. This is useful because many NetFlow collectors do not expect multiple switches to be sending messages from the same host, so they do not store the engine information which could be used to disambiguate the traffic.
When this option is enabled, a maximum of 508 ports are supported.
๐๏ธ Common Columns:
The overall purpose of these columns is described under Common Columns at the beginning of this document.
external_ids: map of string-string pairs
๐งต Datapath TABLE
Configuration for a datapath within Open_vSwitch.
A datapath is responsible for providing the packet handling in Open vSwitch. There are two primary datapath implementations used by Open vSwitch: kernel and userspace. Kernel datapath implementation is available for Linux and selected as system in the datapath_type column of the Bridge table. The userspace datapath is used by DPDK and AF-XDP, and is selected as netdev in the datapath_type column of the Bridge table.
A datapath of a particular type is shared by all the bridges that use that datapath. Thus, configurations applied to this table affect all bridges that use this datapath.
๐ Summary:
datapath_versionโ stringct_zonesโ map of integer-CT_Zonepairs, key in range0to65,535- Capabilities:
capabilities : max_vlan_headersโ optional string, containing an integer, at least0capabilities : recircโ optional string, eithertrueorfalsecapabilities : lb_output_actionโ optional string, eithertrueorfalse- Connection-Tracking Capabilities:
capabilities : ct_stateโ optional string, eithertrueorfalsecapabilities : ct_state_natโ optional string, eithertrueorfalsecapabilities : ct_zoneโ optional string, eithertrueorfalsecapabilities : ct_markโ optional string, eithertrueorfalsecapabilities : ct_labelโ optional string, eithertrueorfalsecapabilities : ct_orig_tupleโ optional string, eithertrueorfalsecapabilities : ct_orig_tuple6โ optional string, eithertrueorfalse
capabilities : masked_set_actionโ optional string, eithertrueorfalsecapabilities : tnl_push_popโ optional string, eithertrueorfalsecapabilities : ufidโ optional string, eithertrueorfalsecapabilities : truncโ optional string, eithertrueorfalsecapabilities : nd_extโ optional string, eithertrueorfalse- Clone Actions:
capabilities : cloneโ optional string, eithertrueorfalsecapabilities : sample_nestingโ optional string, containing an integer, at least0
capabilities : ct_eventmaskโ optional string, eithertrueorfalsecapabilities : ct_clearโ optional string, eithertrueorfalsecapabilities : max_hash_algโ optional string, containing an integer, at least0capabilities : check_pkt_lenโ optional string, eithertrueorfalsecapabilities : ct_timeoutโ optional string, eithertrueorfalsecapabilities : explicit_drop_actionโ optional string, eithertrueorfalsecapabilities : ct_zero_snatโ optional string, eithertrueorfalsecapabilities : ct_flushโ optional string, eithertrueorfalsecapabilities : psampleโ optional string, eithertrueorfalse
ct_zone_default_limitโ optional integer, in range0to4,294,967,295- Common Columns:
external_idsโ map of string-string pairs
Details ๐
datapath_versionโ string. This is literally the datapath's version number, reported right back atcha. Why do we care? Because management software can peep it and spot discrepancies between the Open vSwitch userspace version and the datapath version. (Heads up: theovs_versioncolumn over in theOpen_vSwitchtable is the one that reports the userspace version โ don't mix them up bestie ๐ .) What actually shows up here depends on which datapath you're running:- When the datapath is built into the
ovs-vswitchdbinary, this column reports<built-in>. And likeโฆ a built-in datapath is by definition the same version as the rest of the Open vSwitch userspace. No drama. - Other datapaths currently report
<unknown>. Yeah. That's the whole vibe.
- When the datapath is built into the
A version discrepancy between ovs-vswitchd and the datapath in use is not normally cause for alarm โ deep breaths, it's fine. The Open vSwitch kernel datapaths for Linux especially are designed for maximum inter-version compatibility: any userspace version works with any kernel version. Iconic behavior honestly. But there are a few reasons someone might insist on particular user/kernel pairings:
- First: newer kernel versions add new features, and those can only be used by new-enough userspace. Example: VXLAN tunneling requires certain minimal userspace and kernel versions. No shortcuts.
- Second, extending on the first: some newer kernel versions add new features for enhancing performance that only new-enough userspace versions can take advantage of.
ct_zonesโ map of integer-CT_Zonepairs, key in range0to65,535. Configuration for connection tracking zones, periodt. Each pair maps from a zone id to a configuration for that zone. Zone0applies to the default zone (ie, the one used if a zone is not specified in connection tracking-related OpenFlow matches and actions).
Capabilities ๐ฆ
The capabilities column reports a datapath's features. For the netdev datapath, the capabilities are fixed for a given version of Open vSwitch, because this datapath is built into the ovs-vswitchd binary. The Linux kernel and other datapaths, which are external to OVS userspace, can vary in version and capabilities independently from ovs-vswitchd โ they're out here living their own life, fr fr.
Some of these features indicate whether higher-level Open vSwitch features are available. For example, OpenFlow features for connection-tracking are available only when capabilities:ct_state is true. So a controller that wants to determine whether a feature is supported could, therefore, consult the relevant capabilities in this table. Cute, right? But as a general rule, it's better for a controller to just try to use the higher-level feature and use the result as an indication of support โ because the low-level capabilities are more likely to shift over time than the high-level features that rely on them. iykyk.
capabilities : max_vlan_headersโ optional string, containing an integer, at least0. Number of 802.1q VLAN headers supported by the datapath, as probed by theovs-vswitchdslow path. If the datapath supports more VLAN headers than the slow path, this reports the slow path's limit. And ngl, the value ofother-config:vlan-limitin theOpen_vSwitchtable does not influence the number reported here.capabilities : recircโ optional string, eithertrueorfalse. If this is true, then the datapath supports recirculation, specificallyOVS_KEY_ATTR_RECIRC_ID. Recirculation enables higher performance for MPLS and active-active load balancing bonding modes. Slay.capabilities : lb_output_actionโ optional string, eithertrueorfalse. If this is true, then the datapath supports optimizedbalance-tcpbond mode. This capability replaces existing hash and recirc actions with new actionlb_outputand avoids recirculation of packet in datapath. It is supported only forbalance-tcpbond mode in netdev datapath. The new action gives higher performance by using bond buckets instead of post recirculation flows for selection of member port from bond. By default this new action is disabled, however it can be enabled by settingother-config:lb-output-actionin thePorttable. Obsessed with a glow-up like this ๐.
Connection-Tracking Capabilities ๐ธ
These capabilities are granular because Open vSwitch and its datapaths added support for connection tracking over several releases, with features added individually over that time. It's givingโฆ incremental rollout energy.
capabilities : ct_stateโ optional string, eithertrueorfalse. If true, datapath supportsOVS_KEY_ATTR_CT_STATE, which indicates support for the bits in the OpenFlowct_statefield (seeovs-fields(7)) other thansnatanddnat, which have a separate capability. If this is false, the datapath does not support connection-tracking at all and the remaining connection-tracking capabilities should all be false. In that case, Open vSwitch will reject flows that match on thect_statefield or use thectaction. Yeah โ rejected, no notes ๐ญ.capabilities : ct_state_natโ optional string, eithertrueorfalse. If true, it means that the datapath supports thesnatanddnatflags in the OpenFlowct_statefield. Thect_statecapability must be true for this to make sense. If false, Open vSwitch will reject flows that match on thesnatordnatbits inct_stateor usenatin thectaction.capabilities : ct_zoneโ optional string, eithertrueorfalse. If true, datapath supportsOVS_KEY_ATTR_CT_ZONE. If false, Open vSwitch rejects flows that match on thect_zonefield or that specify a nonzero zone or azonefield on thectaction.capabilities : ct_markโ optional string, eithertrueorfalse. If true, datapath supportsOVS_KEY_ATTR_CT_MARK. If false, Open vSwitch rejects flows that match on thect_markfield or that setct_markin thectaction.capabilities : ct_labelโ optional string, eithertrueorfalse. If true, datapath supportsOVS_KEY_ATTR_CT_LABEL. If false, Open vSwitch rejects flows that match on thect_labelfield or that setct_labelin thectaction.capabilities : ct_orig_tupleโ optional string, eithertrueorfalse. If true, the datapath supports matching the 5-tuple from the connection's original direction for IPv4 traffic. If false, Open vSwitch rejects flows that match onct_nw_srcorct_nw_dst, that use thectfeature of theresubmitaction, or theforcekeyword in thectaction. (And like, the latter isn't tied to connection tracking support of original tuples in any technical way โ they're conflated because all current datapaths implemented the two features at the same time. Messy of them, but okay.) If this andcapabilities:ct_orig_tuple6are both false, Open vSwitch rejects flows that match onct_nw_proto,ct_tp_src, orct_tp_dst.capabilities : ct_orig_tuple6โ optional string, eithertrueorfalse. If true, the datapath supports matching the 5-tuple from the connection's original direction for IPv6 traffic. If false, Open vSwitch rejects flows that match onct_ipv6_srcorct_ipv6_dst.capabilities : masked_set_actionโ optional string, eithertrueorfalse. True if the datapath supports masked data inOVS_ACTION_ATTR_SETactions. Masked data can improve performance by allowing megaflows to match on fewer fields. Fewer fields = faster, and we love that ๐ .capabilities : tnl_push_popโ optional string, eithertrueorfalse. True if the datapath supportstnl_pushandpopactions. This is a prerequisite for a datapath to support native tunneling. Prereq, not a suggestion, bestie.capabilities : ufidโ optional string, eithertrueorfalse. True if the datapath supportsOVS_FLOW_ATTR_UFID. UFID support improves revalidation performance by transferring less data between the slow path and the datapath. Less data shuffling = chef's kiss ๐.capabilities : truncโ optional string, eithertrueorfalse. True if the datapath supportsOVS_ACTION_ATTR_TRUNCaction. If false, the output action with packet truncation requires every packet to be sent to the Open vSwitch slow path, which is likely to make it too slow for mirroring traffic in bulk. Likeโฆ good luck with that ๐ญ.capabilities : nd_extโ optional string, eithertrueorfalse. True if the datapath supportsOVS_KEY_ATTR_ND_EXTENSIONSto match on ICMPv6 "ND reserved" and "ND option type" header fields. If false, the datapath reports error if the feature is used.
Clone Actions ๐
Okay so when Open vSwitch translates actions from OpenFlow into the datapath representation, some of the datapath actions may modify the packet or have other side effects that later datapath actions can't undo. The OpenFlow ct, meter, output with truncation, encap, decap, and dec_nsh_ttl actions all fall into this category. Often, this is not a problem because nothing later on needs the original packet. No harm, no foul.
Such actions can, however, occur in circumstances where the translation does require the original packet. Example time: an OpenFlow output action might direct a packet to a patch port, which might in turn lead to a ct action that NATs the packet (which cannot be undone), and then afterward when control flow pops back across the patch port, some other action might need to act on the original packet. Oop ๐.
Open vSwitch has two different ways to implement this ``save and restore'' via datapath actions. These capabilities indicate which one Open vSwitch will choose. When neither is available, Open vSwitch simply fails in situations that require this feature. Periodt.
capabilities : cloneโ optional string, eithertrueorfalse. True if the datapath supportsOVS_ACTION_ATTR_CLONEaction. This is the preferred option for saving and restoring packets, since it is intended for the purpose โ but old datapaths do not support it. Open vSwitch will use it whenever it is available. (Side note: the OpenFlowcloneaction does not always yield aOVS_ACTION_ATTR_CLONEaction. It only does so when the datapath supports it and theclonebrackets actions that otherwise cannot be undone. Context matters, bestie.)capabilities : sample_nestingโ optional string, containing an integer, at least0. Maximum level of nesting allowed byOVS_ACTION_ATTR_SAMPLEaction. Open vSwitch misuses this action for saving and restoring packets when the datapath supports more than3levels of nesting andOVS_ACTION_ATTR_CLONEis not available. Living dangerously, but make it work ๐โจ.
Last batch of datapath capability flags, bestie โ these are the little true/false receipts ๐งพ:
capabilities : ct_eventmaskโ optional string, eithertrueorfalse. This istruewhen the datapathโsOVS_ACTION_ATTR_CTaction implements theOVS_CT_ATTR_EVENTMASKattribute. When itโstrue, Open vSwitch uses the event mask feature to limit the kinds of events reported to conntrack update listeners. When Open vSwitch doesnโt limit the event mask, listeners receive reports of numerous usually unimportant events, such as TCP state machine changes, which can waste CPU time. ๐ญcapabilities : ct_clearโ optional string, eithertrueorfalse.trueif the datapath supports theOVS_ACTION_ATTR_CT_CLEARaction. If itโsfalse, the OpenFlowct_clearaction has no effect on the datapath โ literally nothing happens ๐ .capabilities : max_hash_algโ optional string, containing an integer, at least0. Highest supporteddp_hashalgorithm. This lets Open vSwitch avoid requesting a packet hash that the datapath does not support.capabilities : check_pkt_lenโ optional string, eithertrueorfalse.trueif the datapath supportsOVS_ACTION_ATTR_CHECK_PKT_LEN. If itโsfalse, Open vSwitch implements thecheck_pkt_largeraction by sending every packet through the Open vSwitch slow path, which is likely to make it too slow for handling traffic in bulk โ yikes, bulk traffic no cap ๐ญ.capabilities : ct_timeoutโ optional string, eithertrueorfalse.trueif the datapath supportsOVS_CT_ATTR_TIMEOUTin theOVS_ACTION_ATTR_CTaction. If itโsfalse, Open vSwitch cannot implement timeout policies based on connection tracking zones, as configured through theCT_Timeout_Policytable.capabilities : explicit_drop_actionโ optional string, eithertrueorfalse.trueif the datapath supportsOVS_ACTION_ATTR_DROP. If itโsfalse, explicit drop action will not be sent to the datapath.capabilities : ct_zero_snatโ optional string, eithertrueorfalse.trueif the datapath supports all-zero SNAT. This is a special case if the src IP address is configured as all 0โs, i.e.,nat(src=0.0.0.0). In this case, when a source port collision is detected during the commit, the source port will be translated to an ephemeral port. If there is no collision, no SNAT is performed.capabilities : ct_flushโ optional string, eithertrueorfalse.trueif the datapath supports CT flush OpenFlow Nicira extension calledNXT_CT_FLUSH. TheNXT_CT_FLUSHextensions allows to flush CT entries based on specified parameters.capabilities : psampleโ optional string, eithertrueorfalse.trueif the datapath supportsOVS_ACTION_ATTR_PSAMPLE. If itโsfalse, local sampling will not be supported with the Linux kernel datapath.ct_zone_default_limitโ optional integer, in range0to4,294,967,295. Default connection tracking zone limit that is applied to all zones that didnโt specify the limit explicitly. If the limit is unspecified, the default limit configuration for the datapath is left intact. The value0means unlimited.
๐ซถ Common Columns ๐ซถ
The overall purpose of these columns is described under Common Columns at the beginning of this document. Yes, the classic โgo read the topโ moment ๐
external_idsโ map of string-string pairs
๐ CT_Zone TABLE ๐
Connection tracking zone configuration โ like the zoneโs whole personality sheet ๐
๐ธ Summary ๐ธ
timeout_policyโ optionalCT_Timeout_Policylimitโ optional integer, in range0to4,294,967,295- Common Columns:
external_idsโ map of string-string pairs
๐ Details ๐
timeout_policyโ optionalCT_Timeout_Policy. Connection tracking timeout policy for this zone. If a timeout policy is not specified, it defaults to the timeout policy in the system.limitโ optional integer, in range0to4,294,967,295. Connection tracking limit for this zone. If the limit is unspecified thect_zone_default_limitwill be used. The value0means unlimited.
๐ Common Columns ๐
The overall purpose of these columns is described under Common Columns at the beginning of this document. ๐ซ
external_idsโ map of string-string pairs
๐ CT_Timeout_Policy TABLE ๐
Connection tracking timeout policy configuration โ like, the whole vibe of how long conntrack keeps a flow alive before it ghosts it ๐
โจ Summary โจ
โฐ Timeouts:
timeoutsโ map of string-integer pairs, key one oficmp_first,icmp_reply,tcp_close,tcp_close_wait,tcp_established,tcp_fin_wait,tcp_last_ack,tcp_retransmit,tcp_syn_recv,tcp_syn_sent2,tcp_syn_sent,tcp_time_wait,tcp_unack,udp_first,udp_multiple, orudp_single, value in range0to4,294,967,295
๐ข TCP Timeouts:
timeouts : tcp_syn_sentโ optional integer, in range0to4,294,967,295timeouts : tcp_syn_recvโ optional integer, in range0to4,294,967,295timeouts : tcp_establishedโ optional integer, in range0to4,294,967,295timeouts : tcp_fin_waitโ optional integer, in range0to4,294,967,295timeouts : tcp_close_waitโ optional integer, in range0to4,294,967,295timeouts : tcp_last_ackโ optional integer, in range0to4,294,967,295timeouts : tcp_time_waitโ optional integer, in range0to4,294,967,295timeouts : tcp_closeโ optional integer, in range0to4,294,967,295timeouts : tcp_syn_sent2โ optional integer, in range0to4,294,967,295timeouts : tcp_retransmitโ optional integer, in range0to4,294,967,295timeouts : tcp_unackโ optional integer, in range0to4,294,967,295
๐ธ UDP Timeouts:
timeouts : udp_firstโ optional integer, in range0to4,294,967,295timeouts : udp_singleโ optional integer, in range0to4,294,967,295timeouts : udp_multipleโ optional integer, in range0to4,294,967,295
๐ก ICMP Timeouts:
timeouts : icmp_firstโ optional integer, in range0to4,294,967,295timeouts : icmp_replyโ optional integer, in range0to4,294,967,295
๐ซถ Common Columns:
external_idsโ map of string-string pairs
๐ Details ๐
โฐ Timeouts:
timeouts: map of string-integer pairs, key one of icmp_first, icmp_reply, tcp_close, tcp_close_wait, tcp_established, tcp_fin_wait, tcp_last_ack, tcp_retransmit, tcp_syn_recv, tcp_syn_sent2, tcp_syn_sent, tcp_time_wait, tcp_unack, udp_first, udp_multiple, or udp_single, value in range 0 to 4,294,967,295
Okay so the timeouts column is literally just key-value pairs that configure connection tracking timeouts in a datapath. Big main-character energy ๐. Here's the tea: any key-value pairs a datapath doesn't support? Straight-up ignored, no drama, they just get ghosted. And the timeout value is in seconds โฑ๏ธ.
๐ข TCP Timeouts:
timeouts : tcp_syn_sent: optional integer, in range 0 to 4,294,967,295 The timeout for the connection after the first TCP SYN packet has been seen by conntrack. First contact energy โจ.
timeouts : tcp_syn_recv: optional integer, in range 0 to 4,294,967,295 The timeout of the connection after the first TCP SYN-ACK packet has been seen by conntrack. They replied, slay ๐
.
timeouts : tcp_established: optional integer, in range 0 to 4,294,967,295 The timeout of the connection after the connection has been fully established. Fully committed, no situationship ๐.
timeouts : tcp_fin_wait: optional integer, in range 0 to 4,294,967,295 The timeout of the connection after the first TCP FIN packet has been seen by conntrack. It's giving "we need to talk" ๐ฆ.
timeouts : tcp_close_wait: optional integer, in range 0 to 4,294,967,295 The timeout of the connection after the first TCP ACK packet has been seen after it receives TCP FIN packet. Heads up though โ this timeout is only supported by the Linux kernel datapath ๐ซถ.
timeouts : tcp_last_ack: optional integer, in range 0 to 4,294,967,295 The timeout of the connection after TCP FIN packets have been seen by conntrack from both directions. Mutual breakup fr fr. Also: this timeout is only supported by the Linux kernel datapath.
timeouts : tcp_time_wait: optional integer, in range 0 to 4,294,967,295 The timeout of the connection after conntrack has seen the TCP ACK packet for the second TCP FIN packet. Closure achieved ๐ธ.
timeouts : tcp_close: optional integer, in range 0 to 4,294,967,295 The timeout of the connection after the first TCP RST packet has been seen by conntrack. Abrupt exit, no goodbye ๐ญ.
timeouts : tcp_syn_sent2: optional integer, in range 0 to 4,294,967,295 The timeout of the connection when only a TCP SYN packet has been seen by conntrack from both directions (simultaneous open). Both people texting first at the exact same time, iconic ๐ฅ. This timeout is only supported by the Linux kernel datapath.
timeouts : tcp_retransmit: optional integer, in range 0 to 4,294,967,295 The timeout of the connection when it exceeds the maximum number of retransmissions. Left on delivered too many times ๐. This timeout is only supported by the Linux kernel datapath.
timeouts : tcp_unack: optional integer, in range 0 to 4,294,967,295 The timeout of the connection when non-SYN packets create an established connection in TCP loose tracking mode. Sneaky lil shortcut, iykyk ๐. This timeout is only supported by the Linux kernel datapath.
๐ธ UDP Timeouts:
timeouts : udp_first: optional integer, in range 0 to 4,294,967,295 The timeout of the connection after the first UDP packet has been seen by conntrack. Note bestie โ this timeout is only supported by the userspace datapath ๐ง.
timeouts : udp_single: optional integer, in range 0 to 4,294,967,295 The timeout of the connection when conntrack only seen UDP packet from the source host, but the destination host has never sent one back. Left on read ๐.
timeouts : udp_multiple: optional integer, in range 0 to 4,294,967,295 The timeout of the connection when UDP packets have been seen in both directions. Two-way conversation, we love to see it ๐.
๐ก ICMP Timeouts:
timeouts : icmp_first: optional integer, in range 0 to 4,294,967,295 The timeout of the connection after the first ICMP packet has been seen by conntrack. Ping! It's me ๐ซถ.
timeouts : icmp_reply: optional integer, in range 0 to 4,294,967,295 The timeout of the connection when ICMP packets have been seen in both direction. And this one is only supported by the userspace datapath โจ.
๐ซถ Common Columns:
The overall purpose of these columns is described under Common Columns at the beginning of this document. (Yeah, that part, go look ๐.)
external_ids: map of string-string pairs
๐ SSL TABLE ๐
SSL/TLS configuration for an Open_vSwitch. Lock it down, bestie ๐๐
โจ Summary โจ
private_keyโ stringcertificateโ stringca_certโ stringbootstrap_ca_certโ boolean- Common Columns:
external_idsโ map of string-string pairs
๐ Details ๐
private_key: string Name of a PEM file containing the private key used as the switch's identity for SSL/TLS connections to the controller. It's the switch's little secret, don't share ๐คซ.
certificate: string Name of a PEM file containing a certificate, signed by the certificate authority (CA) used by the controller and manager, that certifies the switch's private key, identifying a trustworthy switch. Proof of identity, no catfishing ๐.
ca_cert: string Name of a PEM file containing the CA certificate used to verify that the switch is connected to a trustworthy controller. Vet your connections before you commit ๐.
bootstrap_ca_cert: boolean If set to true, then Open vSwitch will attempt to obtain the CA certificate from the controller on its first SSL/TLS connection and save it to the named PEM file. If it is successful, it will immediately drop the connection and reconnect, and from then on all SSL/TLS connections must be authenticated by a certificate signed by the CA certificate thus obtained.
โ ๏ธ Okay so listen โ this option exposes the SSL/TLS connection to a man-in-the-middle attack obtaining the initial CA certificate. It may still be useful for bootstrapping. Cute for setup, sketchy for forever, proceed with awareness ๐.
๐ซถ Common Columns:
The overall purpose of these columns is described under Common Columns at the beginning of this document.
external_ids: map of string-string pairs
๐ฆ sFlow TABLE ๐ฆ
A set of sFlow(R) targets. sFlow is a protocol for remote monitoring of switches. It's basically the switch's fitness tracker, tracking everything ๐
โจ Summary โจ
agentโ optional stringheaderโ optional integerpollingโ optional integersamplingโ optional integertargetsโ set of 1 or more strings- Common Columns:
external_idsโ map of string-string pairs
๐ Details ๐
agent: optional string Determines the agent address, that is, the IP address reported to collectors as the source of the sFlow data. It may be an IP address or the name of a network device. In the latter case, the network device's IP address is used,
If not specified, the agent device is figured from the first target address and the routing table. If the routing table does not contain a route to the target, the IP address defaults to the local_ip in the collector's Controller.
If an agent IP address cannot be determined, sFlow is disabled. No address, no vibes ๐ญ.
header: optional integer Number of bytes of a sampled packet to send to the collector. If not specified, the default is 128 bytes. Just a lil snippet ๐.
polling: optional integer Polling rate in seconds to send port statistics to the collector. If not specified, defaults to 30 seconds. Check in every thirty, cute ๐ธ.
sampling: optional integer Rate at which packets should be sampled and sent to the collector. If not specified, defaults to 400, which means one out of 400 packets, on average, will be sent to the collector. Not all of them make the cut, and that's on periodt ๐ฅ.
targets: set of 1 or more strings sFlow targets in the form ip:port. Where the tea gets sent ๐ฌ.
๐ซถ Common Columns:
The overall purpose of these columns is described under Common Columns at the beginning of this document.
external_ids: map of string-string pairs
๐ IPFIX TABLE ๐
Okay bestie, this table is literally the config for sending packets to IPFIX collectors, and it's giving main character energy. ๐
So IPFIX is a protocol that exports a bunch of details about flows. The IPFIX implementation in Open vSwitch samples packets at a configurable rate, extracts flow information from those packets, optionally caches and aggregates the flow information, and sends the result to one or more collectors. Slay. โจ
IPFIX in Open vSwitch can be configured two different ways:
- With per-bridge sampling, Open vSwitch performs IPFIX sampling automatically on all packets that pass through a bridge. To configure per-bridge sampling, create an
IPFIXrecord and point aBridgetableโsipfixcolumn to it. TheFlow_Sample_Collector_Settable is not used for per-bridge sampling. - With flow-based sampling,
sampleactions in the OpenFlow flow table drive IPFIX sampling. Seeovs-actions(7)for a description of thesampleaction.
Flow-based sampling also requires database configuration: create an IPFIX record that describes the IPFIX configuration and a Flow_Sample_Collector_Set record that points to the Bridge whose flow table holds the sample actions and to IPFIX record. The ipfix in the Bridge table is not used for flow-based sampling.
โจ Summary โจ
targetsโ set of stringscache_active_timeoutโ optional integer, in range0to4,200cache_max_flowsโ optional integer, in range0to4,294,967,295stats_intervalโ optional integer, in range1to3,600template_intervalโ optional integer, in range1to3,600other_config : enable-tunnel-samplingโ optional string, eithertrueorfalseother_config : virtual_obs_idโ optional string- Per-Bridge Sampling:
samplingโ optional integer, in range1to4,294,967,295obs_domain_idโ optional integer, in range0to4,294,967,295obs_point_idโ optional integer, in range0to4,294,967,295other_config : enable-input-samplingโ optional string, eithertrueorfalseother_config : enable-output-samplingโ optional string, eithertrueorfalse
- Common Columns:
external_idsโ map of string-string pairs
๐ Details ๐
targetsโ set of strings. IPFIX target collectors in the formip:port.cache_active_timeoutโ optional integer, in range0to4,200. The maximum period in seconds for which an IPFIX flow record is cached and aggregated before being sent. If not specified, defaults to0. If0, caching is disabled.cache_max_flowsโ optional integer, in range0to4,294,967,295. The maximum number of IPFIX flow records that can be cached at a time. If not specified, defaults to0. If0, caching is disabled.stats_intervalโ optional integer, in range1to3,600. Interval (in seconds) for sending IPFIX exporting process statistics according toIETF RFC 5101 Section 4.3. Default value is600.template_intervalโ optional integer, in range1to3,600. Interval (in seconds) for sending IPFIX Template information for each Observation Domain ID. Default value is600.other_config : enable-tunnel-samplingโ optional string, eithertrueorfalse. Set totrueto enable sampling and reporting tunnel header 7-tuples in IPFIX flow records. Tunnel sampling is enabled by default. The following enterprise entities report the sampled tunnel info:tunnelType:- ID:
891, and enterprise ID6876(VMware). - type:
unsigned 8-bit integer. - data type semantics:
identifier. - description: Identifier of the layer 2 network overlay network encapsulation type:
0x01 VxLAN,0x02 GRE,0x07 GENEVE.
- ID:
tunnelKey:- ID:
892, and enterprise ID6876(VMware). - type:
variable-length octetarray. - data type semantics:
identifier. - description: Key which is used for identifying an individual traffic flow within a VxLAN (
24-bit VNI), GENEVE (24-bit VNI), or GRE (32-bit key) tunnel. The key is encoded in this octetarray as a3- or 4-byte integer IDinnetwork byte order.
- ID:
tunnelSourceIPv4Address:- ID:
893, and enterprise ID6876(VMware). - type:
unsigned 32-bit integer. - data type semantics:
identifier. - description: The IPv4 source address in the tunnel IP packet header.
- ID:
tunnelDestinationIPv4Address:- ID:
894, and enterprise ID6876(VMware). - type:
unsigned 32-bit integer. - data type semantics:
identifier. - description: The IPv4 destination address in the tunnel IP packet header.
- ID:
tunnelProtocolIdentifier:- ID:
895, and enterprise ID6876(VMware). - type:
unsigned 8-bit integer. - data type semantics:
identifier. - description: The value of the protocol number in the tunnel IP packet header. The protocol number identifies the tunnel IP packet payload type.
- ID:
tunnelSourceTransportPort:- ID:
896, and enterprise ID6876(VMware). - type:
unsigned 16-bit integer. - data type semantics:
identifier. - description: The source port identifier in the tunnel transport header. For the transport protocols UDP, TCP, and SCTP, this is the source port number given in the respective header.
- ID:
tunnelDestinationTransportPort:- ID:
897, and enterprise ID6876(VMware). - type:
unsigned 16-bit integer. - data type semantics:
identifier. - description: The destination port identifier in the tunnel transport header. For the transport protocols UDP, TCP, and SCTP, this is the destination port number given in the respective header.
- ID:
Before Open vSwitch 2.5.90, other_config:enable-tunnel-sampling was only supported with per-bridge sampling, and ignored otherwise. Open vSwitch 2.5.90 and later support other_config:enable-tunnel-sampling for per-bridge and per-flow sampling.
other_config : virtual_obs_idโ optional string. A string that accompanies each IPFIX flow record. Its intended use is for the โvirtual observation ID,โ an identifier of a virtual observation point that is locally unique in a virtual network. It describes a location in the virtual network where IP packets can be observed. The maximum length is254bytes. If not specified, the field is omitted from the IPFIX flow record. The following enterprise entity reports the specified virtual observation ID:virtualObsID:- ID:
898, and enterprise ID6876(VMware). - type:
variable-length string. - data type semantics:
identifier. - description: A virtual observation domain ID that is locally unique in a virtual network. This feature was introduced in Open vSwitch
2.5.90.
- ID:
๐ธ Per-Bridge Sampling ๐ธ
These values affect only per-bridge sampling. See above for a description of the differences between per-bridge and flow-based sampling.
samplingโ optional integer, in range1to4,294,967,295. The rate at which packets should be sampled and sent to each target collector. If not specified, defaults to400, which means one out of400packets, on average, will be sent to each target collector.obs_domain_idโ optional integer, in range0to4,294,967,295. The IPFIX Observation Domain ID sent in each IPFIX packet. If not specified, defaults to0.obs_point_idโ optional integer, in range0to4,294,967,295. The IPFIX Observation Point ID sent in each IPFIX flow record. If not specified, defaults to0.other_config : enable-input-samplingโ optional string, eithertrueorfalse. By default, Open vSwitch samples and reports flows at bridge port input in IPFIX flow records. Set this column tofalseto disable input sampling.other_config : enable-output-samplingโ optional string, eithertrueorfalse. By default, Open vSwitch samples and reports flows at bridge port output in IPFIX flow records. Set this column tofalseto disable output sampling.
๐ซถ Common Columns ๐ซถ
The overall purpose of these columns is described under Common Columns at the beginning of this document.
external_idsโ map of string-string pairs.
โจ Flow_Sample_Collector_Set TABLE โจ
okay so this one is literally the collection squad for packet samples ๐ โ it's the set of IPFIX or local sampling collectors that catch the packet samples your OpenFlow sample actions yeet out into the world.
If the column ipfix contains a reference to a valid IPFIX entry, those samples get emitted via IPFIX. That glow-up is known as flow-based IPFIX sampling, and it's a whole different vibe from bridge-based sampling (go peek at the IPFIX table for the rundown on those two forms, iykyk ๐ฆ).
If the column local_group_id contains an integer and the running datapath supports local sample emission, packets get sent to some local sample collector. Those samples lowkey carry so much info: the group number specified by local_group_id (which helps identify their source, periodt) plus a 64-bit cookie that results from the concatenation of the observation_domain_id and the observation_point_id in network byte order. The way the sample is emitted and made available for local collectors is datapath-specific, ngl. Currently only the Linux kernel datapath supports local sampling, and it's implemented by sending the packet to the psample netlink multicast group ๐ธ.
Note: bothlocal_group_idandipfixcan be configured simultaneously. slay, no either/or drama ๐
Summary ๐
idโ integer, in range 0 to 4,294,967,295bridgeโ Bridgeipfixโ optional IPFIXlocal_group_idโ optional integer, in range 0 to 4,294,967,295- Common Columns:
external_idsโ map of string-string pairs
Details ๐
id: integer, in range 0 to 4,294,967,295 โ the ID of this collector set, unique among the bridge's collector sets, and it's the one used as thecollector_set_idin OpenFlow sample actions ๐bridge: Bridge โ the bridge where you can add OpenFlow sample actions to send packet samples to this set of IPFIX collectors ๐ซถipfix: optional IPFIX โ the config for the set of IPFIX collectors to send one flow record per sampled packet to โญlocal_group_id: optional integer, in range 0 to 4,294,967,295 โ the config for the sample group id to be used in local sampling ๐
Common Columns ๐ซ
The overall purpose of these columns is described under Common Columns at the beginning of this document โ go check it, bestie, it's all laid out there ๐
external_ids: map of string-string pairs
๐ AutoAttach TABLE ๐
This is the Auto Attach configuration within a bridge, and honestly the lore here is a lot ๐ฅ. The IETF Auto-Attach SPBM draft standard describes a compact method of using IEEE 802.1AB Link Layer Discovery Protocol (LLDP) together with a IEEE 802.1aq Shortest Path Bridging (SPB) network to automatically attach network devices to individual services in a SPB network. The intent here is to allow network applications and devices using OVS to be able to easily take advantage of features offered by industry standard SPB networks. it's giving teamwork, fr fr ๐ค
Auto Attach (AA) uses LLDP to communicate between a directly connected Auto Attach Client (AAC) and Auto Attach Server (AAS). The LLDP protocol is extended to add two new Type-Length-Value tuples (TLVs). The first new TLV supports the ongoing discovery of directly connected AA correspondents. Auto Attach operates by regularly transmitting AA discovery TLVs between the AA client and AA server. By exchanging these discovery messages, both the AAC and AAS learn the system name and system description of their peer โ besties getting to know each other ๐. In the OVS context, OVS operates as the AA client and the AA server resides on a switch at the edge of the SPB network.
Once AA discovery has been completed, the AAC then uses the second new TLV to deliver identifier mappings from the AAC to the AAS. A primary feature of Auto Attach is to facilitate the mapping of VLANs defined outside the SPB network onto service ids (ISIDs) defined within the SPM network. By doing so individual external VLANs can be mapped onto specific SPB network services. These VLAN id to ISID mappings can be configured and managed locally using new options added to the ovs-vsctl command. iconic behavior, honestly ๐
The Auto Attach OVS feature does not provide a full implementation of the LLDP protocol ๐ซ . Support for the mandatory TLVs as defined by the LLDP standard and support for the AA TLV extensions is provided. LLDP protocol support in OVS can be enabled or disabled on a port by port basis. LLDP support is disabled by default โ yeah, she's off until you say go, no cap โญ
Summary ๐
system_nameโ stringsystem_descriptionโ stringmappingsโ map of integer-integer pairs, key in range 0 to 16,777,215, value in range 0 to 4,095
Details ๐
system_name: string โ thesystem_namestring is exported in LLDP messages. It should uniquely identify the bridge in the network, like a little name tag at the party ๐ท๏ธโจsystem_description: string โ thesystem_descriptionstring is exported in LLDP messages. It should describe the type of software and hardware ๐ฅ๏ธ๐mappings: map of integer-integer pairs, key in range 0 to 16,777,215, value in range 0 to 4,095 โ a mapping from SPB network Individual Service Identifier (ISID) to VLAN id ๐ธ
and that's a wrap on the whole schema, bestie ๐ญ๐ you literally made it to the end, main character energy only ๐
Open vSwitch 4.0.0 ยท DB Schema 8.8.0 ยท ovs-vswitchd.conf.db(5) โ mwah, go touch some grass and then go configure a bridge, ily ๐๐ฆ๐
๐ฆ where this page comes from
- arch rolling: openvswitch 4.0.0-1 ยท Apache-2.0
- nixpkgs unstable: openvswitch 4.0.0
- nixpkgs unstable: openvswitch-dpdk 4.0.0
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms