Hi @Johannes Luther ,
UDP source ports for VXLAN encapsulation are normally calculated by a 5-tuple hash of:
- The source IP address
- The destination IP address
- The protocol (TCP/UDP)
- The source (TCP/UDP) port [Which is what your question is about]
- The destination (TCP/UDP) port
Now, your question relates to the dynamic nature of the source (TCP/UDP) port
And (again typically) this source UDP port is calculated on a hash which is slightly different depending on the paylaod
- For layer 2 payload, the hash is on the source and destination MAC addresses.
- For a lay 3 payload the hash is on the same 5 tuple hash as described above, but for the INNER IP packet.
This ensures (as you have observed) that the source UDP port is consistent for a given flow.
[Disclaimer: This is how I believe it works, I have not captured/verified the above. If anyone can find a definitive reference, then your answer will carry more weight than mine]
I hope this helps.
RedNectar aka Chris Welsh.
Forum Tips: 1. Paste images inline - don't attach. 2. Always mark helpful and correct answers, it helps others find what they need.