ovn-nb(5)

πŸ’– ovn-nb(5) β€” the OVN_Northbound database schema πŸ’–

okay bestie, sit down, grab a strawberry πŸ“, because this is ovn-nb, and it's literally the manual page for the OVN_Northbound database schema. She's the main character of the OVN control plane, no cap.


✨ NAME ✨

ovn-nb β€” OVN_Northbound database schema


🌸 DESCRIPTION 🌸

So here's the vibe: this database is the interface between OVN and the cloud management system (CMS), like OpenStack, running above it. The CMS produces almost all of the contents of the database. Then ovn-northd is out here monitoring the database contents, transforming it, and storing it into the OVN_Southbound database. Iconic pipeline behavior fr fr.

We generally speak of "the" CMS, but one can imagine scenarios in which multiple CMSes manage different parts of an OVN deployment. The more the merrier ig πŸ’…

🫢 External IDs

Each of the tables in this database contains a special column, named external_ids. This column has the same form and purpose each place it appears. She's consistent. She's reliable. We love her.

  • external_ids: map of string-string pairs β€” Key-value pairs for use by the CMS. The CMS might use certain pairs, for example, to identify entities in its own configuration that correspond to those in this database.

πŸ‘‘ TABLE SUMMARY πŸ‘‘

The following list summarizes the purpose of each of the tables in the OVN_Northbound database. Each table is described in more detail on a later page. (Yes, this is the trailer. The full movie comes later. 🎬)

  • NB_Global β€” Northbound configuration
  • Sample_Collector β€” Sample_Collector
  • Sample β€” Sample
  • Copp β€” Control plane protection
  • Logical_Switch β€” L2 logical switch
  • Logical_Switch_Port β€” L2 logical switch port
  • Logical_Switch_Port_Health_Check β€” logical switch port health check
  • Forwarding_Group β€” forwarding group
  • Address_Set β€” Address Sets
  • Port_Group β€” Port Groups
  • Load_Balancer β€” load balancer
  • Load_Balancer_Group β€” load balancer group
  • Load_Balancer_Health_Check β€” load balancer
  • ACL β€” Access Control List (ACL) rule
  • Logical_Router β€” L3 logical router
  • QoS β€” QoS rule
  • Mirror β€” Mirror Entry
  • Mirror_Rule β€” Mirror rule entry
  • Meter β€” Meter entry
  • Meter_Band β€” Band for meter entries
  • Logical_Router_Port β€” L3 logical router port
  • Logical_Router_Static_Route β€” Logical router static routes
  • Logical_Router_Policy β€” Logical router policies
  • NAT β€” NAT rules
  • DHCP_Options β€” DHCP options
  • DHCP_Relay β€” DHCP Relay
  • Connection β€” OVSDB client connections.
  • DNS β€” Native DNS resolution
  • SSL β€” SSL configuration.
  • Gateway_Chassis β€” Gateway_Chassis configuration.
  • HA_Chassis_Group β€” HA_Chassis_Group configuration.
  • HA_Chassis β€” HA_Chassis configuration.
  • BFD β€” BFD configuration.
  • Static_MAC_Binding β€” Static_MAC_Binding configuration.
  • Chassis_Template_Var β€” Chassis_Template_Var configuration.
  • Sampling_App β€” Sampling_App configuration.
  • Network_Function_Group β€” network function group
  • Network_Function β€” network function
  • Network_Function_Health_Check β€” network function health check

🌈 NB_Global TABLE 🌈

Northbound configuration for an OVN system. This table must have exactly one row. One. Singular. Monogamy. πŸ’€

πŸ“‹ Summary:

Identity:

  • name β€” string

Status:

  • nb_cfg β€” integer
  • nb_cfg_timestamp β€” integer
  • sb_cfg β€” integer
  • sb_cfg_timestamp β€” integer
  • hv_cfg β€” integer
  • hv_cfg_timestamp β€” integer

Common Columns:

  • external_ids β€” map of string-string pairs

Common options:

  • options β€” map of string-string pairs
    • Options for configuring OVS BFD:
      • options : bfd-min-rx β€” optional string
      • options : bfd-decay-min-rx β€” optional string
      • options : bfd-min-tx β€” optional string
      • options : bfd-mult β€” optional string
    • options : ignore_chassis_features β€” optional string
    • options : mac_prefix β€” optional string
    • options : mac_binding_removal_limit β€” optional string, containing an integer, in range 0 to 4,294,967,295
    • options : fdb_removal_limit β€” optional string, containing an integer, in range 0 to 4,294,967,295
    • options : controller_event β€” optional string, either true or false
    • options : northd_probe_interval β€” optional string
    • options : ic_probe_interval β€” optional string
    • options : nbctl_probe_interval β€” optional string
    • options : northd_trim_timeout β€” optional string
    • options : use_logical_dp_groups β€” optional string
    • options : use_parallel_build β€” optional string
    • options : ignore_lsp_down β€” optional string
    • options : use_ct_inv_match β€” optional string
    • options : acl_ct_translation β€” optional string
    • options : default_acl_drop β€” optional string
    • options : debug_drop_domain_id β€” optional string
    • options : debug_drop_collector_set β€” optional string
    • options : use_common_zone β€” optional string, either true or false
    • options : northd-backoff-interval-ms β€” optional string
    • options : vxlan_mode β€” optional string
    • options : always_tunnel β€” optional string, either true or false
    • options : ecmp_nexthop_monitor_enable β€” optional string
    • options : enable_chassis_nb_cfg_update β€” optional string
    • Options for services health check confguration:
      • options : svc_monitor_mac β€” optional string
      • options : svc_monitor_mac_dst β€” optional string
      • options : svc_monitor_ip β€” optional string
      • options : svc_monitor_ip_dst β€” optional string
    • Options for configuring interconnection route advertisement:
      • options : ic-route-adv β€” optional string
      • options : ic-route-learn β€” optional string
      • options : ic-route-adv-default β€” optional string
      • options : ic-route-learn-default β€” optional string
      • options : ic-route-adv-lb β€” optional string
      • options : ic-route-learn-lb β€” optional string
      • options : ic-route-denylist β€” optional string
    • Options for interconnection address_set advertisement:
      • options : ic-as-adv β€” optional string
      • options : ic-as-learn β€” optional string

Connection Options:

  • connections β€” set of Connections
  • ssl β€” optional SSL

Security Configurations:

  • ipsec β€” boolean
  • options : ipsec_* β€” optional string

Read-only Options:

  • options : max_tunid β€” optional string

πŸ” Details:

Identity:

  • name: string β€” The name of the OVN cluster, which uniquely identifies the OVN cluster throughout all OVN clusters supposed to interconnect with each other. Basically her government name. πŸͺͺ

Status:

These columns allow a client to track the overall configuration state of the system. It's giving ✨project management✨.

  • nb_cfg: integer β€” Sequence number for client to increment. When a client modifies any part of the northbound database configuration and wishes to wait for ovn-northd and possibly all of the hypervisors to finish applying the changes, it may increment this sequence number.
  • nb_cfg_timestamp: integer β€” The timestamp, in milliseconds since the epoch, when ovn-northd sees the latest nb_cfg and starts processing.

To print the timestamp as a human-readable date:

date -d "@$(ovn-nbctl get NB_Global . nb_cfg_timestamp | sed ’s/...$//’)"
  • sb_cfg: integer β€” Sequence number that ovn-northd sets to the value of nb_cfg after it finishes applying the corresponding configuration changes to the OVN_Southbound database.
  • sb_cfg_timestamp: integer β€” The timestamp, in milliseconds since the epoch, when ovn-northd finishes applying the corresponding configuration changes to the OVN_Southbound database successfully.
  • hv_cfg: integer β€” Sequence number that ovn-northd sets to the smallest sequence number of all the chassis in the system, as reported in the Chassis_Private table in the southbound database. Thus, hv_cfg equals nb_cfg if all chassis are caught up with the northbound configuration (which may never happen, if any chassis is down). This value can regress, if a chassis was removed from the system and rejoins before catching up.

If there are no chassis, then ovn-northd copies nb_cfg to hv_cfg. Thus, in this case, the (nonexistent) hypervisors are always considered to be caught up. This means that hypervisors can be "caught up" even in cases where sb_cfg would show that the southbound database is not. To detect when both the hypervisors and the southbound database are caught up, a client should take the smaller of sb_cfg and hv_cfg.

  • hv_cfg_timestamp: integer β€” The largest timestamp, in milliseconds since the epoch, of the smallest sequence number of all the chassis in the system, as reported in the Chassis_Private table in the southbound database. In other words, this timestamp reflects the time when the slowest chassis catches up with the northbound configuration, which is useful for end-to-end control plane latency measurement. We're timing the slowest one. She's the group project straggler and we're putting her on a clock β±οΈπŸ’€

Common Columns:

  • external_ids: map of string-string pairs β€” See External IDs at the beginning of this document. (Scroll up bestie, it's right there 🫢)

Common options:

  • options: map of string-string pairs β€” This column provides general key/value settings. The supported options are described individually below.

Options for configuring OVS BFD:

These options apply when ovn-controller configures OVS BFD on tunnels interfaces. Please note these parameters refer to legacy OVS BFD implementation and not to OVN BFD one. Read that again. Legacy. Not the OVN one. Don't get them twisted πŸ’…

  • options : bfd-min-rx: optional string β€” BFD option min-rx value to use when configuring BFD on tunnel interfaces.
  • options : bfd-decay-min-rx: optional string β€” BFD option decay-min-rx value to use when configuring BFD on tunnel interfaces.
  • bfd-min-tx β€” optional string. The BFD min-tx value to use when you're configuring BFD on tunnel interfaces. πŸŽ€
  • bfd-mult β€” optional string. The BFD mult value, used when configuring BFD on tunnel interfaces. ✨
  • ignore_chassis_features β€” optional string. Set this to false and ovn-northd will actually check which features each chassis supports, then only switch on the ones that literally every chassis supports. Why do we care? Because it keeps you backward compatible while you upgrade β€” specifically when ovn-northd gets updated before ovn-controller. That's the good news. The bad news: if even one chassis is badly managed and the upgrade flops, this will hold ovn-northd back from activating the new features. πŸ™ˆ

Set it to true instead and ovn-northd just ignores the support status of every chassis and goes straight to implementing the latest features. This keeps ovn-northd safe from a chassis with a mismatched configuration. πŸ’…

The default is false. Periodt.

  • mac_prefix β€” optional string. Set a given OUI to be used as the prefix whenever an L2 address gets dynamically assigned, e.g. 00:11:22. πŸ¦‹
  • mac_binding_removal_limit β€” optional string, containing an integer, in range 0 to 4,294,967,295. The MAC binding aging bulk removal limit. It caps how many rows can expire inside a single transaction. Default is 0, which means unlimited. And heads up: once you hit the limit, the next batch removal gets delayed by 5 s. ⏳
  • fdb_removal_limit β€” optional string, containing an integer, in range 0 to 4,294,967,295. Same energy, but for FDB aging bulk removal. It limits how many rows can expire in one transaction. Default is 0 = unlimited, and when you hit the limit the next batch removal is delayed by 5 s. ⏳
  • controller_event β€” optional string, either true or false. This is the value the CMS sets to turn ovn-controller event reporting on or off. Traffic going into OVS can raise a 'controller' event, which results in a Controller_Event being written to the Controller_Event table in SBDB. Once the CMS has seen the event and done the appropriate thing, it can delete the matching row in the Controller_Event table. The whole point is for a CMS to see events and take some kind of action. Go look at the Controller_Event table in SBDB. πŸ‘€

Also: you can attach a meter to each controller event type so you don't overload the pinctrl thread when things get heavy. Each event type relies on a meter with a defined name:

  • empty_lb_backends: event-elb
  • northd_probe_interval β€” optional string. The inactivity probe interval, in milliseconds, for the connection from ovn-northd to the OVN Northbound and Southbound databases. Set it to zero and the connection keepalive feature is disabled. If it's nonzero, it gets forced to a value of at least 1000 ms. ⭐
  • ic_probe_interval β€” optional string. The inactivity probe interval, in milliseconds, for the connection from ovn-ic to the OVN Northbound and Southbound databases. Zero disables the connection keepalive feature. If nonzero, it's forced to at least 1000 ms. πŸ’œ
  • nbctl_probe_interval β€” optional string. The inactivity probe interval, in milliseconds, for the connection from the ovn-nbctl utility to the OVN Northbound database. Zero disables the connection keepalive feature. If nonzero, it's forced to at least 1000 ms. 🌸

And if the value is less than zero, then the default inactivity probe interval for ovn-nbctl is left intact (120000 ms). 🫢

  • northd_trim_timeout β€” optional string. When you use this, the value specifies the time in milliseconds since the last ovn-northd active operation, after which memory trimming gets performed. By default this is 30000 (30 seconds). 🧚
  • use_logical_dp_groups β€” optional string. > Note: this option is deprecated. The only behavior is to always combine logical flows by datapath groups. Changing the value or removing this option altogether will have no effect. πŸ’€

So what does it describe? ovn-northd combines logical flows that differ only by logical datapath into a single logical flow with a logical datapath group attached. ✨

  • use_parallel_build β€” optional string. Set it to true and ovn-northd will try to compute logical flows in parallel. πŸ”₯

Parallel computation only gets enabled if the system has 4 or more cores/threads available for ovn-northd to use. The default value is false.

  • ignore_lsp_down β€” optional string. Set it to false and ARP/ND reply flows for logical switch ports will only be installed when the port is up β€” meaning claimed by a Chassis. Set it to true and those flows get installed no matter what the port status is. ⚠️ Careful though: that can leave you with an ARP request to an IP getting resolved even before the relevant VM/container is actually running. For environments where that's not a problem, true can reduce the load and latency of the control plane. The default value is true. πŸ’«
  • use_ct_inv_match β€” optional string. Set it to false and ovn-northd won't use the ct.inv field in any of its logical flow matches. The default value is true. Now, if your NIC supports offloading OVS datapath flows but does not support offloading the ct_state inv flag, then the datapath flows matching on that flag (either +inv or -inv) will not be offloaded. In that case the CMS should consider setting use_ct_inv_match to false. 😭

But know the side effect: invalid packets get delivered to the destination VIF, when OVN would otherwise have dropped them. 🫠

  • acl_ct_translation β€” optional string. Set it to true and ovn-northd enables connection tracking based L4 field translation for stateful ACLs. When it's on, ACL matches on L4 port fields (tcp/udp/sctp) use connection tracking state instead of packet headers. That gives you proper handling of IP fragmentation in userspace datapaths (e.g., DPDK), where fragments aren't automatically reassembled during the connection tracking lookup. 🌈
Important: enabling this option may break hardware offloading of flows. It also disables the multicast conntrack bypass, which means multicast traffic (including DHCP) will go through connection tracking. That may have a performance impact on multicast-heavy workloads. Only enable this option if you actually need to handle fragmented traffic with stateful ACLs in userspace datapaths. πŸ™

The default value is false.

  • default_acl_drop β€” optional string. If set to true., ovn-northd will generate a logical flow that drops all traffic in the ACL stages. By default this option is set to false. πŸ’…
  • debug_drop_domain_id β€” optional string. Set this to an 8-bit number, and if debug_drop_collector_set is also configured, ovn-northd will add a sample action to every logical flow containing a 'drop' action. The 8 most significant bits of the observation_domain_id field will be the ones you specified in debug_drop_domain_id, and the 24 least significant bits of the observation_domain_id field will be the datapath's key. πŸ”‘

The observation_point_id will be set to the first 32 bits of the logical flow's UUID. πŸŽ€

Note: this key is deprecated in favor of the value configured in the Sampling_App table for the drop application.
  • debug_drop_collector_set β€” optional string. If set to a 32-bit number, ovn-northd will add a sample action to every logical flow that contains a 'drop' action. That sample action will carry the collector_set_id you specified. The value has to match the local OVS configuration, as described in ovs-actions(7). πŸ‘‘
  • use_common_zone β€” optional string, either true or false. Default value is false. Set it to true and SNAT and DNAT both happen in a common zone, instead of happening in separate zones, depending on the configuration. πŸ’– However β€” this option breaks traffic when you've got DGP + LB + SNAT configured on this LR. The value true should only be used in the case of HWOL compatibility with GDP. πŸ™ˆ
  • northd-backoff-interval-ms β€” optional string. The maximum interval, in milliseconds, that the northd incremental engine gets delayed by. Set it to a nonzero value and the next northd engine run gets delayed by the previous run time, capped by the value you specified. If the value is zero, the engine won't be delayed at all. The recommended period is smaller than 500 ms β€” go beyond that and the latency of SB changes becomes very noticeable. ⏰
  • vxlan_mode β€” optional string. By default, if at least one chassis in the OVN cluster has VXLAN encap, northd runs in VXLAN mode. See man ovn-architecture(7), the Tunnel Encapsulations paragraph, for more details. πŸ¦‹

But say you only need VXLAN encaps on a chassis to support HW VTEP functionality, and your main encap type is GENEVE β€” set this option to false to use the default non-VXLAN mode tunnel IDs allocation logic. 🌟

Also consider: when OVN is running in OVN-interconnect mode and it's using the VXLAN encapsulation type, the max number of non-transit logical switches and logical routers is reduced to 1024. πŸ“‰

And note that in order to enable the VXLAN encapsulation type for cross-AZ traffic, the vxlan_mode parameter in IC_NB_Global TABLE must be set to true. βœ…

  • options : always_tunnel β€” optional string, either true or false. Set it to true and any traffic headed for a VIF of a provider logical switch (aka one that has a localnet port) gets tunnelled instead of yeeted out the localnet port. This is the move when the CMS wants to hook overlay logical switches (no localnet port) and provider logical switches up to a router. Leave it unset and your traffic path becomes a messy lil mix of tunnelling and localnet ports (bc routing is distributed, bestie), which means the router port MAC address leaks to the upstream switches and you get undefined behavior if NATting is involved 😭. Disabled by default.
  • options : ecmp_nexthop_monitor_enable β€” optional string. Set it to true and ovn-northd will create entries in the ECMP_Nexthop TABLE to keep track of ECMP routes made with the --ecmp_symmetric_reply option. Default is false.
  • options : enable_chassis_nb_cfg_update β€” optional string. Set it to false and ovn-controllers stop updating the nb_cfg column in the Chassis_Private table of the OVN_Southbound database 🫢. They will still update external_ids:ovn-nb-cfg on the local OVS integration bridge, so don't panic. Default is true.

🌸 Options for services health check confguration 🌸

These are the ones you reach for when health configuration is enabled for Load_Balancer and Network_Function services.

  • options : svc_monitor_mac β€” optional string. The MAC Address used as the Ethernet source in health check probes. Leave it unspecified and one gets auto-generated for you, slay ✨.
  • options : svc_monitor_mac_dst β€” optional string. The MAC Address used as the Ethernet destination in health check probes. Unspecified? Auto-generated. This applies only to Network Function health check probes deployed in inline mode.
  • options : svc_monitor_ip β€” optional string. IP Address (IPv4 or IPv6) used as the source in health check probes. Applies only to Network Function health check probes deployed in inline mode.
  • options : svc_monitor_ip_dst β€” optional string. IP Address (IPv4 or IPv6) used as the destination in health check probes. Applies only to Network Function health check probes deployed in inline mode.

πŸ¦‹ Options for configuring interconnection route advertisement πŸ¦‹

These options decide how routes get advertised between OVN deployments for interconnection. Turn it on and ovn-ic from different OVN deployments swap routes with each other through the global OVN_IC_Southbound database πŸ’…. Only routers with ports connected to interconnection transit switches get to participate in route advertisement. And for each of those routers, there are three kinds of routes that can be advertised:

  1. The static routes configured in the router. Yes, those. Advertised.
  2. The networks configured in the logical router ports that are not on the transit switches. These count as directly connected subnets on the router.
  3. The vips of the load balancers associated with the logical router.
Link local prefixes (IPv4 169.254.0.0/16 and IPv6 FE80::/10) are never advertised. Periodt.

The learned routes get added to the static_routes column of the Logical_Router table, with external_ids:ic-learned-route set to the uuid of the row in the Route table of the OVN_IC_Southbound database πŸ‘‘

  • options : ic-route-adv β€” optional string. A boolean value that enables route advertisement to the global OVN_IC_Southbound database. Default is false.
  • options : ic-route-learn β€” optional string. A boolean value that enables route learning from the global OVN_IC_Southbound database. Default is false.
  • options : ic-route-adv-default β€” optional string. A boolean value that enables advertising the default route to the global OVN_IC_Southbound database. Default is false. Heads up: this only takes effect when the ic-route-adv option is true.
  • options : ic-route-learn-default β€” optional string. A boolean value that enables learning the default route from the global OVN_IC_Southbound database. Default is false. This one only takes effect when the ic-route-learn option is true.
  • options : ic-route-adv-lb β€” optional string. A boolean value that enables advertising routes for load balancer vips to the global OVN_IC_Southbound database. Default is false. Only takes effect when ic-route-adv is true.
  • options : ic-route-learn-lb β€” optional string. A boolean value that enables learning routes for load balancer routes from the global OVN_IC_Southbound database. Default is false. Only takes effect when ic-route-learn is true.
  • options : ic-route-denylist β€” optional string. A string value containing a list of CIDRs delimited by ",". A route will not be advertised or learned if the route's prefix belongs to any of the CIDRs listed. It's giving bouncer at the club 🚫.

πŸŽ€ Options for interconnection address_set advertisement πŸŽ€

These control whether address_sets propagate from one OVN deployment to another via the global OVN_IC_Southbound.

  • options : ic-as-adv β€” optional string. A boolean value that enables address_set advertisement to the global OVN_IC_Southbound database. Default is false.
  • options : ic-as-learn β€” optional string. A boolean value that enables address_set learning from the global OVN_IC_Southbound database. Default is false.

πŸ’œ Connection Options πŸ’œ

  • connections β€” set of Connections. The database clients that the Open vSwitch database server should connect to, or listen on, plus all the options for how those connections should be configured. Peep the Connection table for more info.
  • ssl β€” optional SSL. Global SSL/TLS configuration. Secure the bag πŸ”’.

πŸ”₯ Security Configurations πŸ”₯

  • ipsec β€” boolean. Tunnel encryption configuration. Set this column to true and every single OVN tunnel gets encrypted with IPsec, no cap.
  • options : ipsec_* β€” optional string. IPsec configuration parameters get passed to the IPsec backend by prefixing libreswan/strongswan options with ipsec_. Go read ipsec.conf(5) for the full comprehensive set of instructions on IPsec configuration, bestie, it's all there πŸ“–.

⭐ Read-only Options ⭐

  • options : max_tunid β€” optional string. The maximum supported tunnel ID. Depends on the types of encapsulation enabled in the cluster.

🌈 Sample_Collector TABLE 🌈

✨ Summary ✨

  • id β€” integer, in range 1 to 255 (must be unique within table)
  • name β€” string
  • probability β€” integer, in range 0 to 65,535
  • set_id β€” integer, in range 1 to 4,294,967,295
  • external_ids β€” map of string-string pairs

πŸ’– Details πŸ’–

  • id: integer, in range 1 to 255 (must be unique within table) β€” Sample collector unique id, used to tell apart collectors that use the same set_id but different probability values. The supported value range for IDs is 1-255.
  • name: string β€” Name of the sample collector. That's it, that's the field πŸŽ€.
  • probability: integer, in range 0 to 65,535 β€” Sampling probability for this collector. Gotta be an integer between 0 and 65535. A value of 0 means no packets get sampled, while 65535 means all of them do. All or nothing energy fr fr.
  • set_id: integer, in range 1 to 4,294,967,295 β€” The 32-bit integer identifier of the set of collectors to send packets to. Check the Flow_Sample_Collector_Set Table in ovs-vswitchd's database schema.
  • external_ids: map of string-string pairs β€” See External IDs at the beginning of this document.

🫢 Sample TABLE 🫢

This table describes a Sampling configuration. Entries in other tables might be associated with Sample entries to indicate how the sample should be generated. For an example, go peek at ACL πŸ‘€.

✨ Summary ✨

  • collectors β€” set of Sample_Collectors
  • metadata β€” integer, in range 1 to 4,294,967,295 (must be unique within table)

πŸ’– Details πŸ’–

  • collectors: set of Sample_Collectors β€” A list of references to Sample_Collector records to be used when generating samples (e.g., IPFIX). A sample can be sent to multiple collectors simultaneously, because why choose one πŸ’….
  • metadata: integer, in range 1 to 4,294,967,295 (must be unique within table) β€” Will be used as the Observation Point ID in every sample. The Observation Domain ID gets generated by ovn-northd and includes the logical datapath key as the least significant 24 bits, plus the sampling application type (e.g., drop debugging) as the 8 most significant bits. Math but make it iconic ✨.

πŸŽ€ Copp TABLE πŸŽ€

bestie this table is literally where you define your control plane protection policies β€” like, it's the whole "associate entries from the Meter table with control protocol names" situation. protection era. πŸ’…

✨ Summary: ✨

  • name β€” string (must be unique within table)
  • meters : arp β€” optional string
  • meters : arp-resolve β€” optional string
  • meters : dhcpv4-opts β€” optional string
  • meters : dhcpv6-opts β€” optional string
  • meters : dns β€” optional string
  • meters : event-elb β€” optional string
  • meters : icmp4-error β€” optional string
  • meters : icmp6-error β€” optional string
  • meters : igmp β€” optional string
  • meters : nd-na β€” optional string
  • meters : nd-ns β€” optional string
  • meters : nd-ns-resolve β€” optional string
  • meters : nd-ra-opts β€” optional string
  • meters : tcp-reset β€” optional string
  • meters : bfd β€” optional string
  • meters : reject β€” optional string
  • meters : svc-monitor β€” optional string
  • meters : dhcpv4-relay β€” optional string
  • external_ids β€” map of string-string pairs

πŸ” Details: πŸ”

  • name: string (must be unique within table) β€” the CoPP name, bestie. that's its whole thing.
  • meters : arp: optional string β€” the rate limiting meter for ARP packets (request/reply) that get used for learning neighbors. 🫢
  • meters : arp-resolve: optional string β€” the rate limiting meter for packets that need the next-hop resolved (and do it through ARP).
  • meters : dhcpv4-opts: optional string β€” the rate limiting meter for packets that need DHCPv4 options added to them.
  • meters : dhcpv6-opts: optional string β€” the rate limiting meter for packets that need DHCPv6 options added to them.
  • meters : dns: optional string β€” the rate limiting meter for DNS query packets that need a reply. ✨
  • meters : event-elb: optional string β€” the rate limiting meter for empty load balancer events.
  • meters : icmp4-error: optional string β€” the rate limiting meter for packets that need to be replied to with an ICMP error.
  • meters : icmp6-error: optional string β€” the rate limiting meter for packets that need to be replied to with an ICMPv6 error.
  • meters : igmp: optional string β€” the rate limiting meter for IGMP packets.
  • meters : nd-na: optional string β€” the rate limiting meter for ND neighbor advertisement packets, used for learning neighbors.
  • meters : nd-ns: optional string β€” the rate limiting meter for ND neighbor solicitation packets, used for learning neighbors.
  • meters : nd-ns-resolve: optional string β€” the rate limiting meter for packets that need the next-hop resolved (and do it through ND).
  • meters : nd-ra-opts: optional string β€” the rate limiting meter for packets that need ND router advertisement options added to them.
  • meters : tcp-reset: optional string β€” the rate limiting meter for packets that need a TCP RST packet reply.
  • meters : bfd: optional string β€” the rate limiting meter for BFD packets.
  • meters : reject: optional string β€” the rate limiting meter for packets that trigger a reject action
  • meters : svc-monitor: optional string β€” the rate limiting meter for packets arriving at the service monitor MAC address.
  • meters : dhcpv4-relay: optional string β€” the rate limiting meter for DHCPv4 relay packets (request/response) when the DHCPv4 Relay functionality is enabled.
  • external_ids: map of string-string pairs β€” see External IDs at the beginning of this document. πŸ‘‘

🌈 Logical_Switch TABLE 🌈

every row in here = one L2 logical switch. that's it, that's the row. πŸ’–

okay so there are two kinds of logical switches, and yes this matters: ones that fully virtualize the network (overlay logical switches) and ones that just give you simple connectivity to physical networks (bridged logical switches). πŸ¦‹

the way they behave is the same when they're providing connectivity between logical ports on the same chassis β€” but different when they're connecting remote logical ports. overlay logical switches connect remote logical ports by tunnels, while bridged logical switches give connectivity to remote ports by bridging the packets to directly connected physical L2 segments, with a little help from localnet ports. 🫢

and each bridged logical switch has one or more localnet ports, which have only one special address: unknown. slay.

✨ Summary: ✨

  • ports β€” set of Logical_Switch_Ports
  • load_balancer β€” set of weak reference to Load_Balancers
  • load_balancer_group β€” set of Load_Balancer_Groups
  • acls β€” set of ACLs
  • qos_rules β€” set of QoSes
  • dns_records β€” set of weak reference to DNSes
  • forwarding_groups β€” set of Forwarding_Groups

πŸŽ€ Naming:

  • name β€” string
  • external_ids : neutron:network_name β€” optional string

πŸŽ€ IP Address Assignment:

  • other_config : subnet β€” optional string
  • other_config : exclude_ips β€” optional string
  • other_config : ipv6_prefix β€” optional string
  • other_config : dhcp_relay_port β€” optional string
  • other_config : mac_only β€” optional string, either true or false
  • other_config : fdb_age_threshold β€” optional string, containing an integer, in range 0 to 4,294,967,295
  • other_config : ct-zone-limit β€” optional string, containing an integer, in range 0 to 4,294,967,295
  • other_config : enable-stateless-acl-with-lb β€” optional string, either true or false

πŸŽ€ EVPN Options:

  • other_config : dynamic-routing-vni β€” optional string, containing an integer, in range 0 to 16,777,215
  • other_config : dynamic-routing-bridge-ifname β€” optional string
  • other_config : dynamic-routing-vxlan-ifname β€” optional string
  • other_config : dynamic-routing-advertise-ifname β€” optional string
  • other_config : dynamic-routing-fdb-prefer-local β€” optional string, either true or false
  • other_config : dynamic-routing-redistribute β€” optional string

πŸŽ€ IP Multicast Snooping Options:

  • other_config : mcast_snoop β€” optional string, either true or false
  • other_config : mcast_querier β€” optional string, either true or false
  • other_config : mcast_flood_unregistered β€” optional string, either true or false
  • other_config : mcast_table_size β€” optional string, containing an integer, in range 1 to 32,766
  • other_config : mcast_idle_timeout β€” optional string, containing an integer, in range 15 to 3,600
  • other_config : mcast_query_interval β€” optional string, containing an integer, in range 1 to 3,600
  • other_config : mcast_query_max_response β€” optional string, containing an integer, in range 1 to 10
  • other_config : mcast_eth_src β€” optional string
  • other_config : mcast_ip4_src β€” optional string
  • other_config : mcast_ip6_src β€” optional string

πŸŽ€ Interconnection:

  • other_config : interconn-ts β€” optional string
  • other_config : ic-vxlan_mode β€” optional string, either true or false

πŸŽ€ Tunnel Key:

  • other_config : requested-tnl-key β€” optional string, containing an integer, in range 1 to 16,777,215

πŸŽ€ Common Columns:

  • copp β€” optional weak reference to Copp
  • external_ids β€” map of string-string pairs

πŸŽ€ Other options:

  • other_config : vlan-passthru β€” optional string, either true or false
  • other_config : broadcast-arps-to-all-routers β€” optional string, either true or false

πŸ” Details: πŸ”

  • ports: set of Logical_Switch_Ports β€” the logical ports connected to the logical switch. 🫢
⚠️ it is an error for multiple logical switches to include the same logical port. don't do that bestie.
  • load_balancer: set of weak reference to Load_Balancers β€” the set of load balancers associated with this logical switch.
  • load_balancer_group: set of Load_Balancer_Groups β€” the set of load balancers groups associated with this logical switch.
  • acls: set of ACLs β€” access control rules that apply to packets within the logical switch. πŸ’…
  • qos_rules: set of QoSes β€” QoS marking and metering rules that apply to packets within the logical switch.
  • dns_records: set of weak reference to DNSes β€” this column defines the DNS records to be used for resolving internal DNS queries within the logical switch, by the native DNS resolver. go look at the DNS table, bestie. ✨
  • forwarding_groups: set of Forwarding_Groups β€” groups a set of logical port endpoints for traffic going out of the logical switch.

πŸŽ€ Naming:

these columns are just names for the logical switch, okay? from OVN's perspective they have no special meaning or purpose other than being convenient for humans interacting with the database. there is no requirement for the name to be unique. (if you want a unique identifier for a logical switch, use its row UUID. that's the real one.) πŸ‘‘

