vtep(5)
โจ NAME โจ
okay so bestie, this is vtep(5), and it's literally the hardware_vtep database schema manual. No cap, it's giving โhow a VTEP plugs physical ports into logical switches managed by a network virtualization controller such as NSX.โ ๐ซถ
The schema specifies relations that a VTEP can use to integrate physical ports into logical switches maintained by a network virtualization controller such as NSX. Periodt.
๐ซถ Common Column ๐ซถ
Glossary time, because acronyms are iconic but also lowkey a lot:
- VTEP โ VXLAN Tunnel End Point, an entity which originates and/or terminates VXLAN tunnels. ๐ฆ
- HSC โ Hardware Switch Controller.
- NVC โ Network Virtualization Controller, e.g. NSX.
- VRF โ Virtual Routing and Forwarding instance.
Some tables contain a column named other_config. This column has the same form and purpose each place that it appears, so we describe it here to save space later. Efficient queen behavior. ๐
other_config: map of string-string pairs โ key-value pairs for configuring rarely used or proprietary features.
Some tables do not have other_config column because no key-value pairs have yet been defined for them.
๐งพ TABLE SUMMARY ๐งพ
The following list summarizes the purpose of each of the tables in the hardware_vtep database. Each table is described in more detail on a later page. Here's the whole cast, main-character energy included: โจ
Globalโ Top-level configuration.Managerโ OVSDB management connection.Physical_Switchโ A physical switch.Tunnelโ A tunnel created by a physical switch.Physical_Portโ A port within a physical switch.Logical_Binding_Statsโ Statistics for a VLAN on a physical port bound to a logical network.Logical_Switchโ A layer-2 domain.Ucast_Macs_Localโ Unicast MACs (local)Ucast_Macs_Remoteโ Unicast MACs (remote)Mcast_Macs_Localโ Multicast MACs (local)Mcast_Macs_Remoteโ Multicast MACs (remote)Logical_Routerโ A logical L3 router.Arp_Sources_Localโ ARP source addresses for logical routersArp_Sources_Remoteโ ARP source addresses for logical routersPhysical_Locator_SetโPhysical_Locator_Setconfiguration.Physical_LocatorโPhysical_Locatorconfiguration.ACL_entryโACL_entryconfiguration.ACLโACLconfiguration.
๐ Global TABLE ๐
Top-level configuration for a hardware VTEP. There must be exactly one record in the Global table. One. Single. Record. No cap. ๐
๐ธ Summary ๐ธ
switchesโ set ofPhysical_Switchs- Database Configuration:
managersโ set ofManagers
- Common Column:
other_configโ map of string-string pairs
๐ Details ๐
switches: set ofPhysical_Switchsโ The physical switch or switches managed by the VTEP.
When a physical switch integrates support for this VTEP schema, which is expected to be the most common case, this column should point to one Physical_Switch record that represents the switch itself. In another possible implementation, a server or a VM presents a VTEP schema front-end interface to one or more physical switches, presumably communicating with those physical switches over a proprietary protocol. In that case, this column would point to one Physical_Switch for each physical switch, and the set might change over time as the front-end server comes to represent a differing set of switches. The way that's a whole stable-relationship arc ๐ญ
๐๏ธ Database Configuration ๐๏ธ
These columns primarily configure the database server (ovsdb-server), not the hardware VTEP itself. Important distinction, bestie. ๐ซถ
managers: set ofManagersโ Database clients to which the database server should connect or to which it should listen, along with options for how these connection should be configured. See theManagertable for more information.
๐ซถ Common Column ๐ซถ
The overall purpose of this column is described under Common Column at the beginning of this document.
other_config: map of string-string pairs
๐ฐ๏ธ Manager TABLE ๐ฐ๏ธ
Configuration for a database connection to an Open vSwitch Database (OVSDB) client. It's giving โconnection manager but make it database-core.โ ๐
The 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)
- Client Failure Detection and Handling:
max_backoffโ optional integer, at least 1,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 least 0status : sec_since_disconnectโ optional string, containing an integer, at least 0status : locks_heldโ optional stringstatus : locks_waitingโ optional stringstatus : locks_lostโ optional stringstatus : n_connectionsโ optional string, containing an integer, at least 2
- Connection Parameters:
other_config : dscpโ optional string, containing an integer
๐ 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 (default: 6640) on the given host, which can either be a DNS name (if built with unbound library) or an IP address. SSL/TLS key and certificate configuration happens outside the database. ๐tcp:host[:port]โ The specified TCP port (default: 6640) on the given host, which can either be a DNS name (if built with unbound library) or an IP address.pssl:[port][:host]โ Listens for SSL/TLS connections on the specified TCP port (default: 6640). If host, 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.ptcp:[port][:host]โ Listens for connections on the specified TCP port (default: 6640). If host, 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.
๐ฉบ Client 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. The patience is real. ๐ญinactivity_probe: optional integer โ Maximum number of milliseconds of idle time on connection to the client before sending an inactivity probe message. If the Open vSwitch database 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, the database server assumes the connection has been broken and attempts to reconnect. Default is implementation-specific. A value of0disables inactivity probes.
๐ Status ๐
is_connected: boolean โ true if currently connected to this manager, false otherwise.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. So don't build your whole personality on them, bestie.
status : sec_since_connect: optional string, containing an integer, at least 0 โ 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 least 0 โ 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. Rude, honestly. ๐status : n_connections: optional string, containing an integer, at least 2 โ When target specifies 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.
When multiple connections are active, status columns and key-value pairs (other than this one) report the status of one arbitrarily chosen connection.
๐ง Connection Parameters ๐ง
Additional configuration for a connection between the manager and the database server.
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 database server. If no value is specified, a default value of48is chosen. Valid DSCP values must be in the range0to63. Slay those packets with the right priority. ๐
๐ธ Physical_Switch TABLE ๐ธ
A physical switch that implements a VTEP. This table is literally the whole โthe box that does VTEP thingsโ vibe check, bestie. ๐ฆ
๐ Summary
portsโ set ofPhysical_Portstunnelsโ set ofTunnels- Network Status:
management_ipsโ set ofstringstunnel_ipsโ set ofstrings
- Identification:
nameโstring(must be unique within table)descriptionโstring
- Error Notification:
switch_fault_status : mac_table_exhaustionโnoneswitch_fault_status : tunnel_exhaustionโnoneswitch_fault_status : lr_switch_bindings_faultโnoneswitch_fault_status : lr_static_routes_faultโnoneswitch_fault_status : lr_creation_faultโnoneswitch_fault_status : lr_support_faultโnoneswitch_fault_status : unspecified_faultโnoneswitch_fault_status : unsupported_source_node_replicationโnone
- Common Column:
other_configโ map ofstring-stringpairs
๐ต๏ธโ๏ธ Details
ports: set ofPhysical_Portsโ the physical ports within the switch. Like, the actual holes and lanes where packets live their lives. ๐tunnels: set ofTunnelsโ tunnels created by this switch as instructed by the NVC. The switch is not freelancing here; NVC said jump, so it jumps. ๐ณ๏ธ
๐ Network Status
management_ips: set ofstringsโ IPv4 or IPv6 addresses at which the switch may be contacted for management purposes. Basically where you slide into its DMs for admin stuff. ๐ฌtunnel_ips: set ofstringsโ IPv4 or IPv6 addresses on which the switch may originate or terminate tunnels.
This column is intended to allow a Manager to determine the Physical_Switch that terminates the tunnel represented by a Physical_Locator. So yes, itโs giving โtunnel owner revealโ energy. ๐
๐ท๏ธ Identification
name:string(must be unique within table) โ symbolic name for the switch, such as its hostname. Unique means unique, bestie; no twin names in this table. ๐description:stringโ an extended description for the switch, such as its switch login banner. Put the lore here. ๐
๐จ Error Notification
An entry in this column indicates to the NVC that this switch has encountered a fault. The switch must clear this column when the fault has been cleared. No leaving stale fault receipts lying around, periodt. ๐
switch_fault_status : mac_table_exhaustionโnoneโ Indicates that the switch has been unable to process MAC entries requested by the NVC due to lack of table resources.switch_fault_status : tunnel_exhaustionโnoneโ Indicates that the switch has been unable to create tunnels requested by the NVC due to lack of resources.switch_fault_status : lr_switch_bindings_faultโnoneโ Indicates that the switch has been unable to create the logical router interfaces requested by the NVC due to conflicting configurations or a lack of hardware resources.switch_fault_status : lr_static_routes_faultโnoneโ Indicates that the switch has been unable to create the static routes requested by the NVC due to conflicting configurations or a lack of hardware resources.switch_fault_status : lr_creation_faultโnoneโ Indicates that the switch has been unable to create the logical router requested by the NVC due to conflicting configurations or a lack of hardware resources.switch_fault_status : lr_support_faultโnoneโ Indicates that the switch does not support logical routing. Not every switch has that range, and thatโs just facts. ๐switch_fault_status : unspecified_faultโnoneโ Indicates that an error has occurred in the switch but that no more specific information is available. The classic โsomething is wrong but make it mysteriousโ fault. ๐switch_fault_status : unsupported_source_node_replicationโnoneโ Indicates that the requested source node replication mode cannot be supported by the physical switch; this specifically means in this context that the physical switch lacks the capability to support source node replication mode. This error occurs when a controller attempts to set source node replication mode for one of the logical switches that the physical switch is keeping context for. An NVC that observes this error should take appropriate action (for example reverting the logical switch to service node replication mode). It is recommended that an NVC be proactive and test for support of source node replication by using a test logical switch on vtep physical switch nodes and then trying to change the replication mode to source node on this logical switch, checking for error. The NVC could remember this capability per vtep physical switch. Using mixed replication modes on a given logical switch is not recommended. Service node replication mode is considered a basic requirement since it only requires sending a packet to a single transport node, hence it is not expected that a switch should report that service node mode cannot be supported.
๐งฉ Common Column
The overall purpose of this column is described under Common Column at the beginning of this document. Go check the earlier glow-up if you need the full context, bestie. ๐ซถ
other_config: map ofstring-stringpairs
๐ Tunnel TABLE ๐
A tunnel created by a Physical_Switch. Basically a lil point-to-point situationship between switches, and we are obsessed ๐
Summary โจ
localโPhysical_LocatorremoteโPhysical_Locator- Bidirectional Forwarding Detection (BFD):
- BFD Local Configuration:
bfd_config_local : bfd_dst_macโ optional stringbfd_config_local : bfd_dst_ipโ optional string
- BFD Remote Configuration:
bfd_config_remote : bfd_dst_macโ optional stringbfd_config_remote : bfd_dst_ipโ optional string
- BFD Parameters:
bfd_params : enableโ optional string, eithertrueorfalsebfd_params : min_rxโ optional string, containing an integer, at least1bfd_params : min_txโ optional string, containing an integer, at least1bfd_params : decay_min_rxโ optional string, containing an integerbfd_params : forwarding_if_rxโ optional string, eithertrueorfalsebfd_params : cpath_downโ optional string, eithertrueorfalsebfd_params : check_tnl_keyโ optional string, eithertrueorfalse
- BFD Status:
bfd_status : enabledโ optional string, eithertrueorfalsebfd_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 : infoโ optional string
- BFD Local Configuration:
Details ๐ฆ
local:Physical_Locatorโ tunnel end-point local to the physical switch.remote:Physical_Locatorโ tunnel end-point remote to the physical switch.
Bidirectional Forwarding Detection (BFD) ๐
Okay so BFD, defined in RFC 5880, is the whole point-to-point connectivity-failure-detection moment. It works by occasionally transmitting BFD control messages, and VTEPs are expected to implement BFD. No cap.
BFD operates 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. An endpoint which fails to receive BFD control messages for a period of three times the expected reception rate will signal a connectivity fault. In the case of a unidirectional connectivity issue, the system not receiving BFD control messages will signal the problem to its peer in the messages it transmits.
A hardware VTEP is expected to use BFD to determine reachability of devices at the end of the tunnels with which it exchanges data. This can enable the VTEP to choose a functioning service node among a set of service nodes providing high availability. It also enables the NVC to report the health status of tunnels. Very main-character energy, honestly ๐
In many cases the BFD peer of a hardware VTEP will be an Open vSwitch instance. The Open vSwitch implementation of BFD aims to comply faithfully with the requirements put forth in RFC 5880. Open vSwitch does not implement the optional Authentication or ``Echo Modeโโ features.
BFD Local Configuration ๐
The HSC writes the key-value pairs in the bfd_config_local column to specify the local configurations to be used for BFD sessions on this tunnel.
bfd_config_local : bfd_dst_macโ optional string. Set to an Ethernet address in the formxx:xx:xx:xx:xx:xxto set the MAC expected as destination for received BFD packets. The default is00:23:20:00:00:01.bfd_config_local : bfd_dst_ipโ optional string. Set to an IPv4 address to set the IP address that is expected as destination for received BFD packets. The default is169.254.1.0.
BFD Remote Configuration ๐ธ
The bfd_config_remote column is the remote counterpart of the bfd_config_local column. The NVC writes the key-value pairs in this column.
bfd_config_remote : bfd_dst_macโ optional string. Set to an Ethernet address in the formxx:xx:xx:xx:xx:xxto set the destination MAC to be used for transmitted BFD packets. The default is00:23:20:00:00:01.bfd_config_remote : 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.1.
BFD Parameters โ๏ธ
The NVC sets up key-value pairs in the bfd_params column to enable and configure BFD.
bfd_params : enableโ optional string, eithertrueorfalse. True to enable BFD on this Tunnel. If not specified, BFD will not be enabled by default.bfd_params : min_rxโ optional string, containing an integer, at least1. 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_params : min_txโ optional string, containing an integer, at least1. 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 is not willing to receive as quickly as specified. Defaults to100.bfd_params : decay_min_rxโ optional string, containing an integer. An alternate receive interval, in milliseconds, that must be greater than or equal tobfd_params:min_rx. The implementation should switch frombfd_params:min_rxtobfd_params:decay_min_rxwhen there is no obvious incoming data traffic at the tunnel, to reduce the CPU and bandwidth cost of monitoring an idle tunnel. This feature may be disabled by setting a value of0. This feature is reset wheneverbfd_params:decay_min_rxorbfd_params:min_rxchanges.bfd_params : forwarding_if_rxโ optional string, eithertrueorfalse. When true, traffic received on the Tunnel 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_params:min_rxamount of time. Otherwise, even if traffic is received, thebfd_params:forwardingwill befalse.bfd_params : cpath_downโ optional string, eithertrueorfalse. Set to true to 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_params : check_tnl_keyโ optional string, eithertrueorfalse. Set to true to make BFD accept only control messages with a tunnel key of zero. By default, BFD accepts control messages with any tunnel key.
BFD Status ๐
The VTEP sets key-value pairs in the bfd_status column to report the status of BFD on this tunnel. When BFD is not enabled, with bfd_params:enable, the HSC clears all key-value pairs from bfd_status.
bfd_status : enabledโ optional string, eithertrueorfalse. Set to true if the BFD session has been successfully enabled. Set to false if the VTEP cannot support BFD or has insufficient resources to enable BFD on this tunnel. The NVC will disable the BFD monitoring on the other side of the tunnel once this value is set to false.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 Tunnel 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 : infoโ optional string. A short message providing further information about the BFD status (possibly including reasons why BFD could not be enabled).
Physical_Port TABLE ๐
okay bestie, this table is literally one port inside a Physical_Switch โ and itโs carrying so much VLAN/ACL lore. Letโs go column by column, no cap.
โจ Summary โจ
vlan_bindingsโ map of integer-Logical_Switchpairs, key in range0to4,095acl_bindingsโ map of integer-ACLpairs, key in range0to4,095vlan_statsโ map of integer-Logical_Binding_Statspairs, key in range0to4,095
๐ Identification
nameโstringdescriptionโstring
๐จ Error Notification
port_fault_status : invalid_vlan_mapโnoneport_fault_status : invalid_ACL_bindingโnoneport_fault_status : unspecified_faultโnone
๐ธ Common Column
other_configโ map of string-string pairs
๐ Details ๐
vlan_bindings: map of integer-Logical_Switchpairs, key in range0to4,095Identifies how VLANs on the physical port are bound to logical switches. So if the map contains a(VLAN, logical switch)pair, a packet that arrives on the port in the VLAN is considered to belong to the paired logical switch. A value of zero in the VLAN field means that untagged traffic on the physical port is mapped to the logical switch. Periodt. ๐ซถacl_bindings: map of integer-ACLpairs, key in range0to4,095Attach Access Control Lists (ACLs) to the physical port. The column is a map of VLAN tags to ACLs. If the value of the VLAN tag in the map is0, that means the ACL is associated with the entire physical port. Non-zero values mean that the ACL is applied only on packets carrying that VLAN tag value. Switches will not necessarily support matching on the VLAN tag for all ACLs, and unsupported ACL bindings will cause errors to be reported. Also: the binding of an ACL to a specific VLAN and the binding of an ACL to the entire physical port should not be combined on a single physical port. That is, a mix of zero and non-zero keys in the map is not recommended. ๐vlan_stats: map of integer-Logical_Binding_Statspairs, key in range0to4,095Statistics for VLANs bound to logical switches on the physical port. An implementation that fully supports such statistics would populate this column with a mapping for every VLAN that is bound invlan_bindings. An implementation that does not support such statistics or only partially supports them would not populate this column or partially populate it, respectively. A value of zero in the VLAN field refers to untagged traffic on the physical port. โจ
๐ Identification ๐
name:stringSymbolic name for the port. The name ought to be unique within a givenPhysical_Switch, but the database is not capable of enforcing this. iykyk. ๐description:stringAn extended description for the port.
๐ฅ Error Notification ๐ฅ
An entry in this column indicates to the NVC that the physical port has encountered a fault. The switch must clear this column when the error has been cleared.
port_fault_status : invalid_vlan_map:noneIndicates that a VLAN-to-logical-switch mapping requested by the controller could not be instantiated by the switch because of a conflict with local configuration.port_fault_status : invalid_ACL_binding:noneIndicates that an error has occurred in associating an ACL with a port.port_fault_status : unspecified_fault:noneIndicates that an error has occurred on the port but that no more specific information is available.
๐ฆ Common Column ๐ฆ
The overall purpose of this column is described under Common Column at the beginning of this document.
other_config: map of string-string pairs
Logical_Binding_Stats TABLE ๐
Reports statistics for the Logical_Switch with which a VLAN on a Physical_Port is associated. Itโs giving โreceipts for your binding.โ ๐งพโจ
๐ Summary ๐
๐ Statistics
packets_from_localโintegerbytes_from_localโintegerpackets_to_localโintegerbytes_to_localโinteger
๐ซ Details ๐ซ
๐ Statistics ๐
These statistics count only packets to which the binding applies.
packets_from_local:integerNumber of packets sent by thePhysical_Switch.bytes_from_local:integerNumber of bytes in packets sent by thePhysical_Switch.packets_to_local:integerNumber of packets received by thePhysical_Switch.bytes_to_local:integerNumber of bytes in packets received by thePhysical_Switch.
Logical_Switch TABLE ๐
A logical Ethernet switch, whose implementation may span physical and virtual media, possibly crossing L3 domains via tunnels; a logical layer-2 domain; an Ethernet broadcast domain. Main character energy fr fr. ๐
โจ Summary โจ
๐ธ Per Logical-Switch Tunnel Key
tunnel_keyโ optionalinteger
๐ Replication Mode
replication_modeโ optionalstring, eitherservice_nodeorsource_node
๐ Identification
nameโstring(must be unique within table)descriptionโstring
๐ฆ Common Column
other_configโ map of string-string pairs
๐ Details ๐
๐ง Per Logical-Switch Tunnel Key ๐ง
Tunnel protocols tend to have a field that allows the tunnel to be partitioned into sub-tunnels: VXLAN has a VNI, GRE has a key, CAPWAP has a WSI, and so on. We call these generically ``tunnel keys.โโ Given that one needs to use a tunnel key at all, there are at least two reasonable ways to assign their values:
- Per
Logical_Switch+Physical_Locatorpair. That is, each logical switch may be assigned a different tunnel key on everyPhysical_Locator. This model is especially flexible.
In this model, Physical_Locator carries the tunnel key. Therefore, one Physical_Locator record will exist for each logical switch carried at a given IP destination.
- Per
Logical_Switch. That is, every tunnel associated with a particular logical switch carries the same tunnel key, regardless of thePhysical_Locatorto which the tunnel is addressed. This model may ease switch implementation because it imposes fewer requirements on the hardware datapath.
In this model, Logical_Switch carries the tunnel key. Therefore, one Physical_Locator record will exist for each IP destination.
tunnel_key: optionalintegerThis column is used only in the tunnel key perLogical_Switchmodel (see above), because only in that model is there a tunnel key associated with a logical switch.
For vxlan_over_ipv4 encapsulation, when the tunnel key per Logical_Switch model is in use, this column is the VXLAN VNI that identifies a logical switch. It must be in the range 0 to 16,777,215. ๐ฅ
๐ Replication Mode ๐
For handling L2 broadcast, multicast and unknown unicast traffic, packets can be sent to all members of a logical switch referenced by a physical switch. There are different modes to replicate the packets. The default mode of replication is to send the traffic to a service node, which can be a hypervisor, server or appliance, and let the service node handle replication to other transport nodes (hypervisors or other VTEP physical switches). This mode is called service node replication. An alternate mode of replication, called source node replication, involves the source node sending to all other transport nodes. Hypervisors are always responsible for doing their own replication for locally attached VMs in both modes. Service node replication mode is the default and considered a basic requirement because it only requires sending the packet to a single transport node. ๐ซ
replication_mode: optionalstring, eitherservice_nodeorsource_nodeThis optional column defines the replication mode perLogical_Switch. There are2valid values,service_nodeandsource_node. If the column is not set, the replication mode defaults toservice_node.
๐ Identification ๐
name:string(must be unique within table) Symbolic name for the logical switch.description:stringAn extended description for the logical switch, such as its switch login banner.
๐ Common Column ๐
The overall purpose of this column is described under Common Column at the beginning of this document.
other_config: map of string-string pairs
Ucast_Macs_Local TABLE ๐ฆ
Mapping of unicast MAC addresses to tunnels (physical locators). This table is written by the HSC, so it contains the MAC addresses that have been learned on physical ports by a VTEP. Itโs literally the โwhoโs whoโ of learned MACs, bestie. ๐
๐ธ Summary ๐ธ
MACโstringlogical_switchโLogical_SwitchlocatorโPhysical_Locatoripaddrโstring
๐ Details ๐
MAC:stringA MAC address that has been learned by theVTEP.logical_switch:Logical_SwitchThe Logical switch to which this mapping applies.locator:Physical_LocatorThe physical locator to be used to reach this MAC address. In this table, the physical locator will be one of the tunnel IP addresses of the appropriateVTEP.ipaddr:stringThe IP address to which this MAC corresponds. Optional field for the purpose of ARP supression.
๐ Ucast_Macs_Remote TABLE ๐
okay so this table is the mapping of unicast MAC addresses to tunnels (physical locators), and it's written by the NVC โ so it holds all the MAC addresses the NVC has learned. Those include VM MAC addresses, and when it's a VM MAC the physical locators are hypervisor IP addresses. The NVC will also report MACs it learned from other HSCs in the network, and in that case the physical locators are the tunnel IP addresses of the corresponding VTEPs. two flavors, one table, iykyk ๐ฆ
๐ Summary
MAC string
logical_switch Logical_Switch
locator Physical_Locator
ipaddr string
โจ Details โจ
MAC: string โ a MAC address that has been learned by the NVC.logical_switch:Logical_Switchโ the logical switch this mapping applies to.locator:Physical_Locatorโ the physical locator used to reach this MAC address. In this table it's either a hypervisor IP address or a tunnel IP address of another VTEP.ipaddr: string โ the IP address this MAC corresponds to. It's an optional field, and it's there for the purpose of ARP suppression.
๐ธ Mcast_Macs_Local TABLE ๐ธ
mapping of multicast MAC addresses to tunnels (physical locators) ๐ this one is written by the HSC, so it's got the MAC addresses that have been learned on physical ports by a VTEP โ learned by IGMP snooping, for example. and bestie, this table also specifies how to handle unknown unicast and broadcast packets. very main character of it.
๐ Summary
MAC string
logical_switch Logical_Switch
locator_set Physical_Locator_Set
ipaddr string
โจ Details โจ
MAC: string โ a MAC address that has been learned by the VTEP.
The keyword unknown-dst is used as a special "Ethernet address" that indicates the locations to which packets in a logical switch should be sent when their destination addresses don't otherwise appear in Ucast_Macs_Local (for unicast addresses) or Mcast_Macs_Local (for multicast addresses).
logical_switch:Logical_Switchโ the logical switch this mapping applies to.locator_set:Physical_Locator_Setโ the physical locator set used to reach this MAC address. In this table, the physical locator set will contain one or more tunnel IP addresses of the appropriate VTEP(s).ipaddr: string โ the IP address this MAC corresponds to. Optional field, there for the purpose of ARP suppression.
๐ฆ Mcast_Macs_Remote TABLE ๐ฆ
mapping of multicast MAC addresses to tunnels (physical locators) ๐ this one's written by the NVC, so it's the MACs the NVC has learned. and just like the local version, it also specifies how to handle unknown unicast and broadcast packets.
so here's the tea: multicast packet replication may be handled by a service node, and then the physical locators are IP addresses of service nodes. but if the VTEP supports replication onto multiple tunnels using source node replication, then this may be used to replicate directly onto VTEP-hypervisor or VTEP-VTEP tunnels. multiple paths, pick your fighter โจ
๐ Summary
MAC string
logical_switch Logical_Switch
locator_set Physical_Locator_Set
ipaddr string
โจ Details โจ
MAC: string โ a MAC address that has been learned by the NVC.
The keyword unknown-dst is used as a special "Ethernet address" that indicates the locations to which packets in a logical switch should be sent when their destination addresses don't otherwise appear in Ucast_Macs_Remote (for unicast addresses) or Mcast_Macs_Remote (for multicast addresses).
logical_switch:Logical_Switchโ the logical switch this mapping applies to.locator_set:Physical_Locator_Setโ the physical locator set used to reach this MAC address. In this table the physical locator set will be either a set of service nodes (when service node replication is used) or the set of transport nodes โ defined as hypervisors or VTEPs โ participating in the associated logical switch (when source node replication is used). When service node replication is used, the VTEP should send packets to one member of the locator set that is known to be healthy and reachable, which could be determined by BFD. When source node replication is used, the VTEP should send packets to all members of the locator set. one vs. all, no cap ๐ipaddr: string โ the IP address this MAC corresponds to. Optional field, there for the purpose of ARP suppression.
๐ฅ Logical_Router TABLE ๐ฅ
a logical router, aka a VRF ๐ซถ a logical router may be connected to one or more logical switches, and subnet addresses and interface addresses may be configured on the interfaces. it's giving "router but make it virtual."
๐ Summary
switch_binding map of string-Logical_Switch pairs
static_routes map of string-string pairs
acl_binding map of string-ACL pairs
Identification:
name string (must be unique within table)
description string
Error Notification:
LR_fault_status : invalid_ACL_binding
none
LR_fault_status : unspecified_fault
none
Common Column:
other_config map of string-string pairs
โจ Details โจ
switch_binding: map of string-Logical_Switch pairs โ maps from an IPv4 or IPv6 address prefix in CIDR notation to a logical switch. multiple prefixes may map to the same switch. by writing a 32-bit (or 128-bit for v6) address with a/Nprefix length, you configure both the router's interface address and the subnet prefix at once. like,192.68.1.1/24creates a/24subnet for the logical switch attached to the interface and assigns the address192.68.1.1to the router interface. two birds, one stone, slay ๐static_routes: map of string-string pairs โ one or more static routes, mapping IP prefixes to next hop IP addresses.acl_binding: map of string-ACL pairs โ maps ACLs to logical router interfaces. the router interfaces are indicated using IP address notation, and they must be the same interfaces created in theswitch_bindingcolumn. for example, an ACL could be associated with the logical router interface that has an address of192.68.1.1as defined in the example above.
๐ Identification ๐
name: string (must be unique within table) โ symbolic name for the logical router.description: string โ an extended description for the logical router.
๐ Error Notification ๐
an entry in this column indicates to the NVC that the HSC has encountered a fault in configuring state related to the logical router ๐ญ
LR_fault_status : invalid_ACL_binding: none โ indicates that an error has occurred in associating an ACL with a logical router port.LR_fault_status : unspecified_fault: none โ indicates that an error has occurred in configuring the logical router, but that no more specific information is available.
๐ Common Column ๐
the overall purpose of this column is described under Common Column at the beginning of this document ๐
other_config: map of string-string pairs
๐ Arp_Sources_Local TABLE ๐
the MAC address to be used when a VTEP issues ARP requests on behalf of a logical router ๐ฅ
okay so a distributed logical router is implemented by a set of VTEPs (both hardware VTEPs and vswitches). for a given VTEP to populate the local ARP cache for a logical router, it issues ARP requests with a source MAC address that is unique to that VTEP. and a single per-VTEP MAC can be re-used across all logical networks โ efficiency queen ๐ this table contains the MACs used by the VTEPs of a given HSC, and it provides the mapping from MAC to physical locator for each VTEP, so replies to the ARP requests can be sent back to the correct VTEP using the appropriate physical locator. ๐ซถ
๐ Summary
src_mac string
locator Physical_Locator
โจ Details โจ
src_mac: string โ the source MAC to be used by a given VTEP.locator:Physical_Locatorโ thePhysical_Locatorto use for replies to ARP requests from this MAC address.
โญ Arp_Sources_Remote TABLE โญ
the MAC address to be used when a remote VTEP issues ARP requests on behalf of a logical router ๐ฆ
this table is the remote counterpart of Arp_sources_local. the NVC writes this table to notify the HSC of the MACs that will be used by remote VTEPs when they issue ARP requests on behalf of a distributed logical router. it's the same vibe, just... elsewhere โจ
๐ Summary
src_mac string
locator Physical_Locator
โจ Details โจ
src_mac: string โ the source MAC to be used by a given VTEP.locator:Physical_Locatorโ thePhysical_Locatorto use for replies to ARP requests from this MAC address.
๐ Physical_Locator_Set TABLE ๐
a set of one or more Physical_Locators ๐
and like... the only reason this table exists? OVSDB doesn't have a way to express the type map from string to one or more Physical_Locator records. so we made a table instead. iconic workaround, honestly ๐
๐ Summary
locators immutable set of 1 or more
Physical_Locators
โจ Details โจ
locators: immutable set of 1 or morePhysical_Locators
๐ Physical_Locator TABLE ๐
Okay bestie, this one's the "where is everybody" table โ it clocks an endpoint that logical switch traffic can get encapsulated and yeeted off to. Iconic.
So the vxlan_over_ipv4 encapsulation โ the only one anybody's defined so far, no cap โ can roll with either tunnel key model, both of which are laid out in the Per Logical-Switch Tunnel Key'' section over in the Logical_Switch table. Here's the gossip: when the tunnel key per Logical_Switch model is the one in use, the `tunnel_key` column in the Logical_Switch table is where the VNI lives and the `tunnel_key` column in *this* table is just sitting there empty, vibing. In the key-per-tunnel model? Literally the opposite, bestie. And ngl, the former model is the older one, so it's probably the one with more widespread support out in the wild. Want the full discussion of the model? It's in that Per Logical-Switch Tunnel Key'' section in the Logical_Switch table. ๐ซถ
Summary:
encapsulation_typeโ immutable string, must bevxlan_over_ipv4dst_ipโ immutable stringtunnel_keyโ optional integer
Details:
encapsulation_type: immutable string, must bevxlan_over_ipv4โ the type of tunneling encapsulation, periodt.dst_ip: immutable string โ forvxlan_over_ipv4encapsulation, this is the IPv4 address of the VXLAN tunnel endpoint. We expect this column could also be used for IPv4 or IPv6 addresses in encapsulations that get introduced later. ๐ฎtunnel_key: optional integer โ this column is only used in the tunnel key per Logical_Switch+Physical_Locator model (see above, bestie). Forvxlan_over_ipv4encapsulation, when the Logical_Switch+Physical_Locator model is in use, this column is the VXLAN VNI. It must be in the range0to16,777,215. No sneaking outside the range. ๐
๐ ACL_entry TABLE ๐
This one describes the individual entries that make up an Access Control List. Each entry in the table = a single rule to match on certain header fields.
Now the โจvibe checkโจ on hardware: there are a large number of fields you can match on, but most hardware cannot match on arbitrary combinations of fields. It's common to match on either L2 fields (the L2 group of columns, below) or L3/L4 fields (the L3/L4 group of columns) โ but not both. And if an ACL entry makes the hardware switch controller match on an incompatible mixture of fields, it may log an error. So like, be mindful. ๐ญ
Summary:
sequenceโ integer- L2 fields:
source_macโ optional stringdest_macโ optional stringethertypeโ optional string
- L3/L4 fields:
source_ipโ optional stringsource_maskโ optional stringdest_ipโ optional stringdest_maskโ optional stringprotocolโ optional integersource_port_minโ optional integersource_port_maxโ optional integerdest_port_minโ optional integerdest_port_maxโ optional integertcp_flagsโ optional integertcp_flags_maskโ optional integericmp_typeโ optional integericmp_codeโ optional integer
directionโ string, eitheregressoringressactionโ string, eitherdenyorpermit- Error Notification:
acle_fault_status:invalid_acl_entryโnoneacle_fault_status:unspecified_faultโnone
Details:
sequence: integer โ the sequence number for the ACL entry, for the purpose of ordering entries in an ACL. Lower numbered entries get matched before higher numbered entries. First come, first served, basically. ๐- L2 fields:
source_mac: optional string โ source MAC address, in the formxx:xx:xx:xx:xx:xxdest_mac: optional string โ destination MAC address, in the formxx:xx:xx:xx:xx:xxethertype: optional string โ ethertype in hexadecimal, in the form0xAAAA
- L3/L4 fields:
source_ip: optional string โ source IP address, in the formxx.xx.xx.xxfor IPv4 or appropriate colon-separated hexadecimal notation for IPv6.source_mask: optional string โ mask that determines which bits ofsource_ipto match on, in the formxx.xx.xx.xxfor IPv4 or appropriate colon-separated hexadecimal notation for IPv6.dest_ip: optional string โ destination IP address, in the formxx.xx.xx.xxfor IPv4 or appropriate colon-separated hexadecimal notation for IPv6.dest_mask: optional string โ mask that determines which bits ofdest_ipto match on, in the formxx.xx.xx.xxfor IPv4 or appropriate colon-separated hexadecimal notation for IPv6.protocol: optional integer โ protocol number in the IPv4 header, or the value of the "next header" field in the IPv6 header.source_port_min: optional integer โ lower end of the range of source port values. The value specified is included in the range. ๐ซถsource_port_max: optional integer โ upper end of the range of source port values. The value specified is included in the range.dest_port_min: optional integer โ lower end of the range of destination port values. The value specified is included in the range.dest_port_max: optional integer โ upper end of the range of destination port values. The value specified is included in the range.tcp_flags: optional integer โ integer representing the value of TCP flags to match. For example, the SYN flag is the second least significant bit in the TCP flags. Hence a value of2would indicate that the "SYN" flag should be set (assuming an appropriate mask).tcp_flags_mask: optional integer โ integer representing the mask to apply when matching TCP flags. For example, a value of2would imply that the "SYN" flag should be matched and all other flags ignored.icmp_type: optional integer โ ICMP type to be matched.icmp_code: optional integer โ ICMP code to be matched.
direction: string, eitheregressoringressโ direction of traffic to match on the specified port, either"ingress"(toward the logical switch or router) or"egress"(leaving the logical switch or router).action: string, eitherdenyorpermitโ action to take for this rule, either"permit"or"deny".
๐จ Error Notification:
An entry in this column indicates to the NVC that the ACL could not be configured as requested. The switch must clear this column when the error has been cleared. (Yes, must. Don't leave it hanging. ๐)
acle_fault_status:invalid_acl_entry:noneโ indicates that an ACL entry requested by the controller could not be instantiated by the switch, e.g. because it requires an unsupported combination of fields to be matched.acle_fault_status:unspecified_fault:noneโ indicates that an error has occurred in configuring the ACL entry but no more specific information is available. Like when the error message is just "error". ๐
๐ ACL TABLE ๐
The Access Control List table, obvi. Each ACL is constructed as a set of entries from the ACL_entry table. And here's the important bit: packets that are not matched by any entry in the ACL are allowed by default. Default = yes babe, come in. โจ
Summary:
acl_entriesโ set of 1 or moreACL_entrysacl_nameโ string (must be unique within table)- Error Notification:
acl_fault_status:invalid_aclโnoneacl_fault_status:resource_shortageโnoneacl_fault_status:unspecified_faultโnone
Details:
acl_entries: set of 1 or moreACL_entrys โ a set of references to entries in theACL_entrytable.acl_name: string (must be unique within table) โ a human readable name for the ACL, which may (for example) be displayed on the switch CLI. Give it a cute name, it'll show up in public. ๐
๐จ Error Notification:
An entry in this column indicates to the NVC that the ACL could not be configured as requested. The switch must clear this column when the error has been cleared.
acl_fault_status:invalid_acl:noneโ indicates that an ACL requested by the controller could not be instantiated by the switch, e.g., because it requires an unsupported combination of fields to be matched.acl_fault_status:resource_shortage:noneโ indicates that an ACL requested by the controller could not be instantiated by the switch due to a shortage of resources (e.g. TCAM space). Too popular, ran out of room. ๐ญacl_fault_status:unspecified_fault:noneโ indicates that an error has occurred in configuring the ACL but no more specific information is available.
And that's a wrap on the whole page, bestie!! ๐ฆโจ This part was vtep(5) from Open vSwitch 4.0.0, DB Schema 1.7.0 โ mwah, go forth and encapsulate responsibly. ๐๐ธ
๐ฆ 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