From patchwork Wed Mar 18 18:45:44 2020
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
X-Patchwork-Submitter: Ben Pfaff
+ Consider the preceding diagram again: +
+ ++ LSlocal + | + LR1 + | + +----+----+ + | | | + LS1 ... LSn ++ +
+ Suppose that each logical switch LS1, ..., LSn is bridged to a physical
+ VLAN-tagged network attached to a localnet
port on LSlocal,
+ over a distributed gateway port on LR1. If a packet originating on
+ LSi is destined to the external network, OVN sends it to the
+ gateway chassis over a tunnel. There, the packet traverses LR1's logical
+ router pipeline, possibly undergoes NAT, and eventually ends up at
+ LSlocal's localnet
port. If all of the physical links in the
+ network have the same MTU, then the packet's transit across a tunnel causes
+ an MTU problem: tunnel overhead prevents a packet that uses the full
+ physical MTU from crossing the tunnel to the gateway chassis (without
+ fragmentation).
+
+ OVN offers two solutions to this problem, the
+ reside-on-redirect-chassis
and redirect-type
+ options. Both solutions require each logical switch LS1, ..., LSn to
+ include a localnet
logical switch port LN1, ..., LNn
+ respectively, that is present on each chassis. Both cause packets to be
+ sent over the localnet
ports instead of tunnels. They differ
+ in which packets--some or all--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.
+
+ The first solution is the reside-on-redirect-chassis
option
+ for logical router ports. Setting this option on a LRP from (e.g.) LS1 to
+ LR1 disables forwarding from LS1 to LR1 except on the gateway chassis. On
+ chassis other than the gateway chassis, this single change means that
+ packets that would otherwise have been forwarded to LR1 are instead
+ forwarded to LN1. The instance of LN1 on the gateway chassis then receives
+ the packet and forwards it to LR1. The packet traverses the LR1 logical
+ router pipeline, possibly undergoes NAT, and eventually ends up at
+ LSlocal's localnet
port. The packet never traverses a tunnel,
+ avoiding the MTU issue.
+
+ This option has the further consequence of centralizing ``distributed'' + logical router LR1, since no packets are forwarded from LS1 to LR1 on any + chassis other than the gateway chassis. Therefore, east-west traffic + passes through the gateway chassis, not just north-south. (The naive + ``fix'' of allowing east-west traffic to flow directly between chassis over + LN1 does not work because routing sets the Ethernet source address to LR1's + source address. Seeing this single Ethernet source address originate from + all of the chassis will confuse the physical switch.) +
+ +
+ Do not set the reside-on-redirect-chassis
option on a
+ distributed gateway port. In the diagram above, it would be set on the
+ LRPs connecting LS1, ..., LSn to LR1.
+
+ The second solution is the redirect-chassis
option for
+ distributed gateway ports. Setting this option to bridged
+ causes packets that are redirected to the gateway chassis to go over the
+ localnet
ports instead of being tunneled. This option does
+ not change how OVN treats packets not redirected to the gateway chassis.
+
+ The redirect-chassis
option requires the administrator or the
+ CMS to configure each participating chassis with a unique Ethernet address
+ for the locgical router by setting ovn-chassis-mac-mappings
in
+ the Open vSwitch database, for use by ovn-controller
. This
+ makes it more difficult to configure than
+ reside-on-redirect-chassis
.
+
+ Set the redirect-chassis
option on a distributed gateway port.
+
@@ -1892,14 +1986,14 @@
- VLAN-based redirection:
-
- As an enhancement to reside-on-redirect-chassis
we support
- VLAN-based redirection as well. By setting
- options:redirect-type
to bridged
on a gateway
- chassis attached router port, user can enforce that redirected packet
- should not use tunnel port but rather use localnet port of peer logical
- switch to go out on a physical VLAN.
+ As an alternative to reside-on-redirect-chassis
, OVN supports
+ VLAN-based redirection. Whereas reside-on-redirect-chassis
+ centralizes all router functionality, VLAN-based redirection only changes
+ how OVN redirects packets to the gateway chassis. By setting
+ options:redirect-type
to bridged
on a distributed
+ gateway port, OVN redirects packets to the gateway chassis using the
+ localnet
port of the router's peer logical switch, instead of
+ a tunnel.
diff --git a/ovn-nb.xml b/ovn-nb.xml index ccd9bae991af..7f142bd35031 100644 --- a/ovn-nb.xml +++ b/ovn-nb.xml @@ -2038,8 +2038,9 @@
If any of these are set, this logical router port represents a
distributed gateway port that connects this router to a
- logical switch with a localnet port. There may be at most one
- such logical router port on each logical router.
+ logical switch with a localnet
port. There may
+ be at most one such logical router port on each logical
+ router.
@@ -2096,6 +2097,82 @@
+ MTU issues arise in mixing tunnels with logical networks that are
+ bridged to a physical VLAN. For an explanation of the MTU issues,
+ see
+ If set to
+ 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 a distributed
+ gateway port and if the LRP's peer switch has a
+
+ If set to
+ This feature requires the administrator or the CMS to configure
+ each participating chassis with a unique Ethernet address for the
+ locgical router by setting
+ Setting this option to 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.
+ 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:
+
+
+
+ localnet
interface.
+ localnet
port.
+ 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.
+ ovn-chassis-mac-mappings
in
+ the Open vSwitch database, for use by ovn-controller
.
+ overlay
or leaving it unset has
+ no effect. This option may usefully be set only on a distributed
+ gateway port. It is otherwise ignored.
+
- Generally routing is distributed in OVN
. The packet
- from a logical port which needs to be routed hits the router pipeline
- in the source chassis. For the East-West traffic, the packet is
- sent directly to the destination chassis. For the outside traffic
- the packet is sent to the gateway chassis.
-
- When this option is set, OVN
considers this only if
-
- When this option is set to true
, then the packet
- which needs to be routed hits the router pipeline in the chassis
- hosting the distributed gateway router port. The source chassis
- pushes out this traffic via the localnet port. With this the
- East-West traffic is no more distributed and will always go through
- the gateway chassis.
-
- Without this option set, for any traffic destined to outside from a - logical port which belongs to a logical switch with localnet port, - the source chassis will send the traffic to the gateway chassis via - the tunnel port instead of the localnet port and this could cause MTU - issues. -
-
- This options dictates if a packet redirected to
- gateway chassis
will be overlay encapsulated
- or go as a regular packet via the localnet port.
-
- Option takes following values -
- -- OVERLAY option will ensure that redirected packet goes out as - encapsulation via the tunnel port. -
- -- BRIDGED option will ensure that redirected packet goes out - via the localnet port tagged with vlan (if configured). -
- -- OVERLAY is the default redirection type. -
- -- Option is applicable only to gateway chassis attached logical - router ports. -
- -