VXLAN: Difference between revisions
| (4 intermediate revisions by the same user not shown) | |||
| Line 21: | Line 21: | ||
==Use on Linux== | ==Use on Linux== | ||
Note that Openvswitch has its own, distinct VXLAN implementation. This describes the Linux kernel [[tunneling]] device. | VXLAN was added to the Linux kernel in 3.7, with the DOVE extensions added in 3.8. Note that Openvswitch has its own, distinct VXLAN implementation. This describes the Linux kernel [[tunneling]] device. | ||
* Create the interface using <tt>ip</tt>: <tt>ip l a VXLANDEV type vxlan id VNI dstport DSTPORT local VTEPIP</tt> | * Create the interface using <tt>ip</tt>: <tt>ip l a VXLANDEV type vxlan id VNI dstport DSTPORT local VTEPIP</tt> | ||
** Add <tt>group MCASTIP dev MCASTDEV</tt> for a multicast-based VXLAN (see below) | ** Add <tt>group MCASTIP dev MCASTDEV</tt> for a multicast-based VXLAN (see below) | ||
| Line 27: | Line 27: | ||
** Add the <tt>nolearning</tt> flag to disable source address-based FDB learning | ** Add the <tt>nolearning</tt> flag to disable source address-based FDB learning | ||
* Destroy the interface with <tt>ip l d VXLANDEV</tt> | * Destroy the interface with <tt>ip l d VXLANDEV</tt> | ||
* Get information with <tt>ip -d l s | * Get information with <tt>ip -d -s l sh VXLANDEV</tt> | ||
** Note: <tt>ip l s</tt> will ''not'' work, as <tt>s</tt> will be interpreted as <tt>set</tt> | |||
===[[systemd]]=== | |||
Minimal <tt>systemd-networkd</tt> netdev file: | |||
<pre> | |||
[NetDev] | |||
Name=vx0 | |||
Kind=vxlan | |||
[VXLAN] | |||
VNI=whatever | |||
Independent=yes | |||
</pre> | |||
Without <tt>Independent=yes</tt>, the device must be bound to some other device via a <tt>network</tt> file, or it will be more or less silently ignored by <tt>systemd-networkd</tt>. | |||
===Forwarding tables=== | ===Forwarding tables=== | ||
| Line 40: | Line 55: | ||
===Offloading=== | ===Offloading=== | ||
Several NICs provide hardware offloading functionality, typically configured with <tt>[[ethtool]]</tt>. | Several NICs provide hardware offloading functionality, typically configured with <tt>[[ethtool]]</tt>. VXLAN offloading mainly means that other NIC offloading (UDP checksums, GRO, etc.) can be performed in the presence of VXLAN. | ||
* [https://community.mellanox.com/s/article/vxlan-considerations-for-connectx-3-pro Mellanox Connect-X 3] | * [https://community.mellanox.com/s/article/vxlan-considerations-for-connectx-3-pro Mellanox Connect-X 3] | ||
* Telefonica's "[https://engineering.telefonica.com/maximizing-performance-in-vxlan-overlay-networks-ec35ebe29440 Maximizing Performance in VXLAN Networks]", 2017-01-25 | * Telefonica's "[https://engineering.telefonica.com/maximizing-performance-in-vxlan-overlay-networks-ec35ebe29440 Maximizing Performance in VXLAN Networks]", 2017-01-25 | ||