fun little lore drop: originally name was meant to be the human-friendly name, but the Neutron integration used it to uniquely identify its own switch object, in the format neutron-uuid. then later Neutron started propagating the friendly name of a switch as external_ids:neutron:network_name. maybe this can be cleaned up someday. 😭

  • name: string β€” a name for the logical switch.
  • external_ids : neutron:network_name: optional string β€” another name for the logical switch.

πŸŽ€ IP Address Assignment:

these options control automatic IP address management (IPAM) for ports attached to the logical switch. 🌸

  • to enable IPAM for IPv4, set other_config:subnet and optionally other_config:exclude_ips.
  • to enable IPAM for IPv6, set other_config:ipv6_prefix.

IPv4 and IPv6 may be enabled together or separately. no drama. 🫢

to request dynamic address assignment for a particular port, use the dynamic keyword in the addresses column of that port's Logical_Switch_Port row. this requests both an IPv4 and an IPv6 address, if IPAM for IPv4 and IPv6 are both enabled. πŸ’–

  • other_config:subnet: optional string β€” set this to an IPv4 subnet (think 192.168.0.0/24 energy) and ovn-northd will hand out IP addresses inside it automatically. Auto-assign slay πŸ’…
  • other_config:exclude_ips: optional string β€” wanna keep some addys out of the auto-IP party? Set this to a list of IPv4 addresses or ..-delimited ranges to exclude. Every address or range you list should be a subset of whatever's in other_config:subnet.

Whether you list them or not, ovn-northd will never allocate the first or last address in a subnet β€” like 192.168.0.0 or 192.168.0.255 in 192.168.0.0/24. Those two are just not invited 🚫

Examples:

  • 192.168.0.2 192.168.0.10
  • 192.168.0.4 192.168.0.30..192.168.0.60 192.168.0.110..192.168.0.120
  • 192.168.0.110..192.168.0.120 192.168.0.25..192.168.0.30 192.168.0.144
  • other_config:ipv6_prefix: optional string β€” set this to an IPv6 prefix and ovn-northd will auto-assign IPv6 addresses using it. The assigned address gets generated from the IPv6 prefix plus the port's MAC address (converted into an IEEE EUI64 identifier). The prefix you define here has to be a valid IPv6 address ending with ::. it's giving EUI64 πŸ’«

Examples:

  • aef0::
  • bef0:1234:a890:5678::
  • 8230:5678::
  • other_config:dhcp_relay_port: optional string β€” if you set this to the name of a logical switch port of type router, then DHCP Relay is enabled for this logical switch β€” provided the matching Logical_Router_Port has DHCP Relay configured. Teamwork fr fr 🀝
  • other_config:mac_only: optional string, either true or false β€” the value used to request assigning an L2 address only, and only if neither subnet nor ipv6_prefix are specified.
  • other_config:fdb_age_threshold: optional string, containing an integer, in range 0 to 4,294,967,295 β€” FDB aging threshold value in seconds. Any FDB entry that outlives this timeout gets automatically removed 🧹 Defaults to 0, which means disabled.
  • other_config:ct-zone-limit: optional string, containing an integer, in range 0 to 4,294,967,295 β€” the CT zone limit value for this given Logical_Switch. When you set it, the value propagates to all Logical_Switch_Ports β€” but any individual Logical_Switch_Port can overwrite it. 0 means unlimited ♾️ When the option isn't present, no limit is set and the zone limit is derived from the OvS default datapath limit.
  • other_config:enable-stateless-acl-with-lb: optional string, either true or false β€” this one must be true for stateless ACL to work with load balancers. When it's enabled, packets carrying the ct.inv flag will not be dropped, even if use_ct_inv_match is set to true. Default: false.

✨ EVPN Options ✨

These options control the EVPN configuration of the logical switch. To turn on EVPN integration, set other_config:dynamic-routing-vni to a valid VNI number β€” that VNI represents the EVPN L2 domain extended by the logical switch. πŸ¦‹

  • other_config:dynamic-routing-vni: optional string, containing an integer, in range 0 to 16,777,215 β€” defines the VNI number associated with the EVPN domain the Logical_Switch is supposed to connect to.

For the config to be valid, all of these must also be provided: other_config:dynamic-routing-bridge-ifname, other_config:dynamic-routing-vxlan-ifname, other_config:dynamic-routing-advertise-ifname.

  • other_config:dynamic-routing-bridge-ifname: optional string β€” sets the interface name for the bridge used for EVPN integration. Only relevant if other_config:dynamic-routing-vni is set to a valid VNI.
  • other_config:dynamic-routing-vxlan-ifname: optional string β€” a list of interface names used for the vxlan devices used for EVPN integration. Only relevant if other_config:dynamic-routing-vni is set to a valid VNI.
  • other_config:dynamic-routing-advertise-ifname: optional string β€” sets the interface name for the advertise device used for EVPN integration. Only relevant if other_config:dynamic-routing-vni is set to a valid VNI.
  • other_config:dynamic-routing-fdb-prefer-local: optional string, either true or false β€” this defines the preference of FDB lookup. If true, OVN tries to find the FDB entry in the SB FDB table first, and only then tries to resolve the FDB via the ovn-controller local EVPN FDB cache. Defaults to false.

Only relevant if other_config:dynamic-routing-vni is set to a valid VNI.

  • other_config:dynamic-routing-redistribute: optional string β€” only relevant if other_config:dynamic-routing-vni is set to a valid VNI.

If fdb is specified, ovn-controller will advertise all workloads that are local to the chassis πŸ‘‘ This applies to VIFs, container ports, virtual ports, connected DGPs and connected GW routers. On top of that, dynamically learned FDB entries (from ports with unknown addresses) are also advertised. For VIF ports, only entries learned on the local chassis get advertised; for localnet ports, entries are advertised on all chassis where the datapath is local.

If ip is specified, ovn-controller will advertise all IPs/MACs bindings that are local to the chassis. This applies to VIFs and router ports.

If nat is specified, the external IP/MAC of any distributed dnat_and_snat NAT entry (a floating IP, for example) whose distributed gateway port is attached to this logical switch gets advertised as an EVPN Type-2 route, using the NAT's external_mac. This is independent of ip: enabling ip alone does not advertise floating IPs, and enabling nat alone does not advertise VIF or router-port addresses. This mirrors the nat token of options:dynamic-routing-redistribute, which advertises the same NAT entries as EVPN Type-5 routes.


🌈 IP Multicast Snooping Options 🌈

These options control the IP Multicast Snooping configuration of the logical switch. To enable IP Multicast Snooping, set other_config:mcast_snoop to true. To enable IP Multicast Querier, set other_config:mcast_querier to true. And if IP Multicast Querier is enabled, then other_config:mcast_eth_src and other_config:mcast_ip4_src must be set. No skipsies πŸ’–

  • other_config:mcast_snoop: optional string, either true or false β€” enables/disables IP Multicast Snooping on the logical switch. Default: false.
  • other_config:mcast_querier: optional string, either true or false β€” enables/disables IP Multicast Querier on the logical switch. Only applicable if other_config:mcast_snoop is enabled. Default: true.
  • other_config:mcast_flood_unregistered: optional string, either true or false β€” decides whether unregistered multicast traffic should be flooded or not. Only applicable if other_config:mcast_snoop is enabled. Default: false.
  • other_config:mcast_table_size: optional string, containing an integer, in range 1 to 32,766 β€” number of multicast groups to be stored. Default: 2048.
  • other_config:mcast_idle_timeout: optional string, containing an integer, in range 15 to 3,600 β€” configures the IP Multicast Snooping group idle timeout (in seconds). Default: 300 seconds ⏳
  • other_config:mcast_query_interval: optional string, containing an integer, in range 1 to 3,600 β€” configures the IP Multicast Querier interval between queries (in seconds). Default: other_config:mcast_idle_timeout / 2.
  • other_config:mcast_query_max_response: optional string, containing an integer, in range 1 to 10 β€” configures the value of the "max-response" field in the multicast queries originated by the logical switch. Default: 1 second.
  • other_config:mcast_eth_src: optional string β€” configures the source Ethernet address for queries originated by the logical switch.
  • other_config:mcast_ip4_src: optional string β€” configures the source IPv4 address for queries originated by the logical switch.
  • other_config:mcast_ip6_src: optional string β€” configures the source IPv6 address for queries originated by the logical switch.

🧚 Interconnection 🧚

  • other_config:interconn-ts: optional string β€” the name of the corresponding transit switch in the OVN_IC_Northbound database. This kind of logical switch is created and controlled by ovn-ic.
  • other_config:ic-vxlan_mode: optional string, either true or false β€” ic-vxlan_mode is set to true by ovn-ic when it runs VXLAN as the encapsulation protocol for cross-AZ traffic. Default value is false.

πŸ”‘ Tunnel Key πŸ”‘

  • other_config:requested-tnl-key: optional string, containing an integer, in range 1 to 16,777,215 β€” configures the datapath tunnel key for the logical switch. Usually you don't need this, because ovn-northd assigns a unique key for each datapath all by itself πŸ’β€β™€οΈ But if it is configured, ovn-northd honors the value you gave it. The typical use case is interconnection: tunnel keys for transit switches need to be unique globally, so they're maintained in the global OVN_IC_Southbound database, and ovn-ic simply syncs the value from OVN_IC_Southbound through this config.
  • copp: optional weak reference to Copp β€” the control plane protection policy from table Copp used for metering packets sent to ovn-controller from ports of this logical switch. πŸ›‘οΈ

πŸ’œ Other options πŸ’œ

  • other_config:vlan-passthru: optional string, either true or false β€” determines whether VLAN tagged incoming traffic should be allowed.
⚠️ Bestie, heads up: this may have security implications when enabled for a logical switch with a tag=0 localnet port. If it's not properly isolated from other localnet ports, fabric traffic that belongs to other tagged networks may get passed through such a port. Be careful out here πŸ™ˆ
  • other_config : broadcast-arps-to-all-routers β€” optional string, either true or false

