Vlan – VXLAN: how receiver knows that the received packet is VXLAN-encapsulated

protocol-theoryrfcudpvlanvxlan

I'm trying to understand how a receiver knows that the received packet is a VXLAN-encapsulated.

Looking at the VXLAN RFC, I can't see anything specific that defines that the packet contains VXLAN header.
I see (parsing the packet from the beginning):

  • outer MAC (L2) header
  • outer IP (L3) header
  • outer UDP (L4) header
  • VXLAN header
  • inner MAC header
  • inner … etc

But I don't see anything specific in the outer UDP header that says that the next header is VXLAN.

What am I missing?

Best Answer

The destination UDP port in the outer UDP header is specified in the VXLAN specification (Port 4789). This means it is a well-known service. So an UDP packet that arrives on Port 4789 is expected to be a VXLAN packet¹ in the same way that a TCP packet that arrives on Port 80 is expected to be a HTTP packet¹.

The draft you linked to is outdated and is missing this port number (although it mentions that the port number is to be obtained from IANA).

¹) When I talk about VXLAN/HTTP packets I mean of course the respective UDP/TCP packets with VXLAN/HTTP header/protocol inside.

Related Topic