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?

  • Linux system uses its default UDP 8972 port number for VXLAN because VXLAN was implemented on it before IANA has assigned a udp port neumber for VXLAN, whereas other systems use IANA assigned VXLAN UDP 4789 port number.
    – bear
    Feb 21, 2021 at 14:18

1 Answer 1


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.

  • Thanks! My problem was an outdated RFC, indeed. Note however, that this whole mess with RFC versions and port numbers caused a mess in VXLAN support. Turns out that before port 4789, there was port 8472, and different implementations might still have this old port (such as VMvare ESX).
    – kliteyn
    Apr 25, 2014 at 13:53
  • Another implementation that uses 8472 is flannel github.com/flannel-io/flannel
    – morhook
    Jun 22, 2021 at 16:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.