VXLAN is a layer 2 framework so when one VTEP wants to send data to another VTEP, it will create a layer 2 VXLAN frame (basically an Ethernet frame). This frame then needs to be delivered to the IP address of the destination VTEP.
When they talk about "Outer MAC header" it seems they are talking about the frame that gets sent over the physical network . Imagine the following configuration -
VTEP Host A: 1.1.1.1 MAC AA (not going to bother with full MAC addresses)
Local Router Interface 1: 1.1.1.254 MAC BB
Local Router Interface 2: 2.2.2.254 MAC CC
VTEP Host B: 2.2.2.2 MAC DD
(The IP addresses above are the actual host addresses (VTEP endpoints), not the addresses of the virtual VXLAN interfaces themselves).
- VTEP Host A puts the VXLAN frame inside a UDP packet and addresses it to 2.2.2.2.
[UDP PACKET 1.1.1.1->2.2.2.2[VXLAN FRAME]]
- This packet gets passed to the OS which wants to deliver it to 2.2.2.2. This is not on the local network so the packet gets placed in an Ethernet frame with a source of AA, and destination of the local router BB.
[ETH FRAME AA->BB[UDP PACKET[VXLAN FRAME]]]
- Local router receives the frame and extracts the UDP packet. It sees that the packet is destined for 2.2.2.2, which it can access directly. It puts the packet in a new Ethernet frame destined for DD.
[ETH FRAME CC->DD[UDP PACKET[VXLAN FRAME]]]
. **
- Host B receives the Ethernet frame addressed to it, extracts the UDP packet, then passes it to whatever part of the system handles VXLAN data.
** If there were additional routers between the VTEPs, then this process would continue. Each router would extract the packet and place it in a new frame, with a src MAC of itself and a dst MAC of the next hop until it got to the destination.