Bestie, this one is a whole mood. It decides whether arp requests and ipv6 neighbor solicitations get blasted out to every router and every other switchport (that's the default, btw) or whether they only go to switchports where the ip/mac address is straight up unknown.

Setting it to false can significantly reduce the load if the logical switch can receive arp requests for ips it does not know about. Slay, less load. BUT β€” and this is the catch, no cap β€” setting this to false also means that garps are no longer forwarded to all routers and therefor the mac bindings of the routers are no longer updated. So you're trading traffic for stale bindings, choose wisely πŸ’€

Common Columns: πŸ’«

  • external_ids β€” map of string-string pairs

See External IDs at the beginning of this document. (iykyk, it's the same deal as everywhere else 🫢)


πŸ¦‹ Logical_Switch_Port TABLE πŸ¦‹

A port within an L2 logical switch. Like, one lil port, living its best life inside the switch. Main character energy fr.

✨ Summary: ✨

Core Features: πŸ’–

  • name β€” string (must be unique within table)
  • type β€” string

Options: πŸŽ€

  • options β€” map of string-string pairs

Options for router ports:

  • options : router-port β€” optional string
  • options : nat-addresses β€” optional string
  • options : exclude-lb-vips-from-garp β€” optional string
  • options : exclude-router-ips-from-garp β€” optional string
  • options : arp_proxy β€” optional string
  • options : enable_router_port_acl β€” optional string, either true or false
  • options : ct-zone-limit β€” optional string, containing an integer, in range 0 to 4,294,967,295
  • options : dynamic-routing-advertise β€” optional string

Options for localnet ports:

  • options : network_name β€” optional string
  • options : ethtype β€” optional string
  • options : localnet_learn_fdb β€” optional string, either true or false

Options for l2gateway ports:

  • options : network_name β€” optional string
  • options : l2gateway-chassis β€” optional string

Options for vtep ports:

  • options : vtep-physical-switch β€” optional string
  • options : vtep-logical-switch β€” optional string

VMI (or VIF) Options:

  • options : requested-chassis β€” optional string
  • options : requested-encap-ip β€” optional string
  • options : activation-strategy β€” optional string
  • options : iface-id-ver β€” optional string
  • options : qos_min_rate β€” optional string
  • options : qos_max_rate β€” optional string
  • options : qos_burst β€” optional string
  • options : hostname β€” optional string
  • options : force_fdb_lookup β€” optional string, either true or false
  • options : disable_garp_rarp β€” optional string, either true or false
  • options : pkt_clone_type β€” optional string, must be mc_unknown
  • options : disable_arp_nd_rsp β€” optional string, either true or false
  • options : lsp_learn_fdb β€” optional string, either true or false
  • options : receive_multicast β€” optional string, either true or false
  • options : is-nf β€” optional string, either true or false
  • options : nf-linked-port β€” optional string

VIF Plugging Options:

  • options : vif-plug-type β€” optional string
  • options : vif-plug-mtu-request β€” optional string

Virtual port Options:

  • options : virtual-ip β€” optional string
  • options : virtual-parents β€” optional string

IP Multicast Snooping Options:

  • options : mcast_flood β€” optional string, either true or false
  • options : mcast_flood_reports β€” optional string, either true or false

Containers: πŸ“

  • parent_name β€” optional string
  • tag_request β€” optional integer, in range 0 to 4,095
  • tag β€” optional integer, in range 1 to 4,095

Port State: πŸ”₯

  • up β€” optional boolean
  • enabled β€” optional boolean

Addressing: 🌸

  • addresses β€” set of strings
  • dynamic_addresses β€” optional string
  • port_security β€” set of strings

peer

  • peer β€” optional string

DHCP: πŸ’…

  • dhcpv4_options β€” optional weak reference to DHCP_Options
  • dhcpv6_options β€” optional weak reference to DHCP_Options

misc, but make it cute 🧚

  • mirror_rules β€” set of weak reference to Mirrors
  • health_checks β€” set of Logical_Switch_Port_Health_Checks
  • ha_chassis_group β€” optional HA_Chassis_Group

Naming: ✨

  • external_ids : neutron:port_name β€” optional string

Tunnel Key: πŸŽ€

  • options : requested-tnl-key β€” optional string, containing an integer, in range 1 to 32,767

Common Columns: πŸ’–

  • external_ids β€” map of string-string pairs

Details: πŸ”

Core Features: πŸ’–

  • name: string (must be unique within table)

The logical port name. Obviously.

For entities (VMs or containers) that are spawned in the hypervisor, the name used here must match those used in the external_ids:iface-id in the Open_vSwitch database's Interface table, because hypervisors use external_ids:iface-id as a lookup key to identify the network interface of that entity. It's giving matching-key energy, bestie β€” no match, no port.

For containers that share a VIF within a VM, the name can be any unique identifier. See Containers, below, for more information. (yes, that section is literally right up there πŸ‘†)

A logical switch port may not have the same name as a logical router port, but the database schema cannot enforce this. So it's a vibe rule, not a hard rule. The schema will NOT catch you. You've been warned πŸ™ˆ

  • type: string

Specify a type for this logical port. Logical ports can be used to model other types of connectivity into an OVN logical switch. The following types are defined:

  • (empty string)

A VM (or VIF) interface. The default, the classic, the icon.

  • router

A connection to a logical router. The value of options:router-port specifies the name of the Logical_Router_Port to which this logical switch port is connected.

  • switch

A connection to another logical switch. The value of peer specifies the name of the Logical_Switch_Port to which this logical switch port is connected. Such ports always have an implicit "unknown" address, because the address information is not leaked between directly connected switches. Gatekeeping the addresses, honestly valid.

  • localnet

A connection to a locally accessible network from ovn-controller instances that have a corresponding bridge mapping. A logical switch can have multiple localnet ports attached. This type is used to model direct connectivity to existing networks. In this case, each chassis should have a mapping for one of the physical networks only. Note: nothing said above implies that a chassis cannot be plugged to multiple physical networks as long as they belong to different switches.

  • localport

A connection to a local VIF. Traffic that arrives on a localport is never forwarded over a tunnel to another chassis. These ports are present on every chassis and have the same address in all of them. This is used to model connectivity to local services that run on every hypervisor. Everywhere at once, like a true legend.

  • l2gateway

A connection to a physical network.

  • vtep

A port to a logical switch on a VTEP gateway.

  • external

Represents a logical port which is external and not having an OVS port in the integration bridge. OVN will never receive any traffic from this port or send any traffic to this port. OVN can support native services like DHCPv4/DHCPv6/DNS for this port. If ha_chassis_group is defined, ovn-controller running in the active chassis of the HA chassis group will bind this port to provide these native services. It is expected that this port belong to a bridged logical switch (with a localnet port).

It is recommended to use the same HA chassis group for all the external ports of a logical switch. Otherwise, the physical switch might see MAC flap issue when different chassis provide the native services. For example when supporting native DHCPv4 service, DHCPv4 server mac (configured in options:server_mac column in table DHCP_Options) originating from different ports can cause MAC flap issue. The MAC of the logical router IP(s) can also flap if the same HA chassis group is not set for all the external ports of a logical switch. Consistency era or chaos era, pick one πŸ’€

Below are some of the use cases where external ports can be used.

  • VMs connected to SR-IOV nics - Traffic from these VMs by passes the kernel stack and local ovn-controller do not bind these ports and cannot serve the native services.
  • When CMS supports provisioning baremetal servers.
  • virtual

Represents a logical port which does not have an OVS port in the integration bridge and has a virtual ip configured in the options:virtual-ip column. This virtual ip can move around between the logical ports configured in the options:virtual-parents column. It travels. It roams. It's a nomad ip and we love her.

One of the use case where virtual ports can be used is.

  • The virtual ip represents a load balancer vip and the virtual parents provide load balancer service in an active-standby setup with the active virtual parent owning the virtual ip.
  • remote

A remote port is to model a port that resides remotely on another OVN, which is on the other side of a transit logical switch for OVN interconnection. This type of ports are created by ovn-ic instead of by CMS. Any change to the port will be automatically overwritten by ovn-ic. fr fr, don't bother editing it by hand, ovn-ic will just undo it πŸ™ˆ

Options:

options: map of string-string pairs β€” this column is where you drop key/value settings that are specific to the logical port type. The type-specific options are described individually below, so don't scroll away bestie πŸ’–


Options for router ports πŸ›°οΈβœ¨

These options apply when type is router.

  • options : router-port: optional string β€” Required. The name of the Logical_Router_Port to which this logical switch port is connected.
  • options : nat-addresses: optional string β€” This is used to send gratuitous ARPs for SNAT and DNAT IP addresses via the localnet port that is attached to the same logical switch as this type router port. This option is specified on a logical switch port that is connected to a gateway router, or a logical switch port that is connected to a distributed gateway port on a logical router. This must take one of the following forms:
    • router β€” Gratuitous ARPs will be sent for all SNAT and DNAT external IP addresses and for all load balancer IP addresses defined on the options:router-port’s logical router, using the options:router-port’s MAC address. This form of options:nat-addresses is valid for logical switch ports where options:router-port is the name of a port on a gateway router, or the name of a distributed gateway port. Supported only in OVN 2.8 and later. Earlier versions required NAT addresses to be manually synchronized.
    • Ethernet address followed by one or more IPv4 addresses β€” Example: 80:fa:5b:06:72:b7 158.36.44.22 158.36.44.24. This would result in generation of gratuitous ARPs for IP addresses 158.36.44.22 and 158.36.44.24 with a MAC address of 80:fa:5b:06:72:b7. This form of options:nat-addresses is only valid for logical switch ports where options:router-port is the name of a port on a gateway router.
  • options : exclude-lb-vips-from-garp: optional string β€” If options:nat-addresses is set to router, Gratuitous ARPs will be sent for all SNAT and DNAT external IP addresses defined on the options:router-port’s logical router, using the options:router-port’s MAC address, not considering configured load balancers.
  • options : exclude-router-ips-from-garp: optional string β€” If options:nat-addresses is set to router, Gratuitous ARPs will not be sent for router port IP addresses and SNAT IP addresses (if SNAT IP is same as the router port IP) defined on its peer router port. Do not set this option if the router port IPs are also used as SNAT and DNAT IPs.
  • options : arp_proxy: optional string β€” Optional. A list of MAC and addresses/cidrs or just addresses/cidrs that this logical switch router port will reply to ARP/NDP requests. Examples: 169.254.239.254 169.254.239.2, 0a:58:a9:fe:01:01 169.254.239.254 169.254.239.2 169.254.238.0/24, fd7b:6b4d:7b25:d22f::1 fd7b:6b4d:7b25:d22f::2, 0a:58:a9:fe:01:01 fd7b:6b4d:7b25:d22f::0/64. The options:router-port’s logical router should have a route to forward packets sent to configured proxy ARP MAC/IPs to an appropriate destination.
  • options : enable_router_port_acl: optional string, either true or false β€” Optional. Enable conntrack for the router port whose peer is l3dgw_port if set to true. The default value is false.
  • options : ct-zone-limit: optional string, containing an integer, in range 0 to 4,294,967,295 β€” CT zone limit value for given Logical_Switch_Port. This value has priority over limit specified on Logical_Switch when configured. The value 0 means unlimited. When the option is not present the limit is not set and the zone limit is derived from OvS default datapath limit.
  • options : dynamic-routing-advertise: optional string β€” If the CMS sets options:dynamic-routing-redistribute to connected-as-host, this parameter is used by the CMS to enable/disable the advertisement of the current host IP via the Advertised_Route table. Default: true.

Options for localnet ports πŸŒπŸ’«

These options apply when type is localnet.

  • options : network_name: optional string β€” Required. The name of the network to which the localnet port is connected. Each hypervisor, via ovn-controller, uses its local configuration to determine exactly how to connect to this locally accessible network, if at all.
  • options : ethtype: optional string β€” Optional. VLAN EtherType field value for encapsulating VLAN headers. Supported values: 802.1q (default), 802.1ad.
  • options : localnet_learn_fdb: optional string, either true or false β€” Optional. Allows localnet port to learn MACs and store them in FDB table if set to true. The default value is false.

Options for l2gateway ports πŸŒ‰πŸ¦‹

These options apply when type is l2gateway.

  • options : network_name: optional string β€” Required. The name of the network to which the l2gateway port is connected. The L2 gateway, via ovn-controller, uses its local configuration to determine exactly how to connect to this network.
  • options : l2gateway-chassis: optional string β€” Required. The chassis on which the l2gateway logical port should be bound to. ovn-controller running on the defined chassis will connect this logical port to the physical network.

Options for vtep ports πŸ§šπŸ’œ

These options apply when type is vtep.

  • options : vtep-physical-switch: optional string β€” Required. The name of the VTEP gateway.
  • options : vtep-logical-switch: optional string β€” Required. A logical switch name connected by the VTEP gateway.

VMI (or VIF) Options πŸ’…βœ¨

These options apply to logical ports with type having (empty string).

  • options : requested-chassis: optional string β€” If set, identifies a specific chassis (by name or hostname) that is allowed to bind this port. Using this option will prevent thrashing between two chassis trying to bind the same port during a live migration. It can also prevent similar thrashing due to a mis-configuration, if a port is accidentally created on more than one chassis. If set to a comma separated list, the first entry identifies the main chassis and the rest are one or more additional chassis that are allowed to bind the same port. When multiple chassis are set for the port, and the logical switch is connected to an external network through a localnet port, tunneling is enforced for the port to guarantee delivery of packets directed to the port to all its locations. This has MTU implications because the network used for tunneling must have MTU larger than localnet for stable connectivity. If the same host co-hosts more than one controller instance (either belonging to the same or separate clusters), special attention should be given to consistently using unique chassis names used in this option. It is advised that chassis names - and not host names - are used for this option.
  • options : requested-encap-ip: optional string β€” Requests the encapsulation IP address for the port binding. If set, ovn-northd uses this IP to select the Encap entry written to encap. This is intended for ports without a local OVS interface, e.g. remote transit switch ports in ovn-kubernetes interconnect mode.
  • options : activation-strategy: optional string β€” If used with multiple chassis set in requested-chassis, specifies an activation strategy for all additional chassis. By default, no activation strategy is used, meaning additional port locations are immediately available for use. The option supports a comma separated list where you can combine 3 protocols, "rarp", "garp" and "na". When any of the protocols is set, the port is blocked for ingress and egress communication until a specified protocol packet is sent from a new location. The activation strategy is useful in live migration scenarios for virtual machines.
  • options : iface-id-ver: optional string β€” If set, this port will be bound by ovn-controller only if this same key and value is configured in the external_ids column in the Open_vSwitch database’s Interface table.
  • options : qos_min_rate: optional string β€” If set, indicates the minimum guaranteed rate available for data sent from this interface, in bit/s.
  • options : qos_max_rate: optional string β€” If set, indicates the maximum rate for data sent from this interface, in bit/s. The traffic will be shaped according to this limit.
  • options : qos_burst: optional string β€” If set, indicates the maximum burst size for data sent from this interface, in bits.
  • options : hostname: optional string β€” If set, indicates the DHCPv4 option "Hostname" (option code 12) associated for this Logical Switch Port. If DHCPv4 is enabled for this Logical Switch Port, hostname dhcp option will be included in DHCP reply.
  • options : force_fdb_lookup: optional string, either true or false β€” This option is supported only if the Logical Switch Port is of default type (i.e. type set to empty_string) and also addresses column contains unknown. If set to true, MAC addresses (if configured) are not installed in the l2 lookup table but the MAC addresses are learnt and stored in the FDB table. The default value is false.
  • options : disable_garp_rarp: optional string, either true or false β€” If set to true, GARP and RARP announcements are not sent when a VIF port is created on a bridged logical switch. The default value is false.
  • options : pkt_clone_type: optional string, must be mc_unknown β€” If set to mc_unknown, packets going to this VIF get cloned to all unknown ports connected to the same Logical Switch.
  • options : disable_arp_nd_rsp: optional string, either true or false β€” If set to true, ARP/ND responder flows are not installed for the IP addresses configured on this logical port. Default: false.
  • options : lsp_learn_fdb: optional string, either true or false β€” If set to false, source MAC address is not learnt by FDB when packets are received on this port. The default value is true.
  • options : receive_multicast β€” optional string, either true or false. If you set this to false, multicast traffic is not forwarded to this port. The default value is true. πŸ’–
  • options : is-nf β€” optional string, either true or false. You <highkey>need</highkey> to set this to true for Network Function ports. These are the ports used as inport or outport in the Network_Function table. The default value is false. ✨
  • options : nf-linked-port β€” optional string. Each row in the Network_Function table refers to two logical switch ports under the columns inport and outport. The port identified as inport needs to have this option set to the port identified as outport, and vice-versa. πŸ”

VIF Plugging Options πŸ’…

  • options : vif-plug-type β€” optional string. If set, OVN will attempt to perform plugging of this VIF. In order to get this port plugged by the OVN controller, OVN must be built with support for VIF plugging. The default behavior is for the CMS to do the VIF plugging. Each VIF plug provider has their own options namespaced by name, for example "vif-plug:representor:key". Please refer to the VIF plug provider documentation located in Documentation/topics/vif-plug-providers/ for more information. 🫢
  • options : vif-plug-mtu-request β€” optional string. Requested MTU for plugged interfaces. When set, the OVN controller will fill the mtu_request column of the Open vSwitch database’s Interface table. This in turn will make OVS vswitchd update the MTU of the linked interface. 🌸

Virtual port Options πŸ‘‘

These options apply when type is virtual.

  • options : virtual-ip β€” optional string. This option represents the virtual IPv4 address. πŸ’œ
  • options : virtual-parents β€” optional string. This option represents a set of logical port names (within the same logical switch) which can own the virtual ip configured in the options:virtual-ip. All these virtual parents should add the virtual ip in the port_security if port security addressed are enabled. πŸŽ€

IP Multicast Snooping Options 🌈

These options apply when the port is part of a logical switch which has other_config :mcast_snoop set to true.

  • options : mcast_flood β€” optional string, either true or false. If set to true, multicast packets (except reports) are unconditionally forwarded to the specific port. Default: false. πŸ”₯
  • options : mcast_flood_reports β€” optional string, either true or false. If set to true, multicast reports are unconditionally forwarded to the specific port. Default: false. πŸ”₯

Containers 🧚

Bestie, real talk: when a large number of containers are nested within a VM, it may be too expensive to dedicate a VIF to each container. OVN can use VLAN tags to support such cases. Each container is assigned a VLAN ID and each packet that passes between the hypervisor and the VM is tagged with the appropriate ID for the container. Such VLAN IDs never appear on a physical wire, even inside a tunnel, so they need not be unique except relative to a single VM on a hypervisor. πŸ’€

These columns are used for VIFs that represent nested containers using shared VIFs. For VMs and for containers that have dedicated VIFs, they are empty.

  • parent_name β€” optional string. The VM interface through which the nested container sends its network traffic. This must match the name column for some other Logical_Switch_Port. Note: for performance of the OVN Southbound database conditional monitoring, unlike for regular VIFs, ovn-controller will register to get updates about all OVN Southbound database Port_Binding table records that correspond to nested container ports even if external_ids:ovn-monitor-all is set to false. See ovn-controller(8) for more information. πŸ¦‹
  • tag_request β€” optional integer, in range 0 to 4,095. The VLAN tag in the network traffic associated with a container’s network interface. The client can request ovn-northd to allocate a tag that is unique within the scope of a specific parent (specified in parent_name) by setting a value of 0 in this column. The allocated value is written by ovn-northd in the tag column. (Note that these tags are allocated and managed locally in ovn-northd, so they cannot be reconstructed in the event that the database is lost.) The client can also request a specific non-zero tag and ovn-northd will honor it and copy that value to the tag column. ✨

When type is set to localnet or l2gateway, this can be set to indicate that the port represents a connection to a specific VLAN on a locally accessible network. The VLAN ID is used to match incoming traffic and is also added to outgoing traffic. πŸ’–

  • tag β€” optional integer, in range 1 to 4,095. The VLAN tag allocated by ovn-northd based on the contents of the tag_request column. πŸŽ€

Port State πŸ’…

  • up β€” optional boolean. This column is populated by ovn-northd, rather than by the CMS plugin as is most of this database. When a logical port is bound to a physical location in the OVN Southbound database Binding table, ovn-northd sets this column to true; otherwise, or if the port becomes unbound later, it sets it to false. If this column is empty, the port is not considered up. This allows the CMS to wait for a VM’s (or container’s) networking to become active before it allows the VM (or container) to start. 😭

Logical ports of router type are an exception to this rule. They are considered to be always up, that is this column is always set to true. πŸ‘‘

  • enabled β€” optional boolean. This column is used to administratively set port state. If this column is empty or is set to true, the port is enabled. If this column is set to false, the port is disabled. A disabled port has all ingress and egress traffic dropped. πŸ’€

Addressing 🌸

  • addresses β€” set of strings. Addresses owned by the logical port. Each element in the set must take one of the following forms:
    • Ethernet address followed by zero or more IPv4 or IPv6 addresses (or both) β€” An Ethernet address defined is owned by the logical port. Like a physical Ethernet NIC, a logical port ordinarily has a single fixed Ethernet address. When an OVN logical switch processes a unicast Ethernet frame whose destination MAC address is in a logical port’s addresses column, it delivers it only to that port, as if a MAC learning process had learned that MAC address on the port. If IPv4 or IPv6 address(es) (or both) are defined, it indicates that the logical port owns the given IP addresses. If IPv4 address(es) are defined, the OVN logical switch uses this information to synthesize responses to ARP requests without traversing the physical network. The OVN logical router connected to the logical switch, if any, uses this information to avoid issuing ARP requests for logical switch ports. Note that the order here is important. The Ethernet address must be listed before the IP address(es) if defined. Examples:
80:fa:5b:06:72:b7
80:fa:5b:06:72:b7 10.0.0.4 20.0.0.4
80:fa:5b:06:72:b7 fdaa:15f2:72cf:0:f816:3eff:fe20:3f41
80:fa:5b:06:72:b7 10.0.0.4 fdaa:15f2:72cf:0:f816:3eff:fe20:3f41
  • 80:fa:5b:06:72:b7 β€” This indicates that the logical port owns the above mac address. πŸ’œ
  • 80:fa:5b:06:72:b7 10.0.0.4 20.0.0.4 β€” This indicates that the logical port owns the mac address and two IPv4 addresses. πŸ’œ
  • 80:fa:5b:06:72:b7 fdaa:15f2:72cf:0:f816:3eff:fe20:3f41 β€” This indicates that the logical port owns the mac address and 1 IPv6 address. πŸ’œ
  • 80:fa:5b:06:72:b7 10.0.0.4 fdaa:15f2:72cf:0:f816:3eff:fe20:3f41 β€” This indicates that the logical port owns the mac address and 1 IPv4 address and 1 IPv6 address. πŸ’œ
  • unknown β€” This indicates that the logical port has an unknown set of Ethernet addresses. When an OVN logical switch processes a unicast Ethernet frame whose destination MAC address is not in any logical port’s addresses column, it delivers it to the port (or ports) whose addresses columns include unknown. When unknown is present, FDB learning is enabled for this port: source MACs are recorded via put_fdb and destination MACs are resolved via get_fdb. For ARP packets, the sender hardware address is also learned. For IPv6 Neighbor Advertisements, the target link-layer address is learned; for Neighbor Solicitations, the source link-layer address is learned. πŸ¦‹
  • dynamic β€” Use dynamic to make ovn-northd generate a globally unique MAC address, choose an unused IPv4 address with the logical port’s subnet (if other_config:subnet is set in the port’s Logical_Switch), and generate an IPv6 address from the MAC address (if other_config:ipv6_prefix is set in the port’s Logical_Switch) and store them in the port’s dynamic_addresses column. Only one element containing dynamic may appear in addresses. ✨
  • dynamic ip
  • dynamic ipv6
  • dynamic ip ipv6

These act like dynamic alone but specify particular IPv4 or IPv6 addresses to use. OVN IPAM will still automatically allocate the other address if configured appropriately. Example: dynamic 192.168.0.1 2001::1. πŸ”₯

  • mac dynamic β€” This acts like dynamic alone but specifies a particular MAC address to use. OVN IPAM will still automatically allocate IPv4 or IPv6 addresses, or both, if configured appropriately. Example: 80:fa:5b:06:72:b7 dynamic πŸŽ€
  • router β€” Accepted only when type is router. This indicates that the Ethernet, IPv4, and IPv6 addresses for this logical switch port should be obtained from the connected logical router port, as specified by router-port in options. The resulting addresses are used to populate the logical switch’s destination lookup, and also for the logical switch to generate ARP and ND replies. πŸ‘‘

Also, bestie, if the connected logical router port has a distributed gateway port specified and the logical router has rules specified in nat with external_mac, then those addresses get used to populate the switch's destination lookup too. ✨

Supported only in OVN 2.7 and later. Earlier versions required router addresses to be manually synchronized. (iykyk, the old way was a whole situation πŸ’€)

🌸 dynamic_addresses: optional string 🌸

These are the addresses that ovn-northd assigns to the logical port, if dynamic is specified in addresses. The addresses will be in the same format as the ones that populate the addresses column. Heads up though: dynamically assigned addresses are constructed and managed locally in ovn-northd, so if the database gets lost, they literally cannot be reconstructed. 🫠

πŸ’… port_security: set of strings πŸ’…

This column is the bouncer for your port β€” it controls the addresses from which the host attached to the logical port (``the host'') is allowed to send packets, and to which it's allowed to receive packets. If this column is empty, then all addresses are permitted. Free-for-all, no cap. πŸ™ˆ

Every element in the set must begin with one Ethernet address. That restricts the host to sending packets from and receiving packets to the Ethernet addresses defined in the logical port's port_security column. It also restricts the inner source MAC addresses the host may send in ARP and IPv6 Neighbor Discovery packets. But good news: the host is always allowed to receive packets to multicast and broadcast Ethernet addresses. πŸ‘‘

Each element in the set may additionally contain one or more IPv4 or IPv6 addresses (or both), with optional masks. If a mask is given, it must be a CIDR mask. On top of the restrictions described above for Ethernet addresses, an element like this restricts the IPv4 or IPv6 addresses from which the host may send and to which it may receive packets to the specified addresses. A masked address, if the host part is zero, means the host is allowed to use any address in the subnet; if the host part is nonzero, the mask just indicates the size of the subnet. And in addition:

  • If any IPv4 address is given, the host is also allowed to receive packets to the IPv4 local broadcast address 255.255.255.255 and to IPv4 multicast addresses (224.0.0.0/4). If an IPv4 address with a mask is given, the host is also allowed to receive packets to the broadcast address in that specified subnet. Also, if any IPv4 address is given, the host is additionally restricted to sending ARP packets with the specified source IPv4 address. (RARP is not restricted. 😌)
  • If any IPv6 address is given, the host is also allowed to receive packets to IPv6 multicast addresses (ff00::/8). Also, if any IPv6 address is given, the host is additionally restricted to sending IPv6 Neighbor Discovery Solicitation or Advertisement packets with the specified source address or, for solicitations, the unspecified address.

If an element includes an IPv4 address but no IPv6 addresses, then IPv6 traffic is not allowed. If an element includes an IPv6 address but no IPv4 address, then IPv4 and ARP traffic is not allowed. Pick a lane, bestie. 🚫

This column uses the same lexical syntax as the match column in the OVN Southbound database's Pipeline table. Multiple addresses within an element may be space or comma separated.

Each element in the set also supports the special prefix "VRRPv3", which allows specification of a single physical MAC and multiple VRRPv3 MAC addresses. Just like for non-VRRPv3 entries, multiple IP addresses can be associated with the specified MACs. "VRRPv3" with a single physical MAC translates to allowing traffic for the whole "VRRPv3" range of MACs. See more in the examples. πŸ‘‡

When the port security configuration entry contains the VRRPv3 label, the behavior for physical MAC (the first specified) is different. The installed flows will allow traffic from/to VRRP MACs + IPs. The physical MAC is there to properly allow ARP/ND with the given VRRP MACs. To allow traffic that is not related to the virtual router β€” e.g., IP traffic with a physical MAC as a source β€” a regular port security entry should be added separately. Don't skip that part, fr fr.

This column is provided as a convenience to cloud management systems, but all of the features that it implements can be implemented as ACLs using the ACL table. πŸŽ€

Examples:

  • 80:fa:5b:06:72:b7 β€” The host may send traffic from and receive traffic to the specified MAC address, and receive traffic to Ethernet multicast and broadcast addresses, but not otherwise. The host may not send ARP or IPv6 Neighbor Discovery packets with inner source Ethernet addresses other than the one specified.
  • 80:fa:5b:06:72:b7 192.168.1.10/24 β€” This adds further restrictions to the first example. The host may send IPv4 packets from or receive IPv4 packets to only 192.168.1.10, except that it may also receive IPv4 packets to 192.168.1.255 (based on the subnet mask), 255.255.255.255, and any address in 224.0.0.0/4. The host may not send ARPs with a source Ethernet address other than 80:fa:5b:06:72:b7 or source IPv4 address other than 192.168.1.10. The host may not send or receive any IPv6 (including IPv6 Neighbor Discovery) traffic.
  • "80:fa:5b:12:42:ba", "80:fa:5b:06:72:b7 192.168.1.10/24" β€” The host may send traffic from and receive traffic to the specified MAC addresses, and receive traffic to Ethernet multicast and broadcast addresses, but not otherwise. With MAC 80:fa:5b:12:42:ba, the host may send traffic from and receive traffic to any L3 address. With MAC 80:fa:5b:06:72:b7, the host may send IPv4 packets from or receive IPv4 packets to only 192.168.1.10, except that it may also receive IPv4 packets to 192.168.1.255 (based on the subnet mask), 255.255.255.255, and any address in 224.0.0.0/4. The host may not send or receive any IPv6 (including IPv6 Neighbor Discovery) traffic.
  • "VRRPv3 <PHYSICAL_MAC>" β€” The host may send ARP/ND packets with physical MAC as a source and any of the VRRPv3 MACs as inner SHA/TLL/SLL β€” 00:00:5e:00:01:00/40 for IPv4 and 00:00:5e:00:02:00/40 for IPv6. It may also send or receive any traffic with any of the VRRPv3 MAC addresses as a source or destination. But not with the physical MAC address. 🚫
  • "VRRPv3 <PHYSICAL_MAC> <VRRPV3_MACv4_1>/[<MASK1>] <VRRPV3_MACv4_N> <VRRPV3_MACv6_1>/[<MASK2>] <VRRPV3_MACv6_N>" β€” Same as the previous example, but the allowed VRRPv3 MAC addresses are limited to the specified ones. The specified VRRPv3 MAC addresses must have a correct prefix β€” 00:00:5e:00:01 for IPv4 and 00:00:5e:00:02 for IPv6. VRRPv3 MACs can be provided with a mask with a prefix between /40 and /48.
  • "VRRPv3 <PHYSICAL_MAC> <VRRPV3_MACv4_1>/[<MASK1>] <VRRPV3_MACv4_N> <VRRPV3_MACv6_1>/[<MASK2>] <VRRPV3_MACv6_N> <VRRPV3_IPv4_1>/[<MASK1>] <VRRPV3_IPv4_N> <VRRPV3_IPv6_1>/[<MASK2>] <VRRPV3_IPv6_N>" β€” The same as the previous example, but the provided IP addresses further restrict the inner IP for ARP/ND. As well as IP/IPv6 traffic to/from the given VRRPv3 MACs. The IP address format is the same as for the regular port security entry.

πŸ¦‹ peer: optional string πŸ¦‹

For a switch port used to connect two logical switches, this identifies the other switch port in the pair by name. πŸ”—

For a switch port attached to a logical router, this column is empty.


✨ DHCP ✨

πŸŽ€ dhcpv4_options: optional weak reference to DHCP_Options πŸŽ€

This column defines the DHCPv4 Options to be included by the ovn-controller when it replies to the DHCPv4 requests. Please see the DHCP_Options table.

πŸŽ€ dhcpv6_options: optional weak reference to DHCP_Options πŸŽ€

This column defines the DHCPv6 Options to be included by the ovn-controller when it replies to the DHCPv6 requests. Please see the DHCP_Options table.

πŸ’œ mirror_rules: set of weak reference to Mirrors πŸ’œ

Mirror rules that apply to the logical switch port which is the source. Please see the Mirror table.

πŸ’œ health_checks: set of Logical_Switch_Port_Health_Checks πŸ’œ

Health checks configuration for this logical switch port. Please see the Logical_Switch_Port_Health_Check table.

πŸ’œ ha_chassis_group: optional HA_Chassis_Group πŸ’œ

References a row in the OVN Northbound database's HA_Chassis_Group table. It indicates the HA chassis group to use if the type is set to external. If type is not external, this column is ignored. πŸ‘€


🌈 Naming 🌈

⭐ external_ids : neutron:port_name: optional string ⭐

This column gives an optional human-friendly name for the port. This name has no special meaning or purpose other than to provide convenience for human interaction with the northbound database. 🫢

Neutron copies this from its own port object's name. (Neutron ports do are not assigned human-friendly names by default, so it will often be empty.) Yeah, that grammar is in the original, we're keeping it, no cap.


πŸ”‘ Tunnel Key πŸ”‘

πŸ‘‘ options : requested-tnl-key: optional string, containing an integer, in range 1 to 32,767 πŸ‘‘

Configures the port binding tunnel key for the port. Usually this is not needed, because ovn-northd will assign a unique key for each port by itself. However, if it is configured, ovn-northd honors the configured value. The typical use case is for interconnection: the tunnel keys for ports on transit switches need to be unique globally, so they are maintained in the global OVN_IC_Southbound database, and ovn-ic simply syncs the value from OVN_IC_Southbound through this config. 🌍


πŸ’– Common Columns πŸ’–

🌸 external_ids: map of string-string pairs 🌸

See External IDs at the beginning of this document. πŸ“Ž

…and bestie, ovn-northd takes every single one of those little pairs and copies them right into the external_ids column of the Port_Binding table over in the OVN_Southbound database. That's the whole glow-up. ✨


🩺 Logical_Switch_Port_Health_Check TABLE πŸ’–

Okay so every row in here is one health check config for a logical switch port. What are health checks even for? They monitor reachability and health of backend endpoints that are attached to a logical switch port. And you can set them up to use different protocols β€” TCP, UDP, or ICMP β€” to verify that a target IP address is actually available. No cap. 🫢

πŸ“‹ Summary

  • protocol β€” string, one of icmp, tcp, or udp
  • src_ip β€” string
  • port β€” integer, in range 0 to 65,535
  • address β€” string
  • status β€” optional string, one of error, offline, or online
  • options : interval β€” optional string, containing an integer
  • options : timeout β€” optional string, containing an integer
  • options : success_count β€” optional string, containing an integer
  • options : failure_count β€” optional string, containing an integer

πŸ” Details

  • protocol: string, one of icmp, tcp, or udp β€” the valid protocols are tcp, udp, or icmp. And listen: for the tcp and udp protocols, destination port must be specified. It's giving mandatory, fr fr. πŸ’…
  • src_ip: string β€” the source IP address used when sending out those health check probes. That's the address the checks go out from. 🌸
  • port: integer, in range 0 to 65,535 β€” the destination port number for TCP and UDP health checks. Range is literally 0 to 65,535, don't push it. πŸŽ€
  • address: string β€” the IP address to monitor for the health check. The one we're checking on. πŸ‘‘
  • status: optional string, one of error, offline, or online β€” this is the health status, synchronized from the status field of the corresponding service monitor in the SBDB. It tells you the current availability of the logical switch port so the CMS can figure out service virtual machine health and make routing or failover decisions. Main character status column, honestly. 🌈
  • options : interval: optional string, containing an integer β€” the interval, in seconds, between service monitor checks. Tick tock. ⏰
  • options : timeout: optional string, containing an integer β€” the time, in seconds, after which the service monitor check times out. If it's taking too long, we're out. 😭
  • options : success_count: optional string, containing an integer β€” the number of successful checks after which the service is considered online. ✨
  • options : failure_count: optional string, containing an integer β€” the number of failure checks after which the service is considered offline. πŸ’€

πŸ¦‹ Forwarding_Group TABLE 🌸

Each row represents one forwarding group. One row, one group, simple as. πŸ’–

πŸ“‹ Summary

  • name β€” string
  • vip β€” string
  • vmac β€” string
  • liveness β€” boolean
  • child_port β€” set of 1 or more strings
  • Common Columns:
    • external_ids β€” map of string-string pairs

πŸ” Details

  • name: string β€” a name for the forwarding group. And bestie, this name has no special meaning or purpose other than to make life convenient for humans interacting with the ovn-nb database. It's just a vibe label. 🏷️
  • vip: string β€” the virtual IP address assigned to the forwarding group. The way that it works: it will respond with vmac when an ARP request is sent for vip. Iconic behaviour. πŸ‘‘
  • vmac: string β€” the virtual MAC address assigned to the forwarding group. The other half of the duo. πŸ’«
  • liveness: boolean β€” if set to true, liveness is enabled for child ports; otherwise it is disabled. Toggle it, bestie. 🎚️
  • child_port: set of 1 or more strings β€” the list of child ports in the forwarding group. All the little ones. 🫢

πŸ’– Common Columns

  • external_ids: map of string-string pairs β€” See External IDs at the beginning of this document.

πŸŽ€ Address_Set TABLE ✨

Each row in this table is a named set of addresses. And these address sets can contain Ethernet, IPv4, or IPv6 addresses, with optional bitwise or CIDR masks. The whole point? An address set may ultimately be used in ACLs to compare against fields like ip4.src or ip6.src. One important thing though: a single address set must contain addresses of the same type. No mixing, bestie, that's the rule. πŸ’…

As an example, this would create an address set with three IP addresses:

ovn-nbctl create Address_Set name=set1 addresses=’10.0.0.1 10.0.0.2 10.0.0.3’

Address sets may be used in the match column of the ACL table. For syntax info, go check the details of the expression language used for the match column in the Logical_Flow table of the OVN_Southbound database. πŸ“–

πŸ“‹ Summary

  • name β€” string (must be unique within table)
  • addresses β€” set of strings
  • options β€” map of string-string pairs
  • options : ic-adv β€” optional string
  • Common Columns:
    • external_ids β€” map of string-string pairs

πŸ” Details

  • name: string (must be unique within table) β€” a name for the address set. Names are ASCII and must match [a-zA-Z_.][a-zA-Z_.0-9]*. Yes it's a regex, yes you need to follow it. 😀
  • addresses: set of strings β€” the set of addresses in string form. Just the addresses, chilling. 🌸
  • options: map of string-string pairs β€” this column provides general key/value settings. The supported options are described individually below. ✨
  • options : ic-adv: optional string β€” a boolean value that enables advertisement of this Address_Set to the global OVN_IC_Southbound database. Default is false. Off by default, no cap. πŸŽ€

πŸ’– Common Columns

  • external_ids: map of string-string pairs β€” See External IDs at the beginning of this document.

πŸ‘‘ Port_Group TABLE 🫢

Each row in this table represents a named group of logical switch ports. Group chat, but for ports. πŸ’–

Port groups may be used in the match column of the ACL table. For syntax info, see the details of the expression language used for the match column in the Logical_Flow table of the OVN_Southbound database.

And here's the tea: for each port group, there are two address sets generated to the Address_Set table of the OVN_Southbound database, containing the IP addresses of the group of ports β€” one for IPv4, and the other for IPv6. The names are the name of the Port_Group followed by a suffix: _ip4 for IPv4 and _ip6 for IPv6. These generated address sets can be used in the same way as regular address sets in the match column of the ACL table. For syntax info, see the details of the expression language used for the match column in the Logical_Flow table of the OVN_Southbound database. πŸ”

πŸ“‹ Summary

  • name β€” string (must be unique within table)
  • ports β€” set of weak reference to Logical_Switch_Ports
  • acls β€” set of ACLs
  • Common Columns:
    • external_ids β€” map of string-string pairs

πŸ” Details

  • name: string (must be unique within table) β€” a name for the port group. Names are ASCII and must match [a-zA-Z_.][a-zA-Z_.0-9]*. Same rule as address sets, bestie. πŸ“
  • ports: set of weak reference to Logical_Switch_Ports β€” the logical switch ports belonging to the group, in uuids. πŸ†”
  • acls: set of ACLs β€” access control rules that apply to the port group. And get this: applying an ACL to a port group has the same effect as applying the ACL to all logical lswitches that the ports of the port group belong to. Two birds, one stone, slay. πŸ”₯

πŸ’– Common Columns

  • external_ids: map of string-string pairs β€” See External IDs at the beginning of this document.

⭐ Load_Balancer TABLE 🌈

Each row represents one load balancer. Big main character energy for the whole network. πŸ‘‘

πŸ“‹ Summary

  • name β€” string
  • vips β€” map of string-string pairs
  • protocol β€” optional string, one of sctp, tcp, or udp
  • Health Checks:
    • health_check β€” set of Load_Balancer_Health_Checks
    • ip_port_mappings β€” map of string-string pairs
  • selection_fields β€” set of strings, one of eth_dst, eth_src, ip_dst, ip_src, ipv6_dst, ipv6_src, tp_dst, or tp_src
  • Common Columns:
    • external_ids β€” map of string-string pairs
  • Load_Balancer options:
    • options : reject β€” optional string, either true or false
    • options : hairpin_snat_ip β€” optional string
    • options : skip_snat β€” optional string
    • options : add_route β€” optional string
    • options : neighbor_responder β€” optional string
    • options : template β€” optional string
    • options : address-family β€” optional string
    • options : affinity_timeout β€” optional string
    • options : ct_flush β€” optional string, either true or false
    • options : use_stateless_nat β€” optional string, either true or false
    • options : distributed β€” optional string
    • options : event β€” optional string, either true or false
    • options : dynamic-routing-advertise β€” optional string

πŸ” Details

  • name: string β€” a name for the load balancer. Same situation as the forwarding group: this name has no special meaning or purpose other than to make human interaction with the ovn-nb database more convenient. It's just for the vibes. πŸŽ€
  • vips: map of string-string pairs β€” okay so this is a map of virtual IP addresses (and an optional port number with : as a separator) associated with this load balancer, and their corresponding endpoint IP addresses (and optional port numbers with : as separators) separated by commas. If the destination IP address (and port number) of a packet leaving a container or a VM matches the virtual IP address (and port number) provided here as a key, then OVN will statefully replace the destination IP address by one of the provided IP address (and port number) in this map as a value. IPv4 and IPv6 addresses are both supported for load balancing; however, a VIP of one address family may not be mapped to a destination IP address of a different family. And if you're specifying an IPv6 address with a port, the address portion must be enclosed in square brackets. Examples for keys are "192.168.1.4" and "[fd0f::1]:8800". Examples for value are "10.0.0.1, 10.0.0.2" and "20.0.0.10:8800, 20.0.0.11:8800". πŸ’…

When the Load_Balancer is added to the logical_switch, the VIP has to be in a different subnet than the one used for the logical_switch. And since the VIP is in a different subnet, you should connect your logical switch to either an OVN logical router or a real router. Why? Because the client can now send a packet with the VIP as the destination IP address and the router's mac address as the destination MAC address. That's just how it works, bestie. 🫢

  • protocol: optional string, one of sctp, tcp, or udp β€” valid protocols are tcp, udp, or sctp. This column is useful when a port number is provided as part of the vips column. And listen: if this column is empty and a port number is provided as part of the vips column, OVN just assumes the protocol to be tcp. Default behaviour, periodt. ✨

🩺 Health Checks

OVN supports health checks for load balancer endpoints, bestie πŸ’–. When health checks are enabled, the load balancer uses only healthy endpoints. That's it, that's the whole vibe.

Say vips contains a key-value pair like 10.0.0.10:80=10.0.0.4:8080,20.0.0.4:8080. To turn on health checks for this virtual's endpoints, you add two key-value pairs to ip_port_mappings, with keys 10.0.0.4 and 20.0.0.4, and you add to health_check a reference to a Load_Balancer_Health_Check row whose vip is set to 10.0.0.10. Same approach works for IPv6 too, no cap πŸ¦‹.


  • health_check: set of Load_Balancer_Health_Checks β€” load balancer health checks associated with this load balancer. The besties it's keeping an eye on πŸ‘€.
  • ip_port_mappings: map of string-string pairs β€” maps from endpoint IP to a colon-separated pair of logical port name and source IP, like port_name:source_ip for IPv4. Health checks get sent to this port with the specified source IP. For IPv6 you must put square brackets around the IP address, e.g: port_name:[source_ip]. The source IP must be from the subnet of the monitored endpoint. It can be either an unused IP from the subnet, or an IP of one of the Logical Router Ports connected to the same switch. Remote endpoint: specify :target_zone_name at the end of the above syntax to create remote health checks in a specific zone. For distributed load balancers, ip_port_mappings is required (no skipping, bestie 😀). In the absence of health checks, source_ip is optional.

For example, in the example above, IP to port mappings might be defined as 10.0.0.4=sw0-p1:10.0.0.2 and 20.0.0.4=sw1-p1:20.0.0.2, if the values given were suitable ports and IP addresses. And remote endpoint: 10.0.0.4=sw0-p1:10.0.0.2:az1, where sw0-p1 is a logical port in az1.

For IPv6, IP to port mappings might be defined as [2001::1]=sw0-p1:[2002::1]. Remote endpoint: same as for IP.

  • selection_fields: set of strings, one of eth_dst, eth_src, ip_dst, ip_src, ipv6_dst, ipv6_src, tp_dst, or tp_src β€” OVN native load balancers are supported using the OpenFlow groups of type select. OVS supports two selection methods: dp_hash and hash (with optional fields specified) in selecting the buckets of a group. Please see the OVS documentation (man ovs-ofctl) for more details on the selection methods. Each endpoint IP (and port if set) is mapped to a bucket in the group flow.

CMS can choose the hash selection method by setting the selection fields in this column. ovs-vswitchd uses the specified fields in generating the hash.

Example: {ip_proto,ip_src,ip_dst} for a 3-tuple match. Example: {ip_proto,ipv6_src,ipv6_dst} for an IPv6 match. Example: {ip_proto,ip_src,ip_dst,tp_src,tp_dst}. Example: {ip_src,ip_dst,ipv6_src,ipv6_dst,tp_src,tp_dst}.

The dp_hash selection method uses the assistance of datapath to calculate the hash and it is expected to be faster than the hash selection method. So CMS should take this into consideration before using the hash method. Please consult the OVS documentation and OVS sources for the implementation details. iykyk ✨


✨ Common Columns ✨

  • external_ids: map of string-string pairs β€” See External IDs at the beginning of this document. (Yes, it's a lil callback moment 🫢)

πŸŽ€ Load_Balancer options πŸŽ€

  • options : reject: optional string, either true or false β€” if the load balancer is created with --reject option and it has no active backends, a TCP reset segment (for tcp) or an ICMP port unreachable packet (for all other kind of traffic) will be sent whenever an incoming packet is received for this load-balancer. Please note using --reject option will disable empty_lb SB controller event for this load balancer. So pick your fighter, bestie πŸ’…
  • options : hairpin_snat_ip: optional string β€” IP to be used as source IP for packets that have been hair-pinned after load balancing. The default behavior when the option is not set is to use the load balancer VIP as source IP. This option may have exactly one IPv4 and/or one IPv6 address on it, separated by a space character.
  • options : skip_snat: optional string β€” if the load balancing rule is configured with skip_snat option, the lb_force_snat_ip option configured for the logical router that references this load balancer will not be applied for this load balancer. It's giving "not today" πŸ™ˆ
  • options : add_route: optional string β€” if set to true, then neighbor routers will have logical flows added that will allow for routing to the VIP IP. It also will have ARP resolution logical flows added. By setting this option, it means there is no reason to create a Logical_Router_Static_Route from neighbor routers to this NAT address. It also means that no ARP request is required for neighbor routers to learn the IP-MAC mapping for this VIP IP. For more information about what flows are added for IP routes, please see the ovn-northd manpage section on IP Routing. πŸ‘‘
  • options : neighbor_responder: optional string β€” if set to all, then routers on which the load balancer is applied reply to ARP/neighbor discovery requests for all VIPs of the load balancer. If set to reachable, then routers on which the load balancer is applied reply to ARP/neighbor discovery requests only for VIPs that are part of a router's subnet. If set to none, then routers on which the load balancer is applied never reply to ARP/neighbor discovery requests for any of the load balancer VIPs. Load balancers with options:template=true do not support reachable as a valid mode. The default value of this option, if not specified, is reachable for regular load balancers and none for template load balancers. Cute lil defaults, fr fr 🌸
  • options : template: optional string β€” option to be set to true, if the load balancer is a template. The load balancer VIPs and backends must be using Chassis_Template_Var in their definitions.

Load balancer template VIP supported formats are:

^VIP_VAR[:^PORT_VAR|:port]

where VIP_VAR and PORT_VAR are keys of the Chassis_Template_Var variables records.

Note: The VIP and PORT cannot be combined into a single template variable. For example, a Chassis_Template_Var variable expanding to 10.0.0.1:8080 is not valid if used as VIP.

Load balancer template backend supported formats are:

^BACKEND_VAR1[:^PORT_VAR1|:port],^BACKEND_VAR2[:^PORT_VAR2|:port]

or

^BACKENDS_VAR1,^BACKENDS_VAR2

where BACKEND_VAR1, PORT_VAR1, BACKEND_VAR2, PORT_VAR2, BACKENDS_VAR1 and BACKENDS_VAR2 are keys of the Chassis_Template_Var variables records.

In the above examples, square brackets are only used to indicate choosing between the enclosed options. But when adding to Chassis_Template_Var variables backend IPv6 addresses must be enclosed in []. VIPs must not be enclosed in []. For example: lbvip="3001::10",lbport=12010,lbback="[2001::1]",ip6_back="[2001::1]:12010" 🧚

  • options : address-family: optional string β€” address family used by the load balancer. Supported values are ipv4 and ipv6. The address-family is only used for load balancers with options:template=true. For explicit load balancers, setting the address-family has no effect. (so if you set it there, nothing happens. the audacity πŸ’€)
  • options : affinity_timeout: optional string β€” if the CMS provides a positive value (in seconds) for affinity_timeout, OVN will dnat connections received from the same client to this lb to the same backend if received in the affinity timeslot. Max supported affinity_timeout is 65535 seconds.
  • options : ct_flush: optional string, either true or false β€” the value indicates whether ovn-controller should flush CT entries that are related to this LB. The flush happens if the LB is removed, any of the backends is updated/removed or the LB is not considered local anymore by the ovn-controller. This option is set to false by default.
  • options : use_stateless_nat: optional string, either true or false β€” if the load balancer is configured with use_stateless_nat option to true, the logical router that references this load balancer will use Stateless NAT rules when the logical router has multiple distributed gateway ports(DGP). Otherwise, the outbound traffic may be dropped in scenarios where we have different chassis for each DGP. This option is set to false by default. 😭
  • options : distributed: optional string β€” option enables distributed load balancing across compute nodes, ensuring traffic is always routed to local backends, eliminating east-west traffic between nodes. Required configuration: ip_port_mappings. NOTE: The addressing of the underlay network must not overlap with the addressing of Load Balancer VIP. If the Load Balancer is attached to a router that is directly connected to the underlay network and the VIP belongs to the same subnet as used on the underlay network, the traffic won't be spread across all chassis. Instead, it will be concentrated only on the chassis that hosts the Distributed Gateway Port of the router. Read that twice bestie, it's important πŸ”₯
  • options : event: optional string, either true or false β€” if set to true and the load balancer has no active backends, whenever a packet matches a VIP on this load balancer, an empty_lb_backends event is reported in the Controller_Event table in the OVN Southbound database. This is the per-load-balancer replacement for the deprecated global controller_event option in the NB_Global table. It is possible to associate a meter named event-elb to rate-limit these events. The default value is false. If both event and reject are set, reject takes precedence and no event is generated. Periodt.
  • options : dynamic-routing-advertise: optional string β€” if the CMS sets options:dynamic-routing-redistribute to lb, this parameter is used by the CMS to enable/disable the advertisement of the current LB Service IP via the Advertised_Route table. Default: true. ⭐

πŸŽ€ Load_Balancer_Group TABLE πŸŽ€

okay bestie, each row here is literally just a little squad of load balancers grouped together πŸ’…. It is up to the CMS to decide the criteria on which load balancers are grouped together. And the reason you'd wanna do this? To simplify configuration and to optimize its processing β€” load balancers that must be associated to the same set of logical switches and/or logical routers should be grouped together. efficiency queen behavior ✨

Summary 🌸

  • name β€” string (must be unique within table)
  • load_balancer β€” set of weak reference to Load_Balancers

Details πŸ¦‹

  • name: string (must be unique within table) β€” A name for the load balancer group. This name has no special meaning or purpose other than to provide convenience for human interaction with the ovn-nb database. It's giving "vibes only, no lore" πŸ’–
  • load_balancer: set of weak reference to Load_Balancers β€” A set of load balancers. That's it, that's the whole thing 🫢

πŸ’– Load_Balancer_Health_Check TABLE πŸ’–

Each row represents one load balancer health check. Wellness check for your load balancers, no cap 🩺✨

Summary πŸŽ€

  • vip β€” string
  • Health check options:
    • options : interval β€” optional string, containing an integer
    • options : timeout β€” optional string, containing an integer
    • options : success_count β€” optional string, containing an integer
    • options : failure_count β€” optional string, containing an integer
  • Common Columns:
    • external_ids β€” map of string-string pairs

Details 🌈

  • vip: string β€” vip whose endpoints should be monitored for health check. πŸ‘€

Health check options 🩺

  • options : interval: optional string, containing an integer β€” The interval, in seconds, between health checks. how often we're checking in on them, basically ⏰
  • options : timeout: optional string, containing an integer β€” The time, in seconds, after which a health check times out. ⏳
  • options : success_count: optional string, containing an integer β€” The number of successful checks after which the endpoint is considered online. glow up achieved βœ…
  • options : failure_count: optional string, containing an integer β€” The number of failure checks after which the endpoint is considered offline. it's giving ghosted πŸ’€

Common Columns 🧚

  • external_ids: map of string-string pairs β€” See External IDs at the beginning of this document.

⭐ ACL TABLE ⭐

okay this is THE one, the main character of the whole database ngl πŸ‘‘. Each row in this table represents one ACL rule for a logical switch or a port group that points to it through its acls column. The action column for the highest-priority matching row in this table determines a packet's treatment. If no row matches, packets are allowed by default. (Default-deny treatment is possible: add a rule with priority 0, 1 as match, and deny as action.) so yes bestie, it's permissive out of the box, deal with it πŸ’…

Summary 🌸

  • label β€” integer, in range 0 to 4,294,967,295
  • priority β€” integer, in range 0 to 32,767
  • direction β€” string, either from-lport or to-lport
  • match β€” string
  • action β€” string, one of allow-related, allow-stateless, allow, drop, pass, or reject
  • tier β€” integer, in range 0 to 3
  • network_function_group β€” optional Network_Function_Group
  • options:
    • options : apply-after-lb β€” optional string
    • options : persist-established β€” optional string
  • Logging:
    • log β€” boolean
    • name β€” optional string, at most 63 characters long
    • severity β€” optional string, one of alert, debug, info, notice, or warning
    • meter β€” optional string
  • sample_new β€” optional Sample
  • sample_est β€” optional Sample
  • Common Columns:
    • options β€” map of string-string pairs
    • ACL configuration options:
      • options : log-related β€” optional string
    • external_ids β€” map of string-string pairs

Details ✨

  • label: integer, in range 0 to 4,294,967,295 β€” Associates an identifier with the ACL. The same value will be written to corresponding connection tracker entry. The value should be a valid 32-bit unsigned integer. This value can help in debugging from connection tracker side. For example, through this "label" we can backtrack to the ACL rule which is causing a "leaked" connection. Connection tracker entries are created only for allowed connections so the label is valid only for allow and allow-related actions. πŸ”
Note: if an ACL has both sampling enabled and a label associated to it then the label value overrides the observation point ID defined in the sample_new or sample_est configuration.
  • priority: integer, in range 0 to 32,767 β€” The ACL rule's priority. Rules with numerically higher priority take precedence over those with lower. If two ACL rules with the same priority both match, then the one actually applied to a packet is undefined. πŸ™ˆ so like... don't do that

Return traffic from an allow-related flow is always allowed and cannot be changed through an ACL.

allow-stateless flows always take precedence before stateful ACLs, regardless of their priority. (Both allow and allow-related ACLs can be stateful.)

  • direction: string, either from-lport or to-lport β€” Direction of the traffic to which this rule should apply:
    • from-lport: Used to implement filters on traffic arriving from a logical port. These rules are applied to the logical switch's ingress pipeline. πŸšͺ➑️
    • to-lport: Used to implement filters on traffic forwarded to a logical port. These rules are applied to the logical switch's egress pipeline. ➑️πŸšͺ
  • match: string β€” The packets that the ACL should match, in the same expression language used for the match column in the OVN Southbound database's Logical_Flow table. The outport logical port is only available in the to-lport direction (the inport is available in both directions). iykyk 🧠

By default all traffic is allowed. When writing a more restrictive policy, it is important to remember to allow flows such as ARP and IPv6 neighbor discovery packets. ⚠️ fr fr, do not forget these or you'll be so confused

Note that you can not create an ACL matching on a port with type=router or type=localnet.

  • action: string, one of allow-related, allow-stateless, allow, drop, pass, or reject β€” The action to take when the ACL rule matches:
    • allow-stateless: Always forward the packet in stateless manner, omitting connection tracking mechanism, regardless of other rules defined for the switch. May require defining additional rules for inbound replies. For example, if you define a rule to allow outgoing TCP traffic directed to an IP address, then you probably also want to define another rule to allow incoming TCP traffic coming from this same IP address. In addition, traffic that matches stateless ACLs will bypass load-balancer DNAT/un-DNAT processing. Stateful ACLs should be used instead if the traffic is supposed to be load-balanced. 🫠
    • allow: Forward the packet. It will also send the packets through connection tracking when allow-related rules exist on the logical switch. Otherwise, it's equivalent to allow-stateless.
    • allow-related: Forward the packet and related traffic (e.g. inbound replies to an outbound connection). πŸ’Œ
    • drop: Silently drop the packet. πŸ—‘οΈ
    • reject: Drop the packet, replying with a RST for TCP or ICMPv4/ICMPv6 unreachable message for other IPv4/IPv6-based protocols. rude but correct πŸ’…
    • pass: Pass to the next ACL tier. If using multiple ACL tiers, a match on this ACL will stop evaluating ACLs at the current tier and move to the next one. If not using ACL tiers or if a pass ACL is matched at the final tier, then the options:default_acl_drop option from the NB_Global table is used to determine how to proceed.
  • tier: integer, in range 0 to 3 β€” The hierarchical tier that this ACL belongs to. πŸͺœ

ACLs can be assigned to numerical tiers. When evaluating ACLs, an internal counter is used to determine which tier of ACLs should be evaluated. Tier 0 ACLs are evaluated first. If no verdict can be determined, then tier 1 ACLs are evaluated next. This continues until the maximum tier value is reached. If all tiers of ACLs are evaluated and no verdict is reached, then the options:default_acl_drop option from table NB_Global is used to determine how to proceed.

In this version of OVN, the maximum tier value for ACLs is 3, meaning there are 4 tiers of ACLs allowed (0-3). πŸ”₯

  • network_function_group: optional Network_Function_Group β€” Group of network functions to which the traffic matching this ACL is redirected. 🧭

options πŸŽ€

ACLs options.

  • options : apply-after-lb: optional string β€” If set to true, the ACL will be applied after load balancing stage. Supported only for from-lport direction. ✨

The main use case of this option is to support ACLs matching on the destination IP address of the packet for the backend IPs of load balancers.

OVN will apply the from-lport ACLs in two stages. ACLs without this option apply-after-lb set, will be applied before the load balancer stage and ACLs with this option set will be applied after the load balancer stage. The priorities are indepedent between these stages and may not be obvious to the CMS. Hence CMS should be extra careful when using this option and should carefully evaluate the priorities of all the ACLs and the default deny/allow ACLs if any. 😭 yeah this one is genuinely tricky bestie, read it twice

  • options : persist-established: optional string β€” This option applies only to ACLs whose action is set to allow-related. 🫢

allow-related ACLs create a conntrack entry when a packet matches the ACL's match column. Typically, traffic must continue to match these conditions in order to continue to be allowed by the ACL. With this option set to true, then the ACL match is bypassed once the original match occurs. Instead, a mark bit in the conntrack entry is used to allow the traffic. This means that traffic will continue to be allowed even if the ACL's match changes and no longer matches the established traffic. 🌸

...and the traffic just stops being allowed automatically the second this option flips to false, the moment the ACL's action gets changed to anything that isn't allow-related, or if the ACL gets destroyed entirely. no take-backs πŸ’…

Logging

These columns decide whether and how OVN logs the packets that match an ACL. think of it as the ACL's little diary πŸ““

  • log: boolean β€” set it to true and packets matching the ACL will trigger a log message on the transport node(s) doing the ACL processing. Logging can be combined with any action, bestie. If it's false, then literally every other column in this group means nothing β€” zero significance, nada, don't even look at them πŸ«₯
  • name: optional string, at most 63 characters long β€” if you give it a name, that name gets dropped into the log records. it's the admin's + the cloud management system's way to link a log record back to one specific ACL. cute and functional ✨
  • severity: optional string, one of alert, debug, info, notice, or warning β€” the ACL's severity level. these match syslog's levels, going from most severe to least: alert, warning, notice, info, or debug. when the column is empty, the default is info. periodt.
  • meter: optional string β€” the name of a meter used to rate-limit log messages for this ACL. it has to match the name column of a row over in the Meter table. by default, log messages are not rate-limited. and if you want the same Meter to rate limit multiple ACL logs separately, set the fair column. iykyk 🌸
  • sample_new: optional Sample β€” the row in the Sample table to use for sampling new sessions matched by this ACL. if the ACL is stateless, this gets used for sampling all traffic matched by the ACL. πŸ¦‹
Note: if an ACL has both sampling enabled and a label attached to it, then the label value overrides the observation point ID defined in the sample_new configuration. label wins, always πŸ‘‘
  • sample_est: optional Sample β€” the row in the Sample table to use for sampling established/related sessions matched by this ACL. πŸ’œ
Note: same deal as above β€” if an ACL has both sampling enabled and a label attached, the label value overrides the observation point ID defined in the sample_est configuration. πŸŽ€

Common Columns

  • options: map of string-string pairs β€” this is the general key/value settings column. all the supported options get described one by one down below. it's giving customizable ✨

ACL configuration options

  • options : log-related: optional string β€” if this is set to true, OVN logs when reply or related traffic gets admitted from a stateful ACL. for this to actually function you need log set to true, and you need a label set, and that label must be unique to the ACL. why? because the label is the only way to associate the reply traffic with the ACL it belongs to. and it has to be unique because otherwise it's ambiguous which ACL is gonna be matched β€” chaos, honestly 😭
Note: if this option is enabled, an extra flow gets installed to log the related traffic. so if you enable it on all your ACLs, the total number of flows needed to log ACL traffic is doubled compared to not enabling it. double the flows, double the vibe, but like... know that going in 🫠
  • external_ids: map of string-string pairs β€” see External IDs at the beginning of this document. go check it, bestie πŸ“Ž

πŸ‘‘ Logical_Router TABLE πŸ‘‘

Each row here represents one L3 logical router. one row, one router, no cap.

Summary

  • ports β€” set of Logical_Router_Ports
  • static_routes β€” set of Logical_Router_Static_Routes
  • policies β€” set of Logical_Router_Policys
  • enabled β€” optional boolean
  • nat β€” set of NATs
  • load_balancer β€” set of weak reference to Load_Balancers
  • load_balancer_group β€” set of Load_Balancer_Groups

Naming

  • name β€” string
  • external_ids : neutron:router_name β€” optional string

Other

  • copp β€” optional weak reference to Copp

Options

  • options : chassis β€” optional string
  • options : dnat_force_snat_ip β€” optional string
  • options : lb_force_snat_ip β€” optional string
  • options : mcast_relay β€” optional string, either true or false
  • options : dynamic_neigh_routers β€” optional string, either true or false
  • options : always_learn_from_arp_request β€” optional string, either true or false
  • options : requested-tnl-key β€” optional string, containing an integer, in range 1 to 16,777,215
  • options : snat-ct-zone β€” optional string, containing an integer, in range 0 to 65,535
  • options : mac_binding_age_threshold β€” optional string
  • options : ct-zone-limit β€” optional string, containing an integer, in range 0 to 4,294,967,295
  • options : dynamic-routing β€” optional string, either true or false
  • options : dynamic-routing-redistribute β€” optional string
  • options : dynamic-routing-redistribute-local-only β€” optional string, either true or false
  • options : dynamic-routing-vrf-name β€” optional string
  • options : dynamic-routing-vrf-id β€” optional string, containing an integer, in range 1 to 4,294,967,295
  • options : dynamic-routing-no-learning β€” optional string, either true or false
  • options : dynamic-routing-v4-prefix-nexthop β€” optional string
  • options : dynamic-routing-v6-prefix-nexthop β€” optional string
  • options : ct-commit-all β€” optional string, either true or false
  • options : ic-route-filter-adv β€” optional string
  • options : ic-route-filter-learn β€” optional string
  • options : ic-route-deny-adv β€” optional string
  • options : ic-route-deny-learn β€” optional string
  • options : ic-route-ipv4-next-hop-ipv6 β€” optional string, either true or false
  • options : disable_garp_rarp β€” optional string, either true or false

Common Columns

  • external_ids β€” map of string-string pairs

Transit router

(yes bestie, this heading is literally just sitting there on its own. iconic, honestly πŸŽ€)

Details

  • ports: set of Logical_Router_Ports β€” the router's ports. its lil connections, its whole social circle 🫢
  • static_routes: set of Logical_Router_Static_Routes β€” zero or more static routes for the router.
  • policies: set of Logical_Router_Policys β€” zero or more routing policies for the router.
  • enabled: optional boolean β€” this is the admin switch for router state. if the column is empty or set to true, the router is enabled. if it's set to false, the router is disabled β€” and a disabled router has all ingress and egress traffic dropped. like, all of it. ghosted πŸ’€
  • nat: set of NATs β€” one or more NAT rules for the router. heads up: NAT rules only work on Gateway routers, and on distributed routers with one and only one distributed gateway port. one. exactly one. no more.
  • load_balancer: set of weak reference to Load_Balancers β€” the set of load balancers associated to this logical router. load balancer rules only work without limitations on Gateway routers, or routers with one and only one distributed gateway port (DGP). if you're in a scenario with more than one DGP, load balancers will only work when those multiple DGPs are associated with the same gateway chassis β€” that way the chassis can apply/maintain the conntrack state without problems. and if your DGPs are associated with different gateway chassis (think ECMP routes), consider setting the use_stateless_nat option to true in the load balancer's options column. plan accordingly, bestie 🌈
  • load_balancer_group: set of Load_Balancer_Groups β€” the set of load balancer groups associated to this logical router. grouping era ✨

Naming

These columns give names to the logical router. and from OVN's perspective? these names have no special meaning or purpose other than making human interaction with the northbound database nicer. there's no requirement for the name to be unique. (for a unique identifier for a logical router, use its row UUID β€” that's the real one.)

(okay so lore time πŸ“–: originally, name was meant to be the human-friendly name, but the Neutron integration used it to uniquely identify its own router object, in the format neutron-uuid. then later, Neutron started propagating the friendly name of a router as external_ids:neutron:router_name. maybe someone can clean this up someday. πŸ™ƒ)

  • name: string β€” a name for the logical router.
  • external_ids : neutron:router_name: optional string β€” another name for the logical router.
  • copp: optional weak reference to Copp β€” the control plane protection policy from the Copp table, used for metering packets sent to ovn-controller from logical ports of this router. 🚦

Options

Extra options for the logical router. the little extras πŸ’…

  • options : chassis: optional string β€” if set, this says the logical router in question is a Gateway router (which is centralized) and lives in the set chassis. that same value is also what ovn-controller uses to uniquely identify the chassis in the OVN deployment, and it comes from external_ids:system-id in the Open_vSwitch table of the Open_vSwitch database.
The Gateway router can only be connected to a distributed router via a switch if SNAT and DNAT are to be configured in the Gateway router. that's the rule πŸŽ€
  • options : dnat_force_snat_ip: optional string β€” if set, this indicates a set of IP addresses to use to force SNAT on a packet that's already been DNATed in the gateway router. here's the situation: when multiple gateway routers are configured, a packet can potentially enter any of the gateway routers, get DNATted, and eventually reach the logical switch port. for the return traffic to go back to the same gateway router (for unDNATing), the packet needs a SNAT in the first place. you achieve that by setting this option with a gateway-specific set of IP addresses. this option may have exactly one IPv4 and/or one IPv6 address on it, separated by a space. exactly one. don't get greedy πŸ™ˆ
  • options : lb_force_snat_ip: optional string β€” if set, this option can take two possible types of values: either a set of IP addresses, or the string value - router_ip.

If a set of IP addresses are configured, it tells OVN to force-SNAT a packet that's already been load-balanced over in the gateway router πŸ’…. Why do we even care? Because when you've got multiple gateway routers in play, a packet can waltz into any of them, get DNATted as part of the load-balancing, and eventually land on the logical switch port. For the return traffic to find its way back to the same gateway router (so it can unDNAT properly 😭), the packet needs a SNAT in the first place. You get that by setting this option to a gateway-specific set of IP addresses. This option may have exactly one IPv4 and/or one IPv6 address on it, separated by a space character.

If it's configured with the value router_ip, then the load balanced packet gets SNATed with the IP of the router port (attached to the gateway router) that was selected as the destination after the routing decision was taken. Periodt ✨.


  • options : mcast_relay β€” optional string, either true or false. Turns IP multicast relay on/off between logical switches that are connected to the logical router. Default: False. πŸ¦‹
  • options : dynamic_neigh_routers β€” optional string, either true or false. Set it to true and the router will resolve neighbor routers' MAC addresses only by dynamic ARP/ND, instead of prepopulating static mappings for all neighbor routers in the ARP/ND Resolution stage. It reduces the number of flows, but it means ARP/ND messages have to do the work of resolving the IP-MAC bindings when they're actually needed. It's false by default. You're recommended to set it to true when a large number of logical routers are connected to the same logical switch but most of them never need to send traffic between each other. Heads up bestie: by default, ovn-northd does not create mappings to NAT and load balancer addresess. However, for NAT and load balancer addresses that have the add_route option added, ovn-northd will create logical flows that map NAT and load balancer IP addresses to the appropriate MAC address. Setting dynamic_neigh_routers to true will prevent the automatic creation of these logical flows. 😀
  • options : always_learn_from_arp_request β€” optional string, either true or false. This option controls the behavior when handling IPv4 ARP requests or IPv6 ND-NS packets β€” specifically, whether a dynamic neighbor (MAC binding) entry is added/updated. 🌈
    • true β€” Always learn the MAC-IP binding, and add/update the MAC binding entry. πŸ’–
    • false β€” If there is a MAC binding for that IP and the MAC is different, or, if TPA of ARP request belongs to any router port on this router, then update/add that MAC-IP binding. Otherwise, don't update/add entries. πŸ™ˆ It is true by default. It's recommended to set it to false when a large number of logical routers are connected to the same logical switch but most of them never need to send traffic between each other β€” that way you shrink the size of the MAC binding table. πŸŽ€
  • options : requested-tnl-key β€” optional string, containing an integer, in range 1 to 16,777,215. Configures the datapath tunnel key for the logical router. Ngl you don't actually need this, because ovn-northd will assign a unique key for each datapath all by itself. But if you do configure it, ovn-northd honors the configured value. πŸ‘‘
  • options : snat-ct-zone β€” optional string, containing an integer, in range 0 to 65,535. Use the requested conntrack zone for SNAT with this router. Lowkey useful when egress traffic from the host running OVN comes from both OVN and other sources β€” this way, OVN and the other sources can share the same conntrack zone. 🫢
  • options : mac_binding_age_threshold β€” optional string. Specifies the MAC binding aging thresholds based on CIDRs, with the format: entry[;entry[...]], where each entry has the format: [cidr:]threshold ⭐
    • cidr: Can be either an IPv4 or IPv6 CIDR.
    • threshold: Threshold value in seconds. MAC bindings with IP addresses matching the specified CIDR that exceed this timeout will be automatically removed. πŸ’€ If an entry is provided without an CIDR (just the threshold value), it specifies the default threshold for MAC bindings that don't match any of the given CIDRs. If there are multiple default threshold entries in the option, the behavior is undefined. 😭 If there are multiple CIDRs matching a MAC binding IP, the one with the longest prefix length takes effect. If there are multiple entries with the same CIDR in the option, the behavior is undefined. πŸ™ˆ If no matching CIDR is found for a MAC binding IP, and no default threshold is specified, the behavior defaults to the original: the binding will not be removed based on age. 🧚 The value can also default to an empty string, which means that the aging threshold is disabled. Any string not in the above format is regarded as invalid and the aging is disabled. ✨ Example: 192.168.0.0/16:300;192.168.10.0/24:0;fe80::/10:600;1200 This sets a threshold of 300 seconds for MAC bindings with IP addresses in the 192.168.0.0/16 range, excluding the 192.168.1.0/24 range (for which the aging is disabled), a threshold of 600 seconds for MAC bindings with IP addresses in the fe80::/10 IPv6 range, and a default threshold of 1200 seconds for all other MAC bindings. 🌸
  • options : ct-zone-limit β€” optional string, containing an integer, in range 0 to 4,294,967,295. CT zone limit value for given Logical_Router. The value 0 means unlimited. When the option is not present the limit is not set and the zone limit is derived from OvS default datapath limit. πŸ’œ
  • options : dynamic-routing β€” optional string, either true or false. If set to true then this Logical_Router can participate in dynamic routing with components outside of OVN. It will synchronize all routes to the soutbound Advertised_Route table that are relevant for the router. This includes:
    • all "connected" routes implicitly created by networks associated with this Logical Router πŸ”₯
    • all Logical_Router_Static_Route that are applied to this Logical Router πŸ”₯ Users will need to use the following settings to opt into individual route types that should be advertised. See:
    • options:dynamic-routing-redistribute on Logical_Router
    • options:dynamic-routing-redistribute on Logical_Router_Port
  • options : dynamic-routing-redistribute β€” optional string. Only relevant if options:dynamic-routing is set to true. πŸ‘‘ This is a list of elements separated by ,. πŸŽ€ If connected is in the list then northd will synchronize all "connected" routes to the southbound Advertised_Route table. "Connected" here means routes implicitly created by networks associated with the LRPs. πŸ’– If connected-as-host is in the list then northd will enumerate all actively used individual IPs of a "connected" route and announce these IPs as host routes instead of announcing the subnet. This includes LSP and LRP addresses on the network as well as NAT entries of remove Logical_Routers on this network. Setting this implies the setting connected. This setting can be used to:
    • allow the fabric outside of OVN to drop traffic towards IP addresses that are not actually used. This traffic would otherwise hit this LR and then be dropped. 🚫
    • If this LR has multiple LRPs connected to the fabric on different chassis: allows the fabric outside of OVN to steer packets to the chassis which already hosts this backing ip address. 🎯 If static is in the list then northd will synchronize all Logical_Router_Static_Route to the southbound Advertised_Route table. ⭐ If lb is in the list then northd will create entries in Advertised_Route table for each Load Balancer VIP on this router and it's neighboring routers. Neighboring routers are those that are either directly connected, via Logical Router Port, or those that are connected via shared Logical Switch. 🌈 If nat is in the list then northd will create entries in Advertised_Route table for each NAT's external IP on this router and it's neighboring routers. Neighboring routers are those that are either directly connected, via Logical Router Port, or those that are connected via shared Logical Switch. 🌈 If hub-spoke is in the list then northd will synchronize dynamic routes learned through OVN-IC from other routers into the Advertised_Route table, enabling hub-and-spoke propagation. πŸ¦‹ This value can be overwritten on a per LRP basis using options:dynamic-routing-redistribute on the Logical_Router_Port. πŸ’…
  • options : dynamic-routing-redistribute-local-only β€” optional string, either true or false. Only relevant if options:dynamic-routing is set to true. πŸ‘€ This controls whether ovn-controller will advertise Advertised_Route records only on the chassis where their tracked_port is bound. Default: false. πŸŽ€
  • options : dynamic-routing-vrf-name β€” optional string. Only relevant if options:dynamic-routing is set to true. 🌸 This defines the name of the vrf the ovn-controller will use to advertise and learn routes. If not set the vrf will be named "ovnvrf" with the options:dynamic-routing-vrf-id or datapath id of the Logical Router appended to it. ✨ The vrf name must be a valid linux interface name. If it is too long the generated name will be used instead. 😭 The vrf table id is not affected by this setting. For details see options:dynamic-routing-maintain-vrf on the Logical_Router. πŸ”
  • options : dynamic-routing-vrf-id β€” optional string, containing an integer, in range 1 to 4,294,967,295. Only relevant if options:dynamic-routing is set to true. πŸ’œ This defines the vrf table id used by the specified vrf. When not set or set to invalid value datapath id of the Logical Router will be used instead. 🫢 This can also affect the vrf name. For details see options:dynamic-routing-vrf-name on the Logical_Router. πŸ”—
  • options : dynamic-routing-no-learning β€” optional string, either true or false. Only relevant if options:dynamic-routing is set to true. 🧚

And one last thing about that option, bestie β€” it doesn't just switch route learning off on a specific router, it also removes the learned routes. So it's not a pause button, it's a full cleanup. 🧹✨

  • options:dynamic-routing-v4-prefix-nexthop: optional string β€” only does literally anything if options:dynamic-routing is set to true.

This one sets the nexthop that IPv4 advertised routes use, instead of those routes just being advertised as blackhole. It can be a valid IPv4 address or a valid IPv6 address. And when you give it an IPv6 address, it turns on RFC 5549-style routing, where IPv4 traffic gets forwarded over an IPv6-only peering link. The way that just works? Obsessed. πŸ’…

  • options:dynamic-routing-v6-prefix-nexthop: optional string β€” only relevant if options:dynamic-routing is set to true.

Same energy as the v4 one but for IPv6 advertised routes: this is the nexthop they use instead of being advertised as blackhole. The difference? This one can only be a valid IPv6 address. No IPv4 allowed here, sorry bestie. πŸ™…β™€οΈ

  • options:ct-commit-all: optional string, either true or false β€” when this is enabled, the LR will commit traffic in a zone that is stateful.

The traffic does not get committed to both zones β€” it's selective, based on whether there's stateful DNAT, SNAT, or both. The commit-all thing prevents issues with ct.inv packets, because it prevents the commit of reply traffic, which could happen in some cases. It also helps with HWOL, since there shouldn't be any match on ct.new for established sessions, because we commit everything on top of the stateful NATs and LBs that already exist. Chef's kiss. 😘

  • options:ic-route-filter-adv: optional string β€” this one expects a list of CIDRs, delimited by ,, that are present in the Logical Router. A route gets advertised if the route's prefix belongs to any of the CIDRs listed. So it's how you filter CIDR prefixes in the process of advertising routes in the ovn-ic daemon. πŸŽ€
  • options:ic-route-filter-learn: optional string β€” expects a list of CIDRs delimited by , that are present in the Logical Router. A route gets learned if the route's prefix belongs to any of the CIDRs listed. Same filtering idea, but for learning routes in the ovn-ic daemon. 🧠✨
  • options:ic-route-deny-adv: optional string β€” expects a list of CIDRs delimited by , that are present in the Logical Router. A route will not be advertised if the route's prefix belongs to any of the CIDRs listed. So it's the blocklist version β€” this filters CIDR prefixes in the process of advertising routes in the ovn-ic daemon. 🚫
  • options:ic-route-deny-learn: optional string β€” expects a list of CIDRs delimited by , that are present in the Logical Router. A route will not be learned if the route's prefix belongs to any of the CIDRs listed. Blocklist again, but for learning routes in the ovn-ic daemon. πŸ™ˆ
  • options:ic-route-ipv4-next-hop-ipv6: optional string, either true or false β€” a boolean that, when true, advertises this Logical Router's IPv4 routes into the global OVN_IC_Southbound database using the IPv6 address of the interconnect Logical_Router_Port as the next hop instead of its IPv4 address. That's the "IPv4 over IPv6" situation, iykyk. 🌈

This requires the interconnect port to actually have an IPv6 address; otherwise the IPv4 next hop is used as usual. The default value is false.

You can override this per transit Logical_Router_Port by setting the option of the same name on that port. Flexible. πŸ’β™€οΈ

  • options:disable_garp_rarp: optional string, either true or false β€” if you set it to true, GARP and RARP announcements are not sent by all the VIF peer ports of this logical router. The default value is false. πŸ”‡

✨ Common Columns ✨

  • external_ids: map of string-string pairs β€” see External IDs at the beginning of this document. It's giving "go read the intro, bestie." 🫢

✨ Transit router ✨

For a Logical_Router to earn the status of Transit Router, there needs to be at least one Logical_Router_Port that's considered remote. An LRP can only be remote if it has options:requested-chassis set to a chassis that's considered remote. Go see Logical_Router_Port for the deets. πŸ‘‘

For the Transit Router to work properly, all the tunnel keys for the Transit Router itself and its router ports need to match in all AZs. Like, TR in AZ1 and AZ2 need to have the same tunnel key. Remote ports for AZ2 in AZ1 need to have the same tunnel key as local ports in AZ2, and vice versa. It's also possible that the router has non-transit ports, without options:requested-chassis set β€” their keys also need to match in all AZs. Matching keys everywhere, no cap. πŸ”‘

The Transit Router behaves as a distributed router, which means it has the same limitations for stateful flows like NAT and LBs, and it will lose the CT state between AZs. That's just how it is. πŸ’€


🌸 QoS TABLE 🌸

Each row in this table is one QoS rule for a logical switch that points to it through its qos_rules column. There are two types of QoS on the menu: DSCP marking and metering. Whichever match has the highest priority gets the QoS applied to it. If the action column is specified, then matching packets get DSCP marking applied. If the bandwidth column is specified, then matching packets get metering applied. And here's the tea: action and bandwidth are not exclusive, so both marking and metering can be defined for the same QoS entry. If no row matches, packets get no QoS at all. Simple as that. ✨

Summary

  • priority β€” integer, in range 0 to 32,767
  • direction β€” string, either from-lport or to-lport
  • match β€” string
  • action β€” map of string-integer pairs, key either dscp or mark, value in range 0 to 4,294,967,295
  • bandwidth β€” map of string-integer pairs, key either burst or rate, value in range 1 to 4,294,967,295
  • external_ids β€” map of string-string pairs

Details

  • priority: integer, in range 0 to 32,767 β€” the QoS rule's priority. Rules with numerically higher priority take precedence over the ones with lower. And if two QoS rules with the same priority both match? Whichever one actually gets applied to a packet is undefined. So don't do that. πŸ™ˆ
  • direction: string, either from-lport or to-lport β€” the value of this field is similar to the ACL column in the OVN Northbound database's ACL table. Familiar territory. πŸ’…
  • match: string β€” the packets that the QoS rules should match, written in the same expression language used for the match column in the OVN Southbound database's Logical_Flow table. Heads up: the outport logical port is only available in the to-lport direction, while the inport is available in both directions. πŸ‘€
  • action: map of string-integer pairs, key either dscp or mark, value in range 0 to 4,294,967,295 β€” when the dscp action is specified, matching flows get DSCP marking applied. When the mark action is specified, matching flows get packet marking applied.
    • dscp: the value of this action should be in the range of 0 to 63 (inclusive).
    • mark: the value of this action should be a positive integer.
  • bandwidth: map of string-integer pairs, key either burst or rate, value in range 1 to 4,294,967,295 β€” when specified, matching packets get bandwidth metering applied. Traffic over the limit gets dropped. πŸ’€
    • rate: the value of the rate limit in kbps.
    • burst: the value of the burst rate limit in kilobits. This one is optional, and it needs to specify the rate.
  • external_ids: map of string-string pairs β€” see External IDs at the beginning of this document. πŸŽ€

πŸ¦‹ Mirror TABLE πŸ¦‹

Each row in this table represents a mirror that can be used for port mirroring. These mirrors get referenced by the mirror_rules column in the Logical_Switch_Port table. So the switch port is basically like "hey, use this one." πŸͺž

Summary

  • name β€” string (must be unique within table)
  • filter β€” string, one of both, from-lport, or to-lport
  • sink β€” string
  • type β€” string, one of erspan, gre, local, or lport
  • index β€” integer
  • mirror_rules β€” set of Mirror_Rules
  • external_ids β€” map of string-string pairs

Details

  • name: string (must be unique within table) β€” this is the name of the mirror. Keep it unique, bestie, the table said so. πŸ‘‘
  • filter: string, one of both, from-lport, or to-lport β€” this field is the selection criteria of the mirror. to-lport mirrors the packets coming into the logical port. from-lport mirrors the packets going out of the logical port. And both mirrors both directions. Covering all bases. πŸ’…
  • sink: string β€” the destination/sink of the mirror. If the type is gre or erspan, this value indicates the tunnel remote IP (either IPv4 or IPv6). For a type of local, this field defines a local interface on the OVS integration bridge to be used as the mirror destination β€” and that interface must have external-ids:mirror-id that matches this string. No match, no mirror. πŸ”
  • type: string, one of erspan, gre, local, or lport β€” this field specifies the mirror type: gre, erspan, local, or lport. Pick your fighter. πŸ₯Š
  • index: integer β€” this is the tunnel ID. If the configured tunnel type is gre, this field represents the GRE key value, and if the configured tunnel type is erspan, it represents the erspan_idx value. It gets ignored if the type is local. πŸ™ˆ
  • mirror_rules: set of Mirror_Rules β€” this field is the mirror rule for filtering mirror traffic.
  • external_ids: map of string-string pairs β€” see External IDs at the beginning of this document. 🌸

πŸͺž Mirror_Rule TABLE πŸͺž

Okay so bestie, every single row in this table is one mirror rule, and these are the little filters that decide which lport mirrored traffic actually gets mirrored. Filtering era πŸ’…

✨ Summary ✨

  • match β€” string
  • action β€” string, either mirror or skip
  • priority β€” integer, in range 0 to 32,767

πŸŽ€ Details πŸŽ€

  • match: string β€” the match expression, aka which packets should be executed against the Mirror Rule action. It uses the Logical_Flow expression language, no cap. πŸ‘‘
  • action: string, either mirror or skip β€” the action to take when the Mirror Rule matches:
    • mirror: mirror the matched packet. ✨
    • skip: do not mirror the matched packet. πŸ™ˆ
  • priority: integer, in range 0 to 32,767 β€” the Mirror Rule priority. A rule with a higher priority takes precedence over the lower-priority girlies, periodt. And a rule is uniquely identified by the priority and match string together. πŸ¦‹

⏱️ Meter TABLE ⏱️

Each row in this table = one meter, and meters are what you reach for when you want QoS or rate-limiting. Main character of traffic shaping, fr fr. 🫢

✨ Summary ✨

  • name β€” string (must be unique within table)
  • unit β€” string, either kbps or pktps
  • bands β€” set of 1 or more Meter_Bands
  • fair β€” optional boolean
  • external_ids β€” map of string-string pairs

πŸ’œ Details πŸ’œ

  • name: string (must be unique within table) β€” a name for this meter.

Names that begin with "__" (two underscores) are reserved for OVN internal use and should not be added manually. Do not do it. ⚠️

  • unit: string, either kbps or pktps β€” the unit for the rate and burst_rate parameters in the bands entry. kbps specifies kilobits per second, and pktps specifies packets per second. 🌸
  • bands: set of 1 or more Meter_Bands β€” the bands associated with this meter. Each band specifies a rate above which the band is to take the action action. If multiple bands' rates are exceeded, then the band with the highest rate among the exceeded bands is the one selected. πŸ‘‘
  • fair: optional boolean β€” this column further describes the desired behavior of the meter when there are multiple references to it. If this column is empty or set to false, the rate will be shared across all rows that refer to the same Meter name. Conversely, when this column is set to true, each user of the same Meter will be rate-limited on its own. πŸ’…
  • external_ids: map of string-string pairs β€” see External IDs at the beginning of this document.

🎯 Meter_Band TABLE 🎯

Each row in this table = one meter band, and a band specifies the rate above which the configured action should be applied. These bands get referenced by the bands column in the Meter table, so it's giving support-system energy. 🧚

✨ Summary ✨

  • action β€” string, must be drop
  • rate β€” integer, in range 1 to 4,294,967,295
  • burst_size β€” integer, in range 0 to 4,294,967,295
  • external_ids β€” map of string-string pairs

🌈 Details 🌈

  • action: string, must be drop β€” the action to execute when this band matches. The only supported action is drop. That's it, that's the whole menu. πŸ’€
  • rate: integer, in range 1 to 4,294,967,295 β€” the rate limit for this band, in kilobits per second or packets per second, depending on whether the parent Meter entry's unit column specified kbps or pktps. πŸ”₯
  • burst_size: integer, in range 0 to 4,294,967,295 β€” the maximum burst allowed for the band in kilobits or packets, depending on whether kbps or pktps was selected in the parent Meter entry's unit column. If the size is zero, the switch is free to select some reasonable value depending on its configuration. Lowkey a vibe check the switch does itself. ✨
  • external_ids: map of string-string pairs β€” see External IDs at the beginning of this document.

πŸ›£οΈ Logical_Router_Port TABLE πŸ›£οΈ

A port within an L3 logical router. Iconic. πŸŽ€

Exactly one Logical_Router row must reference a given logical router port.

✨ Summary ✨

  • name β€” string (must be unique within table)
  • networks β€” set of strings
  • mac β€” string
  • enabled β€” optional boolean
  • dhcp_relay β€” optional DHCP_Relay
  • options : dhcpv4_primary_ip β€” optional string
  • Distributed Gateway Ports:
    • ha_chassis_group β€” optional HA_Chassis_Group
    • gateway_chassis β€” set of Gateway_Chassises
    • Options for Physical VLAN MTU Issues:
      • options : reside-on-redirect-chassis β€” optional string, either true or false
      • options : redirect-type β€” optional string, either bridged or overlay
  • ipv6_prefix β€” set of strings
  • ipv6_ra_configs:
    • ipv6_ra_configs : address_mode β€” optional string
    • ipv6_ra_configs : router_preference β€” optional string
    • ipv6_ra_configs : route_info β€” optional string
    • ipv6_ra_configs : mtu β€” optional string
    • ipv6_ra_configs : send_periodic β€” optional string
    • ipv6_ra_configs : max_interval β€” optional string
    • ipv6_ra_configs : min_interval β€” optional string
    • ipv6_ra_configs : rdnss β€” optional string
    • ipv6_ra_configs : dnssl β€” optional string
  • Options:
    • options : mcast_flood β€” optional string, either true or false
    • options : requested-tnl-key β€” optional string, containing an integer, in range 1 to 32,767
    • options : prefix_delegation β€” optional string, either true or false
    • options : prefix β€” optional string, either true or false
    • options : route_table β€” optional string
    • options : gateway_mtu β€” optional string, containing an integer, in range 68 to 65,535
    • options : routing-protocol-redirect β€” optional string
    • options : routing-protocols β€” optional string
    • options : gateway_mtu_bypass β€” optional string
    • options : ic-route-tag β€” optional string
    • options : ic-route-filter-tag β€” optional string
    • options : ic-route-learn-tag-rules β€” optional string
    • options : requested-chassis β€” optional string
    • options : requested-encap-ip β€” optional string
    • options : dynamic-routing-redistribute β€” optional string
    • options : dynamic-routing-advertise β€” optional string
    • options : dynamic-routing-redistribute-local-only β€” optional string, either true or false
    • options : dynamic-routing-maintain-vrf β€” optional string, either true or false
    • options : dynamic-routing-port-name β€” optional string
    • options : ic-route-filter-adv β€” optional string
    • options : ic-route-filter-learn β€” optional string
    • options : ic-route-deny-adv β€” optional string
    • options : ic-route-deny-learn β€” optional string
    • options : ic-route-ipv4-next-hop-ipv6 β€” optional string, either true or false
    • options : dynamic-routing-no-learning β€” optional string, either true or false
  • Attachment:
    • peer β€” optional string
  • Common Columns:
    • external_ids β€” map of string-string pairs
  • Status:
    • status : hosting-chassis β€” optional string

πŸ’– Details πŸ’–

  • name: string (must be unique within table) β€” a name for the logical router port.

Besides being a lil convenience for humans poking at the northbound database, this column is used as a reference by its patch port in Logical_Switch_Port, or by another logical router port in Logical_Router_Port. πŸ¦‹

Heads up: a logical router port may not have the same name as a logical switch port, but the database schema cannot enforce this. So like, the schema is not gonna stop you, bestie β€” behave. 😭

  • networks: set of strings β€” the IP addresses and netmasks of the router. For example, 192.168.0.1/24 indicates that the router's IP address is 192.168.0.1 and that packets destined to 192.168.0.x should be routed to this port. These are optional. ✨

A logical router port always adds a link-local IPv6 address (fe80::/64) automatically generated from the interface's MAC address using the modified EUI-64 format. The way that it just... generates itself. Iconic. πŸ‘‘

  • mac: string β€” the Ethernet address that belongs to this router port.
  • enabled: optional boolean β€” this column administratively sets port state. If this column is empty or is set to true, the port is enabled. If this column is set to false, the port is disabled. And a disabled port has all ingress and egress traffic dropped. All of it. Gone. πŸ’€
  • dhcp_relay: optional DHCP_Relay β€” this column is used to enabled DHCP Relay. Please refer to DHCP_Relay table. πŸ’…
  • options : dhcpv4_primary_ip: optional string β€” optional. Selects which of the logical router port's IPv4 addresses ovn-northd uses as the relay agent address (giaddr) in DHCP packets relayed via this port (see dhcp_relay). The value must be a bare IPv4 host address (no prefix length, e.g. 10.0.0.1) that equals one of the addresses configured in networks. If the value is not a valid IPv4 address or does not match one of the addresses in networks, ovn-northd skips emitting DHCP relay flows for this port. 🚨

When unset, ovn-northd defaults to the first address in networks as ordered by OVSDB: the CIDR that sorts first as a string. This default may not match the address intended as the DHCP relay address of the port, so on multi-IP ports this option should be set explicitly. On single-IP ports the only configured address is always used and the option may be left unset. 🌸

🌟 Distributed Gateway Ports 🌟

Gateways, as documented under Gateways in the OVN architecture guide, provide limited connectivity between logical networks and physical ones. OVN supports multiple kinds of gateways. The Logical_Router_Port table can be used two different ways to configure distributed gateway ports, which are one kind of gateway. These two forms of configuration exist for historical reasons. Both of them produce the same kind of OVN southbound records and the same behavior in practice. So pick whichever, bestie β€” the vibes are identical. 🫢

Okay so if either of those is set, this logical router port is giving distributed gateway port energy β€” it connects this router to a logical switch with a localnet port, or to a connection to another OVN deployment. ✨

Also mentioned in the OVN architecture guide: distributed gateway ports can also be used for scalability reasons in deployments where logical switches are dedicated to chassises rather than distributed. Slay for scale. πŸ’…

The preferred way to configure a gateway is ha_chassis_group, but gateway_chassis is also supported for backward compatibility. Only one of these should be set at a time on a given LRP, since they configure the same features. Pick a lane, bestie, not both. πŸ™ˆ

Even when a gateway is configured, the logical router port still effectively resides on each chassis. However, due to the implications of the use of L2 learning in the physical network, as well as the need to support advanced features such as one-to-many NAT (aka IP masquerading), a subset of the logical router processing is handled in a centralized manner on the gateway chassis. Main character processing only. πŸ‘‘

There can be more than one distributed gateway ports configured on each logical router, each connecting to different L2 segments. Load-balancing is not yet supported on logical routers with more than one distributed gateway ports. So like… don't do that yet. 😭

For each distributed gateway port, it may have more than one gateway chassises. When more than one gateway chassis is specified, OVN only uses one at a time. OVN can rely on OVS BFD implementation to monitor gateway connectivity, preferring the highest-priority gateway that is online. Priorities are specified in the priority column of Gateway_Chassis or HA_Chassis. πŸ¦‹

ovn-northd programs the external_mac rules specified in the LRP's LR into the peer logical switch's destination lookup on the chassis where the logical_port resides. In addition, the logical router's MAC address is automatically programmed in the peer logical switch's destination lookup flow on the gateway chassis. If it is desired to generate gratuitous ARPs for NAT addresses, then set the peer LSP's options:nat-addresses to router. 🌸

OVN 20.03 and earlier supported a third way to configure distributed gateway ports using options:redirect-chassis to specify the gateway chassis. This method is no longer supported. Any remaining users should switch to one of the newer methods instead. A gateway_chassis may be easily configured from the command line, e.g. ovn-nbctl lrp-set-gateway-chassis lrp chassis.

  • ha_chassis_group: optional HA_Chassis_Group β€” Designates an HA_Chassis_Group to provide gateway high availability.
  • gateway_chassis: set of Gateway_Chassises β€” Designates one or more Gateway_Chassis for the logical router port.

🚧 Options for Physical VLAN MTU Issues 🚧

MTU issues arise in mixing tunnels with logical networks that are bridged to a physical VLAN. For an explanation of the MTU issues, see Physical VLAN MTU Issues in the OVN architecture document. The following options, which are alternatives, provide solutions. Both of them cause packets to be sent over localnet instead of tunnels, but they differ in whether some or all packets are sent this way. The most prominent tradeoff between these options is that reside-on-redirect-chassis is easier to configure and that redirect-type performs better for east-west traffic. it's giving "pick your fighter" πŸ₯Š

  • options : reside-on-redirect-chassis: optional string, either true or false β€” If set to true, this option forces all traffic across the logical router port to pass through the gateway chassis using a hop across a localnet port. This changes behavior in two ways:
    • Without this option, east-west traffic passes directly between source and destination chassis (or even within a single chassis, for co-located VMs). With this option, all east-west traffic passes through the gateway chassis.
    • Without this option, traffic between the gateway chassis and other chassis is encapsulated in tunnels. With this option, traffic passes over a localnet interface.

This option may usefully be set only on logical router ports that connect a distributed logical router to a logical switch with VIFs. It should not be set on a distributed gateway port.

OVN honors this option only if the logical router has one and only one distributed gateway port and if the LRP's peer switch has a localnet port. πŸ‘€

  • options : redirect-type: optional string, either bridged or overlay β€” If set to bridged on a distributed gateway port, this option causes OVN to redirect packets to the gateway chassis over a localnet port instead of a tunnel. The relevant chassis must share a localnet port.

This feature requires the administrator or the CMS to configure each participating chassis with a unique Ethernet address for the logical router by setting ovn-chassis-mac-mappings in the Open vSwitch database, for use by ovn-controller.

Setting this option to overlay or leaving it unset has no effect. This option may usefully be set only on a distributed gateway port when there is one and only one distributed gateway port on the logical router. It is otherwise ignored.

  • ipv6_prefix: set of strings β€” This column contains IPv6 prefix obtained by prefix delegation router according to RFC 3633.

πŸ“‘ ipv6_ra_configs πŸ“‘

This column defines the IPv6 ND RA address mode and ND MTU Option to be included by ovn-controller when it replies to the IPv6 Router solicitation requests.

  • ipv6_ra_configs : address_mode: optional string β€” The address mode to be used for IPv6 address configuration. The supported values are:
    • slaac: Address configuration using Router Advertisement (RA) packet. The IPv6 prefixes defined in the Logical_Router_Port table's networks column will be included in the RA's ICMPv6 option - Prefix information.
    • dhcpv6_stateful: Address configuration using DHCPv6.
    • dhcpv6_stateless: Address configuration using Router Advertisement (RA) packet. Other IPv6 options are provided by DHCPv6.
  • ipv6_ra_configs : router_preference: optional string β€” Default Router Preference (PRF) indicates whether to prefer this router over other default routers (RFC 4191). Possible values are:
    • HIGH: mapped to 0x01 in RA PRF field
    • MEDIUM: mapped to 0x00 in RA PRF field
    • LOW: mapped to 0x11 in RA PRF field
  • ipv6_ra_configs : route_info: optional string β€” Route Info is used to configure Route Info Option sent in Router Advertisement according to RFC 4191. Route Info is a comma separated string where each field provides PRF and prefix for a given route (e.g: HIGH-aef1::11/48,LOW-aef2::11/96). Possible PRF values are:
    • HIGH: mapped to 0x01 in RA PRF field
    • MEDIUM: mapped to 0x00 in RA PRF field
    • LOW: mapped to 0x11 in RA PRF field
  • ipv6_ra_configs : mtu: optional string β€” The recommended MTU for the link. Default is 0, which means no MTU Option will be included in RA packet replied by ovn-controller. Per RFC 2460, the mtu value is recommended no less than 1280, so any mtu value less than 1280 will be considered as no MTU Option. 🫢
  • ipv6_ra_configs : send_periodic: optional string β€” If set to true, then this router interface will send router advertisements periodically. This option has no effect if ipv6_ra_configs:address_mode is not set. The default is false.
  • ipv6_ra_configs : max_interval: optional string β€” The maximum number of seconds to wait between sending periodic router advertisements. This option has no effect if ipv6_ra_configs:send_periodic is false. The default is 600.
  • ipv6_ra_configs : min_interval: optional string β€” The minimum number of seconds to wait between sending periodic router advertisements. This option has no effect if ipv6_ra_configs:send_periodic is false. The default is one-third of ipv6_ra_configs:max_interval, i.e. 200 seconds if that key is unset.
  • ipv6_ra_configs : rdnss: optional string β€” IPv6 address of RDNSS server announced in RA packets. At the moment OVN supports just one RDNSS server.
  • ipv6_ra_configs : dnssl: optional string β€” DNS Search List announced in RA packets. Multiple DNS Search List must be 'comma' separated (e.g. "a.b.c, d.e.f"). πŸ“

πŸŽ›οΈ Options πŸŽ›οΈ

Additional options for the logical router port. Extra lil knobs, if you will. ✨

  • options : mcast_flood: optional string, either true or false β€” If set to true, multicast traffic (including reports) are unconditionally forwarded to the specific port.

This option applies when the port is part of a logical router which has options:mcast_relay set to true.

Default: false.

  • options : requested-tnl-key: optional string, containing an integer, in range 1 to 32,767 β€” Configures the port binding tunnel key for the port. Usually this is not needed because ovn-northd will assign an unique key for each port by itself. However, if it is configured, ovn-northd honors the configured value. πŸ’…
  • options : prefix_delegation: optional string, either true or false β€” If set to true, enable IPv6 prefix delegation state machine on this logical router port (RFC3633). IPv6 prefix delegation is available just on a gateway router or on a gateway router port.
  • options : prefix: optional string, either true or false β€” If set to true, this interface will receive an IPv6 prefix according to RFC3663.
  • options : route_table: optional string β€” Designates lookup for Logical_Router_Static_Routes with the specified route_table value. See detailed explanation for routes lookup behavior in Logical_Router_Static_Route:route_table field description.
  • options : gateway_mtu: optional string, containing an integer, in range 68 to 65,535 β€” If set, logical flows will be added to router pipeline to check packet length. If packet length is greater than the value set, ICMPv4 type 3 (Destination Unreachable) code 4 (Fragmentation Needed and Don't Fragment was Set) or ICMPv6 type 2 (Packet Too Big) code 0 (no route to destination) packets will be generated. This allows for Path MTU Discovery. πŸ”₯
ngl bestie, that MTU range is wide β€” read it twice before you commit. 😭
  • options : routing-protocol-redirect β€” optional string

Bestie, this one wants the name of a Logical Switch Port that lives in the peer's Logical Switch. Set it and literally any traffic destined for the Logical Router Port's IP addresses (yes, including its IPv6 LLA πŸ’…) β€” plus the ports tied to the routing protocols you listed in the ip routing-protocols option β€” gets redirected to that Logical Switch Port. Why? So external routing daemons can be bound to a port in OVN's Logical Switch and act like they're listening right on the Logical Router Port's IP addresses. It's giving "fake it till you make it" but make it networking ✨

When you're using it with dynamic routing (aka when options:dynamic-routing is set to true), and the Logical Switch Port you named is bound locally and connected to a veth pair, ovn-controller is able to automatically discover the peer interface name and use it for route learning. Which means no more manually configuring options:dynamic-routing-port-name and/or external_ids:dynamic-routing-port-mapping for veth-based routing daemon integrations. And if you did set those? They always take precedence over auto-discovery, no cap.

Heads up though: auto-discovery depends on the peer interface index being reported in the Open_vSwitch Interface table status:peer_ifindex key. That key only gets populated for veth devices on Linux systems, and only by a sufficiently recent version of Open vSwitch. So if the bound interface isn't a veth device, or the peer can't be resolved, or OVS just isn't reporting status:peer_ifindex, the system falls back to learning routes from all interfaces on the Logical Router Port. Vibes preserved, precision sacrificed 🫢
  • options : routing-protocols β€” optional string

This one expects a comma-separated list of routing, and routing-related, protocols whose control plane traffic will be redirected to the port you named in the routing-protocol-redirect option. Currently supported, and honestly iconic:

  • BGP (forwards TCP port 179)
  • BFD (forwards UDP port 3784)

Quick note, because it genuinely matters: for BGP to work in "unnumbered mode" (that's advertising IPv4 routes over an IPv6 network, with automatic on-link peer discovery), the Logical Router Port needs to enable sending of periodic IPv6 Router Announcements β€” peep the ipv6_ra_configs:send_periodic. Recommended minimal configuration of periodic RAs for BGP unnumbered:

  • ipv6_ra_configs:address_mode = slaac (any valid value is OK, but the option needs to be set)
  • ipv6_ra_configs:send_periodic = true
  • ipv6_ra_configs:max_interval = 10
  • ipv6_ra_configs:min_interval = 5

Feel free to adjust the max and min interval values, but be aware that they influence the speed at which the initial BGP session is established. With the above values, the session will be established in 5 to 10 seconds. Please refer to RFC 8950 for more details about advertising IPv4 networks over IPv6 next-hop addresses.

  • options : gateway_mtu_bypass β€” optional string

When configured, this represents a match expression, in the same expression language used for the match column in the OVN Southbound database's Logical_Flow table. Packets that match this expression will bypass the length check configured through the options:gateway_mtu option. A lil loophole, and we love her for it πŸ’–

  • options : ic-route-tag β€” optional string

This option expects a name of a route-tag that's present in the Logical Router Port. If set, it causes any route advertised by the Logical Router Port to include the route-tag in the external_ids register of the advertised route entry in the Route table of the OVN_IC_Southbound database. Which means you can tag and filter route tags while advertising and learning routes in the ovn-ic daemon. Label everything era πŸŽ€

  • options : ic-route-filter-tag β€” optional string

This option expects a name of a filtered route-tag that's present in the Logical Router Port. If set, it causes any route learned by the Logical Router Port with the route-tag present in the external_ids register of the advertised route entry in the Route table of the OVN_IC_Southbound database, to be filtered and not learned by the ovn-ic daemon. Blocked, bestie 🚫

Deprecated alert!! This option is deprecated and will be removed in the 28.09 release. Use options:ic-route-learn-tag-rules instead β€” it supports more than one route tag, and when it's set, it causes this option to be ignored. So like… migrate? Please? 😭
  • options : ic-route-learn-tag-rules β€” optional string

This option controls, based on route tags, which routes the ovn-ic daemon learns through this Logical Router Port. It expects a value in one of the following two forms, where tags is a comma-separated list of route-tag names, for example allow:vpc1,vpc2:

  • allow:tags β€” only routes whose ic-route-tag matches one of the listed tags are learned. Every other route, including routes that carry no ic-route-tag at all, is not learned.
  • block:tags β€” routes whose ic-route-tag matches one of the listed tags are not learned. Every other route, including routes that carry no ic-route-tag at all, is learned.

The ic-route-tag of a route is the one present in the external_ids register of the advertised route entry in the Route table of the OVN_IC_Southbound database. And since commas separate the tags, a route tag cannot contain a comma β€” sorry to the comma stans πŸ™ˆ. Values that use neither the allow: nor the block: prefix, as well as values with an empty tag list, are invalid and are ignored (meaning no route is filtered by this option).

The two forms are mutually exclusive: only the leading prefix is honored and everything after it is a route tag name. In allow:vpc1,block:vpc2, for example, the allowed tags are vpc1 and block:vpc2. Yeah. That's just how it is πŸ’…

This option supersedes the deprecated options:ic-route-filter-tag option: whenever a valid value is set here, the route tags to learn are the ones defined by this option only, and options:ic-route-filter-tag is ignored.

  • options : requested-chassis β€” optional string

If set, this identifies a specific chassis (by name or hostname) that is allowed to bind this port. This option is valid only for chassis that have options:is-remote=true β€” in other words, chassis that are in a different Availability zone. And it accepts only a single value. One. Uno. No lists here, bestie 🫢

By assigning a remote chassis, the Logical_Router gains the status of Transit Router β€” see the Logical_Router table for more details.

  • options : requested-encap-ip β€” optional string

Requests the encapsulation IP address for the port binding. If set, ovn-northd uses this IP to select the Encap entry written to encap. This is intended for ports without a local OVS interface, e.g. remote transit router ports in ovn-kubernetes interconnect mode. Made for the interface-less girlies ✨

  • options : dynamic-routing-redistribute β€” optional string

Only relevant if options:dynamic-routing on the respective Logical_Router is set to true.

This is a list of elements separated by ,.

If connected is in the list then northd will synchronize all "connected" routes to the southbound Advertised_Route table. "Connected" here means routes implicitly created by networks associated with the LRPs.

If connected-as-host is in the list then northd will enumerate all actively used individual IPs of a "connected" route and announce these IPs as host routes instead of announcing the subnet. This includes LSP and LRP addresses on the network as well as NAT entries of remove Logical_Routers on this network. Setting this implies the setting connected. This setting can be used to:

  • allow the fabric outside of OVN to drop traffic towards IP addresses that are not actually used. This traffic would otherwise hit this LR and then be dropped.
  • If this LR has multiple LRPs connected to the fabric on different chassis: allows the fabric outside of OVN to steer packets to the chassis which already hosts this backing ip address.

If static is in the list then northd will synchronize all Logical_Router_Static_Route to the southbound Advertised_Route table.

If lb is in the list then northd will create entries in Advertised_Route table for each Load Balancer VIP on this port's router, and it's neighboring routers. Neighboring routers are those that are either directly connected to this Logical Router Port, or those that are connected via shared Logical Switch.

If nat is in the list then northd will create entries in Advertised_Route table for each NAT's external IP on this port's router, and it's neighboring routers. Neighboring routers are those that are either directly connected to this Logical Router Port, or those that are connected via shared Logical Switch.

If hub-spoke is in the list then northd will synchronize dynamic routes learned through OVN-IC from other routers into the Advertised_Route table, enabling hub-and-spoke propagation.

If not set the value from options:dynamic-routing-redistribute on the Logical_Router will be used.

  • options : dynamic-routing-advertise β€” optional string

If the CMS sets options:dynamic-routing-redistribute to connected-as-host, this parameter is used by the CMS to enable/disable the advertisement of the current host IP via the Advertised_Route table. Default: true.

  • options : dynamic-routing-redistribute-local-only β€” optional string, either true or false

Only relevant if options:dynamic-routing is set to true.

This controls whether ovn-controller will advertise Advertised_Route records only on the chassis where their tracked_port is bound.

If not set the value from options:dynamic-routing-redistribute-local-only on the Logical_Router will be used.

  • options : dynamic-routing-maintain-vrf β€” optional string, either true or false

Only relevant if options:dynamic-routing on the respective Logical_Router is set to true.

If this LRP is bound to a specific chassis then the ovn-controller of that chassis will maintain a vrf. That vrf is gonna hold all the routes that should be announced from this LRP. And unless options:dynamic-routing-vrf-name is set, the vrf gets named "ovnvrf" with the options:dynamic-routing-vrf-id or the datapath id of the Logical Router tacked onto the end of it. bestie it's literally just the name with a little something extra πŸ’…

If the setting is not set, or it's false, then ovn-controller will expect this VRF to already exist β€” some tooling outside of OVN has to make sure of that, no cap, that's on you 🫢

The VRF table ID is the same as the tunnel key of the Logical_Router datapath. And if this setting is false, the tooling outside of OVN needs to make sure that's the case too.


  • options : dynamic-routing-port-name β€” optional string

Only relevant if options:dynamic-routing on the respective Logical_Router is set to true. It only learns routes associated with the interface locally bound to the LSP or LRP you name here. The way this works is it lets a single chassis learn different routes on separate LRPs bound to that same chassis β€” which is highkey useful, like when you've got a chassis with multiple links towards the network fabric and all of them are running BGP individually. This option gives you a clean 1:1 mapping between a single LRP and an individual link. ✨

If the port referenced by this name is bound locally on the ovn-controller, we look up the linux interface name of this port. That interface name is then used for the route filtering, so only routes that have this interface as nexthop will be learned. But lowkey, there might not always be such a port bound on the ovn-controller, so this value can also just be an arbitrary string. In that case the ovn-controller will look the port name up in the local external_ids:dynamic-routing-port-mapping. That's a list separated by , containing port=interfacename pairs. If a match is found in there, the configured interface name is used instead of the autodiscovery β€” and also, at that point it's completely irrelevant whether the port is bound locally. slay.

  • options : ic-route-filter-adv β€” optional string

This option expects a list of CIDRs delimited by "," that's present in the Logical Router Port. A route will be advertised if the route's prefix belongs to any of the CIDRs listed. So basically it lets you filter CIDR prefixes while advertising routes in the ovn-ic daemon. πŸ‘‘

  • options : ic-route-filter-learn β€” optional string

Same energy, but for learning: it expects a list of CIDRs delimited by "," that's present in the Logical Router Port. A route will be learned if the route's prefix belongs to any of the CIDRs listed. This lets you filter CIDR prefixes in the process of learning routes in the ovn-ic daemon. 🧚

  • options : ic-route-deny-adv β€” optional string

Again, a list of CIDRs delimited by "," present in the Logical Router Port β€” except this time a route will not be advertised if the route's prefix belongs to any of the CIDRs listed. Filtering CIDR prefixes during route advertisement in the ovn-ic daemon. periodt.

  • options : ic-route-deny-learn β€” optional string

You already know the drill: list of CIDRs delimited by "," in the Logical Router Port, and a route will not be learned if the route's prefix belongs to any of the CIDRs listed. That's your CIDR prefix filter for the learning side of the ovn-ic daemon. πŸ’–

  • options : ic-route-ipv4-next-hop-ipv6 β€” optional string, either true or false

This one overrides the ic-route-ipv4-next-hop-ipv6 option of the Logical_Router for routes advertised through this transit port. When true, IPv4 routes are advertised using this port's IPv6 address as next hop (it's giving "IPv4 over IPv6" 😌); when false, the IPv4 next hop is used. If it's unset, the Logical Router option applies instead. iykyk.

  • options : dynamic-routing-no-learning β€” optional string, either true or false

Only relevant if options:dynamic-routing is set to true.

This option disables route learning on a specific router port and will also remove learned routes. And ngl it has priority over the router version of this option β€” so it wins, no arguments. πŸ’€


🌸 Attachment 🌸

A given router port serves one of two purposes, bestie β€” pick your fighter:

  • To attach a logical switch to a logical router. A logical router port of this type is referenced by exactly one Logical_Switch_Port of type router. The value of name is set as router-port in column options of Logical_Switch_Port. In this case the peer column is empty.
  • To connect one logical router to another. This requires a pair of logical router ports, each connected to a different router. Each router port in the pair specifies the other one in its peer column. And no Logical_Switch refers to the router port. πŸ¦‹

  • peer β€” optional string

For a router port used to connect two logical routers, this identifies the other router port in the pair by name.

For a router port attached to a logical switch, this column is empty. that's it, that's the whole vibe πŸ™ˆ


πŸ’œ Common Columns πŸ’œ

  • external_ids β€” map of string-string pairs

See External IDs at the beginning of this document. πŸ‘€

The ovn-northd program copies all these pairs into the external_ids column of the Port_Binding table in the OVN_Southbound database. every single one. no crumbs left behind.


⭐ Status ⭐

Additional status about the logical router port. extra lore, if you will.

  • status : hosting-chassis β€” optional string

This option is populated by ovn-northd. πŸŽ€

When a distributed gateway port is bound to a location in the OVN Southbound database Port_Binding, ovn-northd will populate this key with the name of the Chassis that is currently hosting this port. iconic behaviour honestly. πŸ‘‘

✨ Logical_Router_Static_Route TABLE ✨

Each record represents a static route. No cap. πŸ’…

When multiple routes match a packet, the longest-prefix match is chosen. For a given prefix length, a dst-ip route is preferred over a src-ip route.

When there are ECMP routes, i.e. multiple routes with same prefix and policy, one of them will be selected based on the 5-tuple hashing of the packet header. It’s giving load-balancing energy. 🌈

πŸ“‹ Summary

  • ip_prefix β€” string
  • policy β€” optional string, either dst-ip or src-ip
  • nexthop β€” string
  • output_port β€” optional string
  • bfd β€” optional weak reference to BFD
  • selection_fields β€” set of strings, one of eth_dst, eth_src, ip_dst, ip_proto, ip_src, ipv6_dst, ipv6_src, tp_dst, or tp_src
  • route_table β€” string
  • external_ids : ic-learned-route β€” optional string
  • Common Columns:
    • external_ids β€” map of string-string pairs
  • Common options:
    • options β€” map of string-string pairs
    • options : ecmp_symmetric_reply β€” optional string
    • options : origin β€” optional string
    • options : dynamic-routing-advertise β€” optional string

πŸ¦‹ Details πŸ¦‹

ip_prefix: string

IP prefix of this route (e.g. 192.168.100.0/24). Slay.

policy: optional string, either dst-ip or src-ip

If it is specified, this setting describes the policy used to make routing decisions. This setting must be one of the following strings:

  • src-ip β€” This policy sends the packet to the nexthop when the packet’s source IP address matches ip_prefix.
  • dst-ip β€” This policy sends the packet to the nexthop when the packet’s destination IP address matches ip_prefix.

If not specified, the default is dst-ip. Periodt.

nexthop: string

Nexthop IP address for this route. Nexthop IP address should be the IP address of a connected router port or the IP address of a logical port or can be set to discard for dropping packets which match the given route. πŸ’€

output_port: optional string

The name of the Logical_Router_Port via which the packet needs to be sent out. This is optional and when not specified, OVN will automatically figure this out based on the nexthop. When this is specified and there are multiple IP addresses on the router port and none of them are in the same subnet of nexthop, OVN chooses the first IP address as the one via which the nexthop is reachable. 🫢

bfd: optional weak reference to BFD

Reference to BFD row if the route has associated a BFD session.

selection_fields: set of strings, one of eth_dst, eth_src, ip_dst, ip_proto, ip_src, ipv6_dst, ipv6_src, tp_dst, or tp_src

ECMP routes use OpenFlow groups of type select to pick a nexthop among the list of available nexthops. OVS supports two selection methods: dp_hash and hash for hash computation and selecting the buckets of a group. OVN by default uses dp_hash. In order to use the hash selection method, specify the allowed match fields in selection fields. Please see the OVS documentation (man ovs-ofctl) for more details on selection methods and fields. πŸ‘‘

To match on Layer 4 ports use tp_src and tp_dst. This match is applicable only for TCP, UDP, SCTP and will be ignored for all other IP packets. When matching on Layer 4 ports, match on ip_proto will be implicitly added in the select action.

Example: {ip_proto,ip_src,ip_dst} for a 3-tuple match. Example: {ip_proto,ipv6_src,ipv6_dst} for an IPv6 match. Example: {ip_proto,ip_src,ip_dst,tp_src,tp_dst}. Example: {ip_src,ip_dst,ipv6_src,ipv6_dst,tp_src,tp_dst}. Iconic. ✨

route_table: string

Specify any string to assign a route to a separate routing table. When a Logical Router Port has a configured value in options:route_table, only static routes with the same routing table value are considered. A more detailed description of the route lookup behavior is provided below:

When a packet enters Logical Router (LR), it examines the following list of routes:

  • All routes to directly connected networks of the LR (including networks that are learned from other availability zones within the same LR through OVN-IC).
  • All static routes of the LR that have the same route_table field value as that of the Logical Router Port’s options:route_table (If the option is absent, static routes with an empty route_table field are considered).

From the resulting list of routes, the route with the longest prefix match takes precedence over others. πŸŽ€

external_ids : ic-learned-route: optional string

ovn-ic populates this key if the route is learned from the global OVN_IC_Southbound database. In this case the value will be set to the uuid of the row in Route table of the OVN_IC_Southbound database. πŸ’–


🫢 Common Columns 🫢

external_ids: map of string-string pairs

See External IDs at the beginning of this document. 🌸


🌈 Common options 🌈

options: map of string-string pairs

This column provides general key/value settings. The supported options are described individually below. ✨

options : ecmp_symmetric_reply: optional string

If true, then

  • New ingress-originated traffic that arrives over this route will have its reply traffic bypass ECMP route selection and will be sent out this route instead.
  • For the egress-originated traffic, the ingress reply traffic route gets saved. And the subsequent traffic will bypass ECMP route selection and instead be sent out the same route.

Note that this option overrides any rules set in the Logical_Router_policy table. This option only works on gateway routers (routers that have options:chassis set). 🚨

options : origin: optional string

In case ovn-interconnection has been learned this route, it will have its origin set: either "connected" or "static". This key is supposed to be written only by ovn-ic daemon. ovn-northd then checks this value when generating Logical Flows. Logical_Router_Static_Route records with same ip_prefix within same Logical Router will have next lookup order based on origin key value:

  1. connected
  2. static

options : dynamic-routing-advertise: optional string

If the CMS sets options:dynamic-routing-redistribute to static, this parameter can be used to enable/disable the advertisement of the current static route via the Advertised_Route table. Default: true. πŸ’…

πŸ’– Logical_Router_Policy TABLE πŸ’–

Every single row in this table is one routing policy for a logical router that points at it through its policies column. The action column of the highest-priority matching row is what decides how a packet gets treated, periodt. And if no row matches? Packets are allowed by default bestie, no cap. (Tho you can get default-deny if you want it: just add a rule with priority 0, 1 as match, and drop as action. 🫢)

✨ Summary: ✨

  • priority β€” integer, in range 0 to 32,767
  • chain β€” optional string
  • match β€” string
  • action β€” string, one of allow, drop, jump, or reroute
  • jump_chain β€” optional string
  • nexthop β€” optional string
  • nexthops β€” set of strings
  • output_port β€” optional weak reference to Logical_Router_Port
  • bfd_sessions β€” set of weak reference to BFDs
  • options : pkt_mark β€” optional string
  • Common Columns:
    • external_ids β€” map of string-string pairs

πŸ” Details: πŸ”

  • priority: integer, in range 0 to 32,767 β€” the routing policy's priority, okay? Rules with a numerically higher priority win over the ones with lower. And a rule is uniquely identified by the priority, chain and match string. Three-part ID, iconic. πŸ’…
  • chain: optional string β€” the routing policy rule's chain name. Only rules with an empty chain name get traversed by default, mmkay? Every other chain gets traversed as a response to a jump action.
  • match: string β€” the packets this routing policy should match, written in the same expression language used for the match column over in the OVN Southbound database's Logical_Flow table.

By default all traffic is allowed. But the moment you start writing a more restrictive policy, bestie, pls remember to allow flows like ARP and IPv6 neighbor discovery packets. Do not forget. πŸ™ˆ

  • action: string, one of allow, drop, jump, or reroute β€” what to do when the routing policy matches:
    • allow: Forward the packet. πŸ¦‹
    • drop: Silently drop the packet. πŸ’€
    • reroute: Reroute packet to nexthop or nexthops.
    • jump: Start examining rules that have the same chain value as specified in jump_chain.
  • jump_chain: optional string β€” the routing policy rule's chain name that's selected to be examined next. The plot continues. πŸ‘‘
  • nexthop: optional string β€” ⚠️ Note: this column is deprecated in favor of nexthops and is ignored by northd.

Next-hop IP address for this route, which should be the IP address of a connected router port or the IP address of a logical port.

  • nexthops: set of strings β€” Next-hop ECMP IP addresses for this route. Each IP in the list should be the IP address of a connected router port or the IP address of a logical port.

One IP from the list is selected as next hop. Just one. Choose wisely. πŸŽ€

  • output_port: optional weak reference to Logical_Router_Port β€” the Logical_Router_Port that the packet needs to be sent out through. It's optional, and when you don't specify it, OVN will automatically figure this out based on the nexthops column. When you do specify it, and there are multiple IP addresses on the router port and none of them are in the same subnet as nexthops, OVN chooses the first IP address as the one via which the nexthops are reachable.
NOTE: for now OVN does not support configuring the output port on ECMP reroute policies (the ones with more than one value in the nexthops column). 😭
  • bfd_sessions: set of weak reference to BFDs β€” reference to a BFD row if the route policy has some BFD sessions associated with it.
  • options : pkt_mark: optional string β€” marks the packet with the value specified when the router policy is applied. The CMS can inspect this packet marker and take some decisions if it wants. 🌈 Heads up tho: this value is not preserved when the packet goes out on the wire.

🌸 Common Columns: 🌸

  • external_ids: map of string-string pairs β€” see External IDs at the beginning of this document.

πŸ”₯ NAT TABLE πŸ”₯

Each record here represents one NAT rule. Slay.

✨ Summary: ✨

  • type β€” string, one of dnat, dnat_and_snat, or snat
  • external_ip β€” string
  • external_mac β€” optional string
  • external_port_range β€” string
  • logical_ip β€” string
  • logical_port β€” optional string
  • allowed_ext_ips β€” optional Address_Set
  • exempted_ext_ips β€” optional Address_Set
  • gateway_port β€” optional weak reference to Logical_Router_Port
  • match β€” string
  • priority β€” integer, in range 0 to 32,767
  • options : stateless β€” optional string
  • options : stateless_icmp_helper β€” optional string, either true or false
  • options : add_route β€” optional string
  • options : dynamic-routing-advertise β€” optional string
  • Common Columns:
    • external_ids β€” map of string-string pairs

πŸ” Details: πŸ”

  • type: string, one of dnat, dnat_and_snat, or snat β€” the type of the NAT rule, okay? Here's the vibe for each:
    • When type is dnat, the externally visible IP address external_ip is DNATted to the IP address logical_ip in the logical space.
    • When type is snat, IP packets whose source IP address either matches the IP address in logical_ip or is in the network provided by logical_ip get SNATed into the IP address in external_ip.
    • When type is dnat_and_snat, the externally visible IP address external_ip is DNATted to the IP address logical_ip in the logical space. AND on top of that, IP packets whose source IP address matches logical_ip get SNATed into the IP address in external_ip. Double duty, we love to see it. πŸ’…
  • external_ip: string β€” an IPv4 address.
  • external_mac: optional string β€” a MAC address.

This is only used on the gateway port on distributed routers. You must specify it in order for the NAT rule to be processed in a distributed manner on all chassis. If you don't specify it for a NAT rule on a distributed router, then this NAT rule gets processed in a centralized manner on the gateway port instance on the gateway chassis.

This MAC address must be unique on the logical switch that the gateway port is attached to. And if the MAC address used on the logical_port is globally unique, then that MAC address can be specified as this external_mac. πŸŽ€

  • external_port_range: string β€” L4 source port range.

It's a range of ports, and a port number gets picked from it to replace the source port of the to-be-NATed packet. This is basically PAT (port address translation), bestie.

The value of the column is in the format port_lo-port_hi. For example: external_port_range : "1-30000"

Valid range of ports is 1-65535. 🌸

  • logical_ip: string β€” an IPv4 network (e.g 192.168.1.0/24) or an IPv4 address.
  • logical_port: optional string β€” the name of the logical port where the logical_ip resides.

This is only used on distributed routers. You must specify it in order for the NAT rule to be processed in a distributed manner on all chassis. If you don't specify it for a NAT rule on a distributed router, then this NAT rule gets processed in a centralized manner on the gateway port instance on the gateway chassis.

  • allowed_ext_ips: optional Address_Set β€” it represents the Address Set of external ips that the NAT rule is applicable to. For snat type NAT rules, this refers to destination addresses. For dnat type NAT rules, this refers to source addresses.

This configuration overrides the default NAT behavior of applying a rule solely based on internal IP. Without it, NAT happens without considering the external IP (i.e dest/source for snat/dnat type rule). With it, the NAT rule is applied ONLY if the external ip is in the input Address Set. ✨

  • exempted_ext_ips: optional Address_Set β€” it represents the Address Set of external ips that the NAT rule is NOT applicable to. For snat type NAT rules, this refers to destination addresses. For dnat type NAT rules, this refers to source addresses.

This configuration overrides the default NAT behavior of applying a rule solely based on internal IP. Without it, NAT happens without considering the external IP (i.e dest/source for snat/dnat type rule). With it, the NAT rule is NOT applied if the external ip is in the input Address Set.

⚠️ If there are NAT rules in a logical router with overlapping IP prefixes (including /32), then you should avoid using exempted_ext_ips in this scenario, bestie: a. An snat rule (let's call it RULE1) with logical_ip PREFIX/MASK (let's say 50.0.0.0/24). b. An snat rule (let's call it RULE2) with logical_ip PREFIX/MASK+1 (let's say 50.0.0.0/25). c. Now if exempted_ext_ips is associated with RULE2, then a logical ip that matches both 50.0.0.0/24 and 50.0.0.0/25 may get RULE2 applied to it instead of RULE1. 😭 Messy!

allowed_ext_ips and exempted_ext_ips are mutually exclusive to each other. And if both Address Sets are set for a rule, then the NAT rule is not considered at all. Gone. πŸ’€

  • gateway_port: optional weak reference to Logical_Router_Port β€” a distributed gateway port in the Logical_Router_Port table where the NAT rule needs to be applied.

When multiple distributed gateway ports are configured on a Logical_Router, applying a NAT rule at each of the distributed gateway ports might not be desired. Consider the case where a logical router has 2 distributed gateway ports, one with networks 50.0.0.10/24 and the other with networks 60.0.0.10/24. If the logical router has a NAT rule of type snat, logical_ip 10.1.1.0/24 and external_ip 50.1.1.20/24, the rule needs to be selectively applied on matching packets entering/leaving through the distributed gateway port with networks 50.0.0.10/24.

When your logical router has multiple distributed gateway ports and you didn't set this column for a NAT rule, then the rule gets applied at the distributed gateway port that's in the same network as the external_ip of the NAT rule β€” if such a router port exists. And if the logical router only has a single distributed gateway port and this column isn't set for a NAT rule, the rule gets applied at that distributed gateway port even if the router port isn't in the same network as the external_ip of the NAT rule. Slay, it just sends it there anyway. πŸ’…

  • match: string β€” the packets that the NAT rules should match, on top of the match that gets created based on the NAT type, in the same expression language used for the match column in the OVN Southbound database's Logical_Flow table. This is how you get more fine-grained control over the NAT rule. ✨
  • priority: integer, in range 0 to 32,767 β€” the NAT rule's priority, bestie. Rules with numerically higher priority take precedence over the ones with lower. The priority is only taken into account if the match is defined. πŸŽ€
  • options : stateless: optional string β€” tells you if a dnat_and_snat rule should lead to connection tracking state or not.
  • options : stateless_icmp_helper: optional string, either true or false β€” applies only to stateless dnat_and_snat rules (that is, NATs with options:stateless set to true) on IPv4 addresses. Defaults to true.

A stateless DNAT rule rewrites only the outer IPv4 destination of inbound packets. For an inbound ICMPv4 error β€” for example a Fragmentation Needed message generated for Path MTU discovery, RFC 1191, or a Time Exceeded message generated for a traceroute probe β€” the original packet embedded in the ICMP payload still carries the external, post-NAT IP as its source. When the error reaches the downstream logical switch, conntrack cannot correlate the embedded tuple with the tracked outgoing flow, the packet gets marked ct.inv and dropped by the ACL stage, and PMTU discovery and traceroute just... break. 😭

When this option is true, ovn-northd emits an additional, higher-priority logical flow in the router ingress DNAT stage that matches the ICMPv4 errors which quote the original datagram β€” Destination Unreachable (type 3, which includes Fragmentation Needed), Time Exceeded (type 11) and Parameter Problem (type 12) β€” destined to the external IP. It rewrites the outer IPv4 destination to the logical IP and, using the icmp4.inner_ip4.src action, un-NATs the embedded inner IPv4 source from the external IP back to the logical IP, so that conntrack can correlate the error. This makes PMTU discovery and traceroute work end-to-end. 🌈 Set it to false to suppress this flow for an individual NAT entry.

  • options : add_route: optional string β€” if set to true, then neighbor routers will have logical flows added that will allow for routing to the NAT address. It also gets ARP resolution logical flows added. By setting this option, it means there's no reason to create a Logical_Router_Static_Route from neighbor routers to this NAT address. It also means that no ARP request is required for neighbor routers to learn the IP-MAC mapping for this NAT address. This option only applies to NATs of type dnat and dnat_and_snat. For more info about what flows get added for IP routes, please see the ovn-northd manpage section on IP Routing. πŸ‘‘
  • options : dynamic-routing-advertise: optional string β€” if the CMS sets options:dynamic-routing-redistribute to nat, this parameter is used by the CMS to enable/disable the advertisement of the current NAT external IP via the Advertised_Route table. Default: true.

For a distributed dnat_and_snat entry (a floating IP, with both external_mac and logical_port set) this also controls the EVPN Type-2 advertisement: when the provider Logical_Switch that carries the NAT's distributed gateway port has nat set in its other_config:dynamic-routing-redistribute, the external IP/MAC are published in the Advertised_MAC_Binding table. Setting this option to false opts the individual floating IP out of that advertisement as well. πŸ¦‹


πŸ’– Common Columns πŸ’–

  • external_ids: map of string-string pairs β€” see External IDs at the beginning of this document.

πŸ“ DHCP_Options TABLE πŸ“

OVN implements native DHCPv4 support, which caters to the common use case of providing an IPv4 address to a booting instance by providing stateless replies to DHCPv4 requests based on statically configured address mappings. To do this, it lets you configure a short list of DHCPv4 options that get applied at each compute host running ovn-controller. πŸ’…

OVN also implements native DHCPv6 support which provides stateless replies to DHCPv6 requests. ✨

🌸 Summary 🌸

cidr                          string
DHCPv4 options:
  Mandatory DHCPv4 options:
     options : server_id      optional string
     options : server_mac     optional string
     options : lease_time     optional string, containing an integer, in
                              range 0 to 4,294,967,295
  IPv4 DHCP Options:
     options : router         optional string
     options : netmask        optional string
     options : dns_server     optional string
     options : log_server     optional string
     options : lpr_server     optional string
     options : swap_server    optional string
     options : policy_filter  optional string
     options : router_solicitation
                              optional string
     options : nis_server     optional string
     options : ntp_server     optional string
     options : netbios_name_server
                              optional string
     options : classless_static_route
                              optional string
     options : ms_classless_static_route
                              optional string
     options : next_server    optional string
  Boolean DHCP Options:
     options : ip_forward_enable
                              optional string, either 0 or 1
     options : router_discovery
                              optional string, either 0 or 1
     options : ethernet_encap optional string, either 0 or 1
  Integer DHCP Options:
     options : default_ttl    optional string, containing an integer, in
                              range 0 to 255
     options : tcp_ttl        optional string, containing an integer, in
                              range 0 to 255
     options : mtu            optional string, containing an integer, in
                              range 68 to 65,535
     options : T1             optional string, containing an integer, in
                              range 68 to 4,294,967,295
     options : T2             optional string, containing an integer, in
                              range 68 to 4,294,967,295
     options : arp_cache_timeout
                              optional string, containing an integer, in
                              range 0 to 255
     options : tcp_keepalive_interval
                              optional string, containing an integer, in
                              range 0 to 255
     options : netbios_node_type
                              optional string, containing an integer, in
                              range 0 to 255
  String DHCP Options:
     options : wpad           optional string
     options : bootfile_name  optional string
     options : path_prefix    optional string
     options : tftp_server_address
                              optional string
     options : hostname       optional string
     options : domain_name    optional string
     options : bootfile_name_alt
                              optional string
     options : broadcast_address
                              optional string
  DHCP Options of type host_id:
     options : tftp_server    optional string
   DHCP Options of type domains:
     options : domain_search_list
                              optional string
DHCPv6 options:
  Mandatory DHCPv6 options:
     options : server_id      optional string
  IPv6 DHCPv6 options:
     options : dns_server     optional string
  String DHCPv6 options:
     options : domain_search  optional string
     options : dhcpv6_stateless
                              optional string
     options : fqdn           optional string
Common Columns:
  external_ids                map of string-string pairs

πŸŽ€ Details πŸŽ€

  • cidr: string β€” the DHCPv4/DHCPv6 options get included if the logical port has its IP address in this cidr. πŸ’–

🌟 DHCPv4 options 🌟

The CMS should define the set of DHCPv4 options as key/value pairs in the options column of this table. For ovn-controller to include these DHCPv4 options, the dhcpv4_options of Logical_Switch_Port should refer to an entry in this table. πŸ“

πŸ’« Mandatory DHCPv4 options πŸ’«

The following options must be defined.

  • options : server_id: optional string β€” the IP address for the DHCP server to use. This should be in the subnet of the offered IP. This is also included in the DHCP offer as option 54, "server identifier." 🫢
  • options : server_mac: optional string β€” the Ethernet address for the DHCP server to use.
  • options : lease_time: optional string, containing an integer, in range 0 to 4,294,967,295 β€” the offered lease time in seconds.

The DHCPv4 option code for this option is 51.

🌈 IPv4 DHCP Options 🌈

Below are the supported DHCPv4 options whose values are an IPv4 address, e.g. 192.168.1.1. Some options accept multiple IPv4 addresses enclosed within curly braces, e.g. {192.168.1.2, 192.168.1.3}. Please refer to RFC 2132 for more details on DHCPv4 options and their codes. πŸ”₯

  • options : router: optional string β€” the IP address of a gateway for the client to use. This should be in the subnet of the offered IP. The DHCPv4 option code for this option is 3.
  • options : netmask: optional string β€” the DHCPv4 option code for this option is 1.
  • options : dns_server: optional string β€” the DHCPv4 option code for this option is 6.
  • options : log_server: optional string β€” the DHCPv4 option code for this option is 7.
  • options : lpr_server: optional string β€” the DHCPv4 option code for this option is 9.
  • options : swap_server: optional string β€” the DHCPv4 option code for this option is 16.
  • options : policy_filter β€” optional string. The DHCPv4 option code for this option is 21.
  • options : router_solicitation β€” optional string. The DHCPv4 option code for this option is 32.
  • options : nis_server β€” optional string. The DHCPv4 option code for this option is 41.
  • options : ntp_server β€” optional string. The DHCPv4 option code for this option is 42.
  • options : netbios_name_server β€” optional string. The DHCPv4 option code for this option is 44.
  • options : classless_static_route β€” optional string. The DHCPv4 option code for this option is 121.

bestie this one can hold one or more static routes, and every single route is a destination descriptor plus the IP address of the router that should be used to reach that destination. Please see RFC 3442 for more details. ✨

Example: {30.0.0.0/24,10.0.0.10, 0.0.0.0/0,10.0.0.1}

  • options : ms_classless_static_route β€” optional string. The DHCPv4 option code for this option is 249. This option is similar to classless_static_route supported by Microsoft Windows DHCPv4 clients.
  • options : next_server β€” optional string. The DHCPv4 option code for setting the "Next server IP address" field in the DHCP header.

Boolean DHCP Options πŸ’–

These options accept a Boolean value, expressed as 0 for false or 1 for true.

  • options : ip_forward_enable β€” optional string, either 0 or 1. The DHCPv4 option code for this option is 19.
  • options : router_discovery β€” optional string, either 0 or 1. The DHCPv4 option code for this option is 31.
  • options : ethernet_encap β€” optional string, either 0 or 1. The DHCPv4 option code for this option is 36.

Integer DHCP Options πŸ”’

These options accept a nonnegative integer value.

  • options : default_ttl β€” optional string, containing an integer, in range 0 to 255. The DHCPv4 option code for this option is 23.
  • options : tcp_ttl β€” optional string, containing an integer, in range 0 to 255. The DHCPv4 option code for this option is 37.
  • options : mtu β€” optional string, containing an integer, in range 68 to 65,535. The DHCPv4 option code for this option is 26.
  • options : T1 β€” optional string, containing an integer, in range 68 to 4,294,967,295. This specifies the time interval from address assignment until the client begins trying to renew its address. The DHCPv4 option code for this option is 58.
  • options : T2 β€” optional string, containing an integer, in range 68 to 4,294,967,295. This specifies the time interval from address assignment until the client begins trying to rebind its address. The DHCPv4 option code for this option is 59.
  • options : arp_cache_timeout β€” optional string, containing an integer, in range 0 to 255. The DHCPv4 option code for this option is 35. This option specifies the timeout in seconds for ARP cache entries.
  • options : tcp_keepalive_interval β€” optional string, containing an integer, in range 0 to 255. The DHCPv4 option code for this option is 38. This option specifies the interval that the client TCP should wait before sending a keepalive message on a TCP connection.
  • options : netbios_node_type β€” optional string, containing an integer, in range 0 to 255. The DHCPv4 option code for this option is 46.

String DHCP Options πŸŽ€

These options accept a string value.

  • options : wpad β€” optional string. The DHCPv4 option code for this option is 252. This option is used as part of web proxy auto discovery to provide a URL for a web proxy.
  • options : bootfile_name β€” optional string. The DHCPv4 option code for this option is 67. This option is used to identify a bootfile.
  • options : path_prefix β€” optional string. The DHCPv4 option code for this option is 210. In PXELINUX' case this option is used to set a common path prefix, instead of deriving it from the bootfile name.
  • options : tftp_server_address β€” optional string. The DHCPv4 option code for this option is 150. The option contains one or more IPv4 addresses that the client MAY use. This option is Cisco proprietary, the IEEE standard that matches with this requirement is option 66 (tftp_server).
  • options : hostname β€” optional string. The DHCPv4 option code for this option is 12. If set, indicates the DHCPv4 option "Hostname". Alternatively, this option can be configured in options:hostname column in table Logical_Switch_Port. If Hostname option value is set in both conflicting Logical_Switch_Port and DHCP_Options tables, Logical_Switch_Port takes precedence.
ok so lowkey remember this one: Logical_Switch_Port wins the tiebreak. no cap. πŸ‘‘
  • options : domain_name β€” optional string. The DHCPv4 option code for this option is 15. This option specifies the domain name that client should use when resolving hostnames via the Domain Name System.
  • options : bootfile_name_alt β€” optional string. "bootfile_name_alt" option is used to support iPXE. When both "bootfile_name" and "bootfile_name_alt" are provided by the CMS, "bootfile_name" will be used for option 67 if the dhcp request contains etherboot option (175), otherwise "bootfile_name_alt" will be used.
  • options : broadcast_address β€” optional string. The DHCPv4 option code for this option is 28. This option specifies the IP address used as a broadcast address.

DHCP Options of type host_id πŸ¦‹

These options accept either an IPv4 address or a string value.

  • options : tftp_server β€” optional string. The DHCPv4 option code for this option is 66.

DHCP Options of type domains 🌸

These options accept string value which is a comma separated list of domain names. The domain names are encoded based on RFC 1035.

  • options : domain_search_list β€” optional string. The DHCPv4 option code for this option is 119.

DHCPv6 options 🌈

OVN also implements native DHCPv6 support. The CMS should define the set of DHCPv6 options as key/value pairs. The define DHCPv6 options will be included in the DHCPv6 response to the DHCPv6 Solicit/Request/Confirm packet from the logical ports having the IPv6 addresses in the cidr.

Mandatory DHCPv6 options πŸ’…

The following options must be defined.

  • options : server_id β€” optional string. The Ethernet address for the DHCP server to use. This is also included in the DHCPv6 reply as option 2, Server Identifier to carry a DUID identifying a server between a client and a server. ovn-controller defines DUID based on Link-layer Address [DUID-LL].

IPv6 DHCPv6 options πŸ’™

Below are the supported DHCPv6 options whose values are an IPv6 address, e.g. aef0::4. Some options accept multiple IPv6 addresses enclosed within curly braces, e.g. {aef0::4, aef0::5}. Please refer to RFC 3315 for more details on DHCPv6 options and their codes.

  • options : dns_server β€” optional string. The DHCPv6 option code for this option is 23. This option specifies the DNS servers that the VM should use.

String DHCPv6 options πŸ“

These options accept string values.

  • options : domain_search β€” optional string. The DHCPv6 option code for this option is 24. This option specifies the domain search list the client should use to resolve hostnames with DNS.

Example: "ovn.org".

  • options : dhcpv6_stateless β€” optional string. This option specifies the OVN native DHCPv6 will work in stateless mode, which means OVN native DHCPv6 will not offer IPv6 addresses for VM/VIF ports, but only reply other configurations, such as DNS and domain search list. When setting this option with string value "true", VM/VIF will configure IPv6 addresses by stateless way. Default value for this option is false.
  • options : fqdn β€” optional string. The DHCPv6 option code for this option is 39. If set, indicates the DHCPv6 option "FQDN".

Common Columns

  • external_ids β€” map of string-string pairs. See External IDs at the beginning of this document.

DHCP_Relay TABLE πŸ›°οΈ

OVN implements native DHCPv4 relay support which caters to the common use case of relaying the DHCP requests to external DHCP server.

Summary: ✨

name                          string
servers                       optional string
options                       map of string-string pairs
Common Columns:
  external_ids                map of string-string pairs

Details: πŸ’œ

  • name β€” string. A name for the DHCP Relay.
  • servers β€” optional string. The DHCPv4 server IP address.
  • options β€” map of string-string pairs. Future purpose.

Common Columns

  • external_ids β€” map of string-string pairs. See External IDs at the beginning of this document.

🌈 Connection TABLE 🌈

okay so this table is literally the whole setup for a database connection to an Open vSwitch database (OVSDB) client. πŸ’–

It's mostly here to configure the Open vSwitch database server (ovsdb-server).

And bestie, plot twist: the Open vSwitch database server can initiate and maintain active connections to remote clients all by itself. It can also sit there and listen for database connections. main character energy fr fr πŸ‘‘


✨ Summary ✨

Core Features:

  • target β€” string (must be unique within table)

Client Failure Detection and Handling:

  • max_backoff β€” optional integer, at least 1,000
  • inactivity_probe β€” optional integer

Status:

  • is_connected β€” boolean
  • status : last_error β€” optional string
  • status : state β€” optional string, one of ACTIVE, BACKOFF, CONNECTING, IDLE, or VOID
  • status : sec_since_connect β€” optional string, containing an integer, at least 0
  • status : sec_since_disconnect β€” optional string, containing an integer, at least 0
  • status : locks_held β€” optional string
  • status : locks_waiting β€” optional string
  • status : locks_lost β€” optional string
  • status : n_connections β€” optional string, containing an integer, at least 2
  • status : bound_port β€” optional string, containing an integer

Common Columns:

  • external_ids β€” map of string-string pairs
  • other_config β€” map of string-string pairs

πŸ’… Details πŸ’…

Core Features πŸŽ€

target: string (must be unique within table)

these are the connection methods for clients, aka how the whole thing actually reaches out. 🫢

The following connection methods are currently supported:

  • ssl:host[:port] β€” connects to the specified SSL/TLS port on host. host can be a DNS name (if it was built with the unbound library) or an IP address. You must hand over a valid SSL/TLS configuration when you use this form, and that config can come from command-line options or from the SSL table. If port isn't specified, it defaults to 6640. Heads up though: SSL/TLS support is an optional feature and it is not always built as part of OVN or Open vSwitch. πŸ’€
  • tcp:host[:port] β€” connects to the specified TCP port on host, which again can be a DNS name (if built with the unbound library) or an IP address. If host is an IPv6 address, wrap it in square brackets, like tcp:[::1]:6640. If port isn't specified, it defaults to 6640.
  • pssl:[port][:host] β€” listens for SSL/TLS connections on the specified TCP port. Pass 0 for port and the kernel will pick an available port for you, iconic. If host is given β€” and it can be a DNS name (if built with the unbound library) or an IP address β€” then connections get restricted to the resolved or specified local IP address (either IPv4 or IPv6). If host is an IPv6 address, wrap it in square brackets, like pssl:6640:[::1]. If host isn't specified, it listens only on IPv4 (but not IPv6) addresses. You must provide a valid SSL/TLS configuration for this form, and that can come from command-line options or from the SSL table. If port isn't specified, it defaults to 6640. And yeah, same warning: SSL/TLS support is optional and not always built into OVN or Open vSwitch. 😭
  • ptcp:[port][:host] β€” listens for connections on the specified TCP port. Pass 0 for port to let the kernel pick an available port. If host is given β€” DNS name (if built with the unbound library) or IP address β€” connections get restricted to the resolved or specified local IP address (either IPv4 or IPv6). If host is IPv6, wrap it in square brackets, like ptcp:6640:[::1]. If host isn't specified, it listens only on IPv4 addresses. If port isn't specified, it defaults to 6640.
When multiple clients are configured, the target values must be unique. Duplicate target values yield unspecified results. do not do this bestie, just don't πŸ™ˆ

Client Failure Detection and Handling 🌸

  • max_backoff: optional integer, at least 1,000 β€” the maximum number of milliseconds to wait between connection attempts. Default is implementation-specific.
  • inactivity_probe: optional integer β€” the maximum number of milliseconds of idle time on the connection to the client before it sends an inactivity probe message. If Open vSwitch doesn't communicate with the client for that many seconds, it sends a probe. And if no response comes back within that same additional amount of time, Open vSwitch assumes the connection is broken and tries to reconnect. Default is implementation-specific. A value of 0 disables inactivity probes entirely.

Status πŸ¦‹

The key-value pair of is_connected is always updated. The other key-value pairs in the status columns may or may not be updated, depending on the target type.

When target specifies a connection method that listens for inbound connections (like 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 those two key-value pairs mentioned above that go with inbound connection targets. Those are omitted.

  • is_connected: boolean β€” true if it's currently connected to this client, 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 only exists if an error has actually happened.
  • status : state: optional string, one of ACTIVE, BACKOFF, CONNECTING, IDLE, or VOID β€” 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're provided only for human consumption, so don't build anything clever on top of them. πŸ’…

  • status : sec_since_connect: optional string, containing an integer, at least 0 β€” how much time has passed since this client last successfully connected to the database, in seconds. The value is empty if the client has never successfully been connected.
  • status : sec_since_disconnect: optional string, containing an integer, at least 0 β€” how much time has passed since this client last disconnected from the database, in seconds. The value is empty if the client has never disconnected.
  • status : locks_held: optional string β€” a space-separated list of the names of OVSDB locks that the connection holds. Omitted if the connection doesn't hold any locks.
  • status : locks_waiting: optional string β€” a space-separated list of the names of OVSDB locks that the connection is currently waiting to acquire. Omitted if the connection isn't waiting for any locks.
  • status : locks_lost: optional string β€” a 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 least 2 β€” when target specifies a connection method that listens for inbound connections (like ptcp: or pssl:) and more than one connection is actually active, this value is the number of active connections. Otherwise this key-value pair is omitted.
  • status : bound_port: optional string, containing an integer β€” when target is ptcp: or pssl:, this is the TCP port on which the OVSDB server is listening. (Super useful when target specifies a port of 0, letting the kernel choose any available port.)

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
  • other_config: map of string-string pairs

πŸŽ€ DNS TABLE πŸŽ€

Each row in this table stores the DNS records. The Logical_Switch table's dns_records references these records. πŸ¦‹

✨ Summary ✨

  • records β€” map of string-string pairs
  • options : ovn-owned β€” optional string
  • external_ids β€” map of string-string pairs

πŸ’… Details πŸ’…

  • records: map of string-string pairs β€” a key-value pair of DNS records, where the key is the DNS query name and the value is a string of IP address(es) separated by a comma or a space. For PTR requests, the key-value pair can be Reverse IPv4 address.in-addr.arpa and the value is the DNS domain name. For IPv6 addresses, the key has to be Reverse IPv6 address.ip6.arpa.

Example:

"vm1.ovn.org" = "10.0.0.4 aef0::4"

Example:

"4.0.0.10.in-addr.arpa" = "vm1.ovn.org"
  • options : ovn-owned: optional string β€” if set to true, then OVN will be the main responsible for DNS Records within this row. ✨

A DNS row with this option set to true can be created for domains that the user needs to configure locally and doesn't care about IPv6 β€” only interested in IPv4, or vice versa. This will let ovn send an IPv4 DNS reply and reject/ignore IPv6 queries, saving you the wait for a timeout on those uninteresting queries. no cap, that's the whole point. πŸ™Œ

  • external_ids: map of string-string pairs β€” see External IDs at the beginning of this document.

πŸ’– SSL TABLE πŸ’–

SSL/TLS configuration for ovn-nb database access. Basically the lil corner of the db where you tell it how to do secure handshakes. πŸ”

πŸ“‹ Summary πŸ“‹

  • private_key string
  • certificate string
  • ca_cert string
  • bootstrap_ca_cert boolean
  • ssl_protocols string
  • ssl_ciphers string
  • ssl_ciphersuites string
  • Common Columns:
    • external_ids β€” map of string-string pairs

πŸ” Details πŸ”

  • private_key string β€” name of a PEM file holding the private key that gets used as the switch's identity for SSL/TLS connections to the controller. πŸ—οΈ
  • certificate string β€” name of a PEM file holding a certificate, signed by the certificate authority (CA) the controller and manager use, that certifies the switch's private key and says "yeah this switch is trustworthy." πŸŽ€
  • ca_cert string β€” name of a PEM file holding the CA certificate, which is what you use to verify the switch is talking to a controller you can actually trust. πŸ’…
  • bootstrap_ca_cert boolean β€” if you set this to true, Open vSwitch will try to grab the CA certificate from the controller on its very first SSL/TLS connection and save it into the named PEM file. If it works, it immediately drops the connection and reconnects, and from then on every single SSL/TLS connection has to be authenticated by a certificate signed by that CA certificate it just obtained. ✨
Big warning bestie: this option exposes your SSL/TLS connection to a man-in-the-middle attack that grabs the initial CA certificate. It can still be genuinely useful for bootstrapping, but like… know what you're doing. 😭
  • ssl_protocols string β€” a range, or a comma- or space-delimited list, of the SSL/TLS protocols you wanna enable for SSL/TLS connections.

The supported protocols include TLSv1.2 and TLSv1.3. Ranges can be given as two protocol names separated with a dash (TLSv1.2-TLSv1.3), or as a single protocol name with a plus sign (TLSv1.2+). The value can be a list of protocols or exactly one range. Ranges are the preferred way to specify protocols, and the configuration always behaves as if the range between the minimum and the maximum specified version is provided β€” like, if the value is set to TLSv1.X,TLSv1.(X+2), then TLSv1.(X+1) will also be enabled as if it were a range. And regardless of order, the highest protocol supported by both sides gets chosen when making the connection. 🀝

When this option is omitted, the default is TLSv1.2+.

  • ssl_ciphers string β€” list of ciphers (in OpenSSL cipher string format) to support for SSL/TLS connections with TLSv1.2. When omitted, the default is DEFAULT:@SECLEVEL=2. πŸ”’
  • ssl_ciphersuites string β€” list of ciphersuites (in OpenSSL ciphersuites string format) to support for SSL/TLS connections with TLSv1.3 and later. When this option is omitted, the default value from OpenSSL is used. 🌸

πŸ’« 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

πŸ¦‹ Gateway_Chassis TABLE πŸ¦‹

Association of a chassis to a logical router port. The traffic going out through a specific router port gets redirected to a chassis, or to a whole set of them in high availability configurations. It's giving "traffic bouncer, but make it redundant." 🚦

πŸ“‹ Summary πŸ“‹

  • name β€” string (must be unique within table)
  • chassis_name β€” string
  • priority β€” integer, in range 0 to 32,767
  • options β€” map of string-string pairs
  • Common Columns:
    • external_ids β€” map of string-string pairs

πŸ” Details πŸ”

  • name β€” string (must be unique within table). Name of the Gateway_Chassis. A suggested, but not required, naming convention is ${port_name}_${chassis_name}. πŸ’–
  • chassis_name β€” string. Name of the chassis that we want to redirect traffic through for the associated logical router port. This value must match the name column of the Chassis table in the OVN_Southbound database. No cap, it has to match. 🎯
  • priority β€” integer, in range 0 to 32,767. This is the priority of a chassis among all Gateway_Chassis belonging to the same logical router port. πŸ†
  • options β€” map of string-string pairs. Reserved for future use. (mysterious. iconic. πŸ’…)

πŸ’« Common Columns πŸ’«

  • external_ids β€” map of string-string pairs. See External IDs at the beginning of this document.

πŸ‘‘ HA_Chassis_Group TABLE πŸ‘‘

Table representing a group of chassis which can provide high availability services. Each chassis in the group is represented by the table HA_Chassis. The HA chassis with the highest priority will be the active chassis of this group. If the active chassis failover is detected, the HA chassis with the next higher priority takes over the responsibility of providing the HA. If a distributed gateway router port references a row in this table, then the active HA chassis in this group provides the gateway functionality. ✨ main character gets the job, backup gets it the second main character fumbles. ✨

πŸ“‹ Summary πŸ“‹

  • name β€” string (must be unique within table)
  • ha_chassis β€” set of HA_Chassises
  • Common Columns:
    • external_ids β€” map of string-string pairs

πŸ” Details πŸ”

  • name β€” string (must be unique within table). Name of the HA_Chassis_Group. Name should be unique. 🫢
  • ha_chassis β€” set of HA_Chassises. A list of HA chassis which belongs to this group.

πŸ’« Common Columns πŸ’«

  • external_ids β€” map of string-string pairs. See External IDs at the beginning of this document.

🌈 HA_Chassis TABLE 🌈

πŸ“‹ Summary πŸ“‹

  • chassis_name β€” string
  • priority β€” integer, in range 0 to 32,767
  • Common Columns:
    • external_ids β€” map of string-string pairs

πŸ” Details πŸ”

  • chassis_name β€” string. Name of the chassis which is part of the HA chassis group. The value must match the name column of the Chassis table in the OVN_Southbound database. πŸ“Œ
  • priority β€” integer, in range 0 to 32,767. Priority of the chassis. Chassis with highest priority will be the active chassis. πŸ₯‡

πŸ’« Common Columns πŸ’«

  • external_ids β€” map of string-string pairs. See External IDs at the beginning of this document.

πŸ’œ BFD TABLE πŸ’œ

Contains BFD parameter for ovn-controller BFD configuration. OVN BFD implementation is used to provide detection of failures in the path between adjacent forwarding engines, including the OVN interfaces. OVN BFD provides link status info to OVN northd in order to update logical flows according to the status of BFD endpoints. In the current implementation OVN BFD is used to check next-hop status for ECMP routes. Please note the BFD table refers to the OVN BFD implementation and not to the OVS legacy one. 🚨 (yes, this is the OVN one, don't get it twisted bestie)

πŸ“‹ Summary πŸ“‹

Configuration:

  • logical_port β€” string
  • dst_ip β€” string
  • min_tx β€” optional integer, at least 1
  • min_rx β€” optional integer
  • detect_mult β€” optional integer, at least 1
  • options β€” map of string-string pairs
  • external_ids β€” map of string-string pairs

Status Reporting:

  • status β€” optional string, one of admin_down, down, init, or up

πŸ” Details πŸ”

βš™οΈ Configuration βš™οΈ

ovn-northd reads configuration from these columns. πŸ“–

  • logical_port β€” string. OVN logical port when BFD engine is running. πŸƒβ€β™€οΈ
  • dst_ip β€” string. BFD peer IP address.
  • min_tx β€” optional integer, at least 1. This is the minimum interval, in milliseconds, that the local system would like to use when transmitting BFD Control packets, less any jitter applied. The value zero is reserved. Default value is 1000 ms. ⏱️
  • min_rx β€” optional integer. This is the minimum interval, in milliseconds, between received BFD Control packets that this system is capable of supporting, less any jitter applied by the sender. If this value is zero, the transmitting system does not want the remote system to send any periodic BFD Control packets. πŸ“­
  • detect_mult β€” optional integer, at least 1. Detection time multiplier. The negotiated transmit interval, multiplied by this value, provides the Detection Time for the receiving system in Asynchronous mode. Default value is 5. βœ–οΈ
  • options β€” map of string-string pairs. Reserved for future use.
  • external_ids β€” map of string-string pairs. See External IDs at the beginning of this document.

πŸ“‘ Status Reporting πŸ“‘

ovn-northd writes BFD status into these columns. ✍️

  • status β€” optional string, one of admin_down, down, init, or up. BFD port logical states. Possible values are:
    • admin_down
    • down
    • init
    • up

πŸŽ€ Static_MAC_Binding TABLE πŸŽ€

Each record represents a Static_MAC_Binding entry for a logical router. πŸ“

πŸ“‹ Summary πŸ“‹

Configuration:

  • logical_port β€” string
  • ip β€” string
  • mac β€” string
  • override_dynamic_mac β€” boolean

πŸ” Details πŸ”

βš™οΈ Configuration βš™οΈ

ovn-northd reads configuration from these columns and propagates the value to SBDB. πŸ“€

  • logical_port β€” string. The logical router port for the binding. πŸ”Œ
  • ip β€” string. The bound IP address.
  • mac β€” string. The Ethernet address to which the IP is bound. πŸ”—
  • override_dynamic_mac β€” boolean. Override dynamically learnt MACs. πŸ’₯

🌸 Chassis_Template_Var TABLE 🌸

Okay bestie, picture this: one record per chassis, and each one has a map, variables, linking template variable names to their values for that specific chassis. A template variable has a name and potentially different values on different hypervisors in the OVN cluster. For example, two rows, R1 = (.chassis=C1, variables={(N: V1)}) and R2 = (.chassis=C2, variables={(N: V2)}) will make ovn-controller running on chassis C1 and C2 interpret the token N either as V1 (on C1) or as V2 (on C2). Users can refer to template variables from within other logical components, e.g., within ACL, QoS or Logical_Router_Policy matches or from Load_Balancer VIP and backend definitions.

And if a template variable is referenced on a chassis for which that variable is not defined, then ovn-controller running on that chassis will just interpret it as a raw string literal. <em>Periodt.</em> πŸ’…

Summary: ✨

  • chassis β€” string (must be unique within table)
  • variables β€” map of string-string pairs
  • Common Columns:
    • external_ids β€” map of string-string pairs

Details: πŸ’–

chassis: string (must be unique within table)

The chassis this set of variable values applies to.

variables: map of string-string pairs

The set of variable values for a given chassis.

Common Columns: 🫢

  • external_ids β€” map of string-string pairs. Peep External IDs at the beginning of this document.

✨ Sampling_App TABLE ✨

Summary: πŸŽ€

  • type β€” string, one of acl-est, acl-new, or drop (must be unique within table)
  • id β€” integer, in range 1 to 255
  • Common Columns:
    • external_ids β€” map of string-string pairs

Details: πŸ¦‹

type: string, one of acl-est, acl-new, or drop (must be unique within table)

The type of the application to be configured for sampling. Currently supported options are: "drop", "acl-new", "acl-est".

id: integer, in range 1 to 255

The identifier to be encoded in the samples generated for this type of application. This identifier is used as part of the sample’s observation domain ID.

Common Columns: 🌸

  • external_ids β€” map of string-string pairs. Peep External IDs at the beginning of this document.

🌈 Network_Function_Group TABLE 🌈

Each row contains a list of Network_Function. Traffic redirection/mirroring is achieved by referencing a Network_Function_Group from an ACL. For inline mode, health monitoring of each Network_Function is performed based on parameters defined in Network_Function_Health_Check. Health monitoring is not applicable for vtap mode; a vtap network function is always considered active as long as its port is bound. Traffic matching the ACL is redirected (inline) or mirrored (vtap) to one of the active Network_Functions. If all are detected as down, the fallback method is applied.

Known limitation (inline mode): in topologies where a post-NF flood copy may reach the same logical inport from a different node than the packet’s original ingress node, the lookup runs on a different node than where the inport was learned, so loopback copies are not identified. For example: OVN-IC L2 stretch with the NF and IC gateway on different chassis. With unknown-addressed ports, the post-NF packet can be flooded across AZs and come back to the source AZ via another node, so the lookup does not hit the original learn entry.

Summary: πŸ’œ

  • name β€” string (must be unique within table)
  • id β€” integer, in range 1 to 255 (must be unique within table)
  • fallback β€” optional string, either fail-close or fail-open
  • network_function β€” set of Network_Functions
  • network_function_active β€” optional Network_Function
  • mode β€” string, either inline or vtap
  • Common Columns:
    • external_ids β€” map of string-string pairs

Details: πŸ”₯

name: string (must be unique within table)

Name of the Network_Function_Group. Name should be unique.

id: integer, in range 1 to 255 (must be unique within table)

A unique integer between 1 and 255 must be assigned to each Network_Function_Group.

fallback: optional string, either fail-close or fail-open

Fallback setting when no active network functions are available.

Supports following fallback mechanisms. If not specified: for inline mode, fail-close is applied when no active Network Functions are available; for vtap mode, fallback is always fail-open.

  • fail-open β€” Traffic bypasses Network Function and gets allowed when there is no active Network Function available.
  • fail-close β€” Traffic gets dropped when there is no active Network Function available.

network_function: set of Network_Functions

A list of network functions which belong to this group.

network_function_active: optional Network_Function

Current active Network_Function. This column is populated by northd based on health monitoring status for inline mode. For vtap mode, health monitoring is not applicable; northd sets the active network function based on port binding status.

mode: string, either inline or vtap

Network Function insertion mode.

Supports following modes.

  • inline β€” In this mode, traffic redirection happens inline through active Network Function ports.
  • vtap β€” In this mode, traffic is mirrored to active Network Function port.

Common Columns: 🫢

  • external_ids β€” map of string-string pairs. Peep External IDs at the beginning of this document.

πŸ¦‹ Network_Function TABLE πŸ¦‹

Each row represents one network function entity. This contains a single logical switch port when deployed in vtap mode and pair of logical switch ports when deployed in inline mode. In inline mode, traffic that matches the ACL is redirected to inport for from-lport ACLs and to outport for to-lport ACLs. Once the traffic is received on the other port, it continues through the standard OVN pipeline. Response traffic follows the reverse path: it is redirected to the outport for from-lport ACLs and to the inport for to-lport ACLs. Once the traffic is received on the other port, it is processed by the regular OVN pipeline.

NOTE: 1. The Network Function MUST NOT modify the packet headers. 2. The Network Function is not supported when used in conjunction with Load Balancer.

In vtap mode, traffic that matches the ACL is mirrored to inport in all cases.

Summary: 🌟

  • name β€” string (must be unique within table)
  • id β€” integer, in range 1 to 255 (must be unique within table)
  • inport β€” Logical_Switch_Port
  • outport β€” optional Logical_Switch_Port
  • health_check β€” optional Network_Function_Health_Check
  • Common Columns:
    • external_ids β€” map of string-string pairs

Details: πŸ’«

name: string (must be unique within table)

Name of the Network_Function. Name should be unique.

id: integer, in range 1 to 255 (must be unique within table)

A unique integer between 1 and 255 must be assigned to each Network_Function.

inport: Logical_Switch_Port

Logical_Switch_Port where request traffic for from-lport ACL and response traffic for to-lport ACL is redirected when network function is deployed in inline mode. In vtap mode, traffic matching both to-lport and from-lport ACLs is mirrored to the inport.

outport: optional Logical_Switch_Port

Logical_Switch_Port where request traffic for to-lport ACL and response traffic for from-lport ACL is redirected when network function is deployed in inline mode. This is not applicable when network function is deployed in vtap mode.

health_check: optional Network_Function_Health_Check

Network_Function_Health_Check associated with this network function. Health check is applicable only for inline mode. It is not applicable when the network function is deployed in vtap mode; this column should be left unset for vtap network functions.

Common Columns: 🫢

  • external_ids β€” map of string-string pairs. Peep External IDs at the beginning of this document.

πŸ’œ Network_Function_Health_Check TABLE πŸ’œ

Each row represents one network function health check.

Summary: 🩺

  • name β€” string (must be unique within table)
  • Health check options:
    • options : interval β€” optional string, containing an integer
    • options : timeout β€” optional string, containing an integer
    • options : success_count β€” optional string, containing an integer
    • options : failure_count β€” optional string, containing an integer
  • Common Columns:
    • external_ids β€” map of string-string pairs

Details: 🧚

name: string (must be unique within table)

Name of the Network_Function_Health_Check. Name should be unique.

Health check options: πŸ’–

options : interval: optional string, containing an integer

The interval, in seconds, between health checks. Default: 5s.

options : timeout: optional string, containing an integer

The time, in seconds, after which a health check times out. Default: 3s.

options : success_count: optional string, containing an integer

The number of successful checks after which the Network_Function is considered online. Default: 1.

options : failure_count: optional string, containing an integer

The number of failure checks after which the Network_Function is considered offline. Default: 1.

Common Columns: 🫢

  • external_ids β€” map of string-string pairs. Peep External IDs at the beginning of this document.

That’s the whole ovn-nb(5) bestie checklist, and you ate. Source/version: Open vSwitch 26.09.1, DB Schema 7.19.0, with the footer date doing its little timestamp thing. No cap, you’re officially fluent in northbound database lore. πŸ’…βœ¨πŸŽ€

πŸ“¦ where this page comes from