Skip to content
rkapl edited this page Nov 17, 2017 · 5 revisions

The Linux VXLAN interface can do very different things depending on how it is used and configured. Three main controlling factors are: VXLAN_F_LEARN, multicast , and presence of tunnel metadata.

Receive side:

  • VXLAN services the unique combination of (local port, ipv6/4, vni). There are also a bit special rules for ipv6 link local.
  • It just unwraps the packets and optionally maintains FDB (depends on VXLAN_F_LEARN flag, see vxlan_snoop)

Send side:

  • If used as lwt (light-weight) tunnel, it takes all options from the tunnel metadata and just sends the packet there (see vxlan_xmit_one in kernel) (since ee122c79d422)
  • If used as normal interface (no metadata present), it consults its forwarding table (fdb) and sends the packet to that endpoint. The fdb can be either filled in manually (no collect metadata) or based on incoming traffic (similar to learning switch). If there is no fdb entry, the vxlan tries to send it to a default destination (might be the multicast address), otherwise the packet is dropped.
  • It can also be the combination of the two, where only VNI is specified by tunnel metadata.

Note: RSC means route short-circuiting. Known destination IP addresses use the corresponding destination MAC address for switching rather than going to a (possibly remote) router first.

Clone this wiki locally