Encapsulation! You know, that thing where you start with a small piece of information,
and glue more information onto it. And then some more, and then more. Well, you're going to
see plenty of that with VxLAN. And with that in mind, I'd like to welcome
you to part 2 of the VxLAN series.
In the last video, we got to see how VxLAN works. We saw that VxLAN creates virtual layer-2 segments, called VNI's. VNI's run over
the top of a layer-3 network. VxLAN switches use a special interface called
a VTEP. This bridges VNIs to the layer-3 network. When traffic comes in, the VTEP encapsulates
the traffic, and sends it to a destination VTEP where it is decapsulated.
In this video, we're going to look deeper into the process, and look at the headers that VxLAN uses
We start with an ordinary ethernet frame that a host would send. We call this the 'inner
MAC frame'. This includes data, MAC address information,
and other ethernet fields. It also may have a VLAN tag included.
In our example, traffic will stay within the VNI, so there is no routing required.
The host sends the frame to the switch. The switch adds a VxLAN header, which contains
the VNI. The VTEP now adds several additional headers,
preserving the inner frame. VxLAN uses UDP for transport. The destination
port is 4789, and the source port is random. ECMP, if available, uses a hashing algorithm
to decide which link to put the traffic on. The random source port helps this algorithm
to utilize the links evenly. An IP header is now added, with the address
of the destination VTEP. An ethernet header with a MAC address is added
for delivery to the next physical device. As normal, the source and destination MAC
addresses change with each device they pass through
When the traffic arrives at the destination VTEP, the headers are removed, leaving the
original frame, which can now be delivered to the host.
Of all these headers, the VxLAN header is the only one that's a bit different. All
the others are well known. Fortunately, it's not difficult to decipher.
There are four parts to the VxLAN header. 8 bits are reserved for future use. This is
set to zero, and ignored by the receiving VTEP
The VNI field is 24-bits long, and contains the VxLAN ID. This large address space is
what makes it possible to have so many VNI's. Another 24-bits are reserved. As before, this
field is ignored by the receiver At the start of the frame is eight flag bits.
Right now only bit 3 is used. Bit three is the 'i' field, which is set to '1'
for a valid VNI. The rest are reserved and ignored.
So, there's a lot of unused space in the VxLAN header. It will be very interesting
to see how this is used in future. If you have any thoughts on these reserved fields,
please share them in the comments. As you can see, adding all these extra headers
makes the frame much larger. The extra VxLAN, UDP and IP headers add up to around 50 bytes
of overhead. To account for this, you will need to enable
jumbo frames everywhere. Otherwise you will get fragmentation, which, as you know, decreases performance
In the third part of this series, we're going to look at the spine leaf topology that's
so commonly used with VxLAN. Before moving on, please take a moment to
subscribe, hit the like button, and leave me a comment.
I'll be waiting for you in Part 3.