# Introduction to Virtual Extensible LAN (VXLAN)

**URL:** <https://forum.networklessons.com/t/introduction-to-virtual-extensible-lan-vxlan/9744>\
**Category:** Lessons Discussion\
**Created:** [February 6, 2020, 12:19pm UTC](https://forum.networklessons.com/t/introduction-to-virtual-extensible-lan-vxlan/9744 "2020-02-06T12:19:00Z")\
**Posts on this page:** 20\
**Page:** 2

<div class="post-metadata">

**Author:** ![lagapidis](https://cdn-forum.networklessons.com/user_avatar/forum.networklessons.com/lagapidis/32/4949_2.png) [@lagapidis](https://forum.networklessons.com/u/lagapidis)\
**Post date:** [April 2, 2021, 4:51am UTC](https://forum.networklessons.com/t/introduction-to-virtual-extensible-lan-vxlan/9744/23 "2021-04-02T04:51:50Z")

</div>

Hello Ramachandra

> [@ramatemc](#):
>
> In multisite environment, generally Stretched VLANs are needed for some clusters. At same time, it is not recommended. So what i understood using VxLAN we can overcome this.

You’re right that best practice dictates that you don’t span your VLANs across multiple sites, however sometimes as you say, it is necessary. There’s really no “solution” to this, either you span your VLANs or you don’t. You must however try to keep it to a minimum.

What VXLAN provides is an underlay network that is composed of routers and switches, where in most cases, you will never have a VLAN span multiple sites. Site-to-site communication in the underlay network will take place using L3 communication with routing. However, the VXLAN in the overlay network, which is being tunneled over that underlay network, is still spanning multiple sites. So from the point of view of the overlay network, you still do have a broadcast domain (VLAN) that is spanning multiple sites. This cannot always be avoided, but it should be minimized as much as possible.

Typically in a campus network, you should be able to avoid it completely, however, it is in distributed datacenters that you most often need to span VLANs across sites. VXLAN doesn’t “solve” the issue, but it does provide you with a framework where you can more easily apply such a configuration. You should still do it sparingly…

I hope this has been helpful!

Laz

---

<div class="post-metadata">

**Author:** ![ramatemc](https://cdn-forum.networklessons.com/letter_avatar_proxy/v4/letter/r/5daacb/32.png) [@ramatemc](https://forum.networklessons.com/u/ramatemc)\
**Post date:** [April 3, 2021, 12:42am UTC](https://forum.networklessons.com/t/introduction-to-virtual-extensible-lan-vxlan/9744/24 "2021-04-03T00:42:19Z")

</div>

Thanks Laz for explaining it.

---

<div class="post-metadata">

**Author:** ![vijayjaggala23](https://cdn-forum.networklessons.com/user_avatar/forum.networklessons.com/vijayjaggala23/32/3112_2.png) [@vijayjaggala23](https://forum.networklessons.com/u/vijayjaggala23)\
**Post date:** [June 12, 2021, 7:07am UTC](https://forum.networklessons.com/t/introduction-to-virtual-extensible-lan-vxlan/9744/25 "2021-06-12T07:07:48Z")

</div>

Hello Team,  
Why does UDP header is added at vTEP VXLAN?

---

<div class="post-metadata">

**Author:** ![lagapidis](https://cdn-forum.networklessons.com/user_avatar/forum.networklessons.com/lagapidis/32/4949_2.png) [@lagapidis](https://forum.networklessons.com/u/lagapidis)\
**Post date:** [June 17, 2021, 8:33am UTC](https://forum.networklessons.com/t/introduction-to-virtual-extensible-lan-vxlan/9744/26 "2021-06-17T08:33:14Z")

</div>

Hello Vijay

Take a detailed look at this lesson:

> **[Introduction to Virtual Extensible LAN (VXLAN)](https://networklessons.com/cisco/ccnp-encor-350-401/introduction-to-virtual-extensible-lan-vxlan)**
>
> Virtual Extensible LAN (VXLAN) lets you tunnel layer 2 traffic over a layer 3 network without the disadvantages of traditional layer 2 networks.

In it you’ll find details about the headers and where they are added.

Remember that VXLANs use an overlay and an underlay network. The VXLAN header actually sits between the header information of the overlay and underlay networks. The underlay network carries the “tunneled” traffic and uses the UDP header with port 4789 or 8472 to carry that traffic.

Below you can see the headers involved with the implementation of the VXLAN.

 ![image](https://cdn-forum.networklessons.com/uploads/default/original/2X/4/4de486e2c4042709eae47d97bece55c8f7e1a1e8.png)

The headers that are circled in red are those that belong to the underlay network. Like any network, it needs a layer 3 header and a layer 4 header, and that is why the UDP header is used there.

I hope this has been helpful!

Laz

---

<div class="post-metadata">

**Author:** ![ppluviose18](https://cdn-forum.networklessons.com/user_avatar/forum.networklessons.com/ppluviose18/32/3840_2.png) [@ppluviose18](https://forum.networklessons.com/u/ppluviose18)\
**Post date:** [September 19, 2021, 1:25pm UTC](https://forum.networklessons.com/t/introduction-to-virtual-extensible-lan-vxlan/9744/27 "2021-09-19T13:25:16Z")

</div>

Thanks, Rene for these videos, Do you always have to map a VLAN to a VNI ? how do vxlan make use of these 16 Millions VNIs when i have to map a VLAN to a vni. Please let me understand i am really confused about it. Thanks

---

<div class="post-metadata">

**Author:** ![lagapidis](https://cdn-forum.networklessons.com/user_avatar/forum.networklessons.com/lagapidis/32/4949_2.png) [@lagapidis](https://forum.networklessons.com/u/lagapidis)\
**Post date:** [September 21, 2021, 9:18am UTC](https://forum.networklessons.com/t/introduction-to-virtual-extensible-lan-vxlan/9744/28 "2021-09-21T09:18:48Z")

</div>

Hello Patrick

Remember that the purpose of VXLANs is not only to surpass the limitation of 4K VLAN IDs, but also to add flexibility to deployments, allowing for the simpler spanning of VLANs across sites. When there is no need to expand beyond that 4K limit, typical customer deployments will use a 1:1 mapping of available VLANs for simplicity.

However, when scalability to reach beyond this limit is needed, then it is possible to do so by assigning the same VLAN IDs to multiple unique VNIs found on different VTEPs within the fabric. So for example, you could have

- VLAN 456 mapped to VNI 123 using a subnet of 10.1.1.0/24
- VLAN 456 mapped to VNI 321 using a subnet of 10.2.2.0/24

The same VLAN ID is used, but on different VNIs. You can theoretically have 16 million VNIs each having 4000+ VLANs mapped to them.

Typically, you would have one VNI on a single physical switch, so you do have a limitation of 4k per physical device, but that is typically not a limiting factor.

I hope this has been helpful!

Laz

---

<div class="post-metadata">

**Author:** ![ppluviose18](https://cdn-forum.networklessons.com/user_avatar/forum.networklessons.com/ppluviose18/32/3840_2.png) [@ppluviose18](https://forum.networklessons.com/u/ppluviose18)\
**Post date:** [September 21, 2021, 1:49pm UTC](https://forum.networklessons.com/t/introduction-to-virtual-extensible-lan-vxlan/9744/29 "2021-09-21T13:49:28Z")

</div>

Thanks so much for replying to this post is helpful but I have more question basically, is VNI and VTEP need to match on both sides? do you need a vtep for every VNI? can you map VINI to VNI with no VLAN involve? Your help is really appreciated. Thanks

---

<div class="post-metadata">

**Author:** ![lagapidis](https://cdn-forum.networklessons.com/user_avatar/forum.networklessons.com/lagapidis/32/4949_2.png) [@lagapidis](https://forum.networklessons.com/u/lagapidis)\
**Post date:** [September 24, 2021, 4:56am UTC](https://forum.networklessons.com/t/introduction-to-virtual-extensible-lan-vxlan/9744/30 "2021-09-24T04:56:21Z")

</div>

Hello Patrick

> [@ppluviose18](#):
>
> is VNI and VTEP need to match on both sides?

The VNI is a globally significant value. Much like the VLAN ID, it must be the same throughout the communication between the VTEPs that serve it.

> [@ppluviose18](#):
>
> do you need a vtep for every VNI?

A VTEP is a device that terminates the VXLAN fabric. That is where you configure the VNIs, so VNIs owe their existence to the VTEP devices.

> [@ppluviose18](#):
>
> can you map VINI to VNI with no VLAN involve?

Take a look at this image:

 ![image](https://cdn-forum.networklessons.com/uploads/default/original/2X/a/a4cbbd8358d96c683b53f8d00f430c4ee23a811f.png)  
When H1 sends its data, it is oblivious to any VXLAN VNI configuration. It sends its data, and when it reaches the VTEP, it is there that any VLAN IDs are added, based on the VLAN ID of the access port to which it is connected. (The VLAN ID may be added at a switch somewhere between the host and the VTEP if it exists). That VLAN ID information is encapsulated and mapped to a particular VNI.

Remember that VXLANs are at their most basic level, a tunneling or encapsulation mechanism. Whatever VLAN ID is in the frame, this will be encapsulated and used within the VXLAN infrastructure.

I hope this has been helpful!

Laz

---

<div class="post-metadata">

**Author:** ![ajay.mamania](https://cdn-forum.networklessons.com/letter_avatar_proxy/v4/letter/a/ee59a6/32.png) [@ajay.mamania](https://forum.networklessons.com/u/ajay.mamania)\
**Post date:** [November 6, 2021, 11:51pm UTC](https://forum.networklessons.com/t/introduction-to-virtual-extensible-lan-vxlan/9744/31 "2021-11-06T23:51:03Z")

</div>

Hi LAZ/RENE,

could you please brief us Vxlan with MP-BGP EVPN.

Please

BR//-  
Ajay

---

<div class="post-metadata">

**Author:** ![lagapidis](https://cdn-forum.networklessons.com/user_avatar/forum.networklessons.com/lagapidis/32/4949_2.png) [@lagapidis](https://forum.networklessons.com/u/lagapidis)\
**Post date:** [November 9, 2021, 7:09am UTC](https://forum.networklessons.com/t/introduction-to-virtual-extensible-lan-vxlan/9744/32 "2021-11-09T07:09:00Z")

</div>

Hello Ajay

Cisco has an excellent and comprehensive document on VXLAN and its use of an MP\_BGP EVPN underlay network. The following is an excerpt from that document which gives a brief but very clear understanding of how these technologies work together:

> The initial IETF VXLAN standards (RFC 7348) defined a multicast-based flood-and-learn VXLAN without a control plane. It relies on data-driven flood-and-learn behavior for remote VXLAN tunnel endpoint (VTEP) peer discovery and remote end-host learning. The overlay broadcast, unknown unicast, and multicast traffic is encapsulated into multicast VXLAN packets and transported to remote VTEP switches through the underlay multicast forwarding. Flooding in such a deployment can present a challenge for the scalability of the solution. The requirement to enable multicast capabilities in the underlay network also presents a challenge because some organizations do not want to enable multicast in their data centers or WAN networks.
> 
> To overcome the limitations of the flood-and-learn VXLAN as defined in RFC 7348, organizations can use Multiprotocol Border Gateway Protocol Ethernet Virtual Private Network (MP-BGP EVPN) as the control plane for VXLAN. MP-BGP EVPN has been defined by IETF as the standards-based control plane for VXLAN overlays. The MP-BGP EVPN control plane provides protocol-based VTEP peer discovery and end-host reachability information distribution that allows more scalable VXLAN overlay network designs suitable for private and public clouds. The MP-BGP EVPN control plane introduces a set of features that reduces or eliminates traffic flooding in the overlay network and enables optimal forwarding for both west-east and south-north traffic.

The following is the link from this documentation from which you can find out more information:

> **[VXLAN Network with MP-BGP EVPN Control Plane Design Guide](https://www.cisco.com/c/en/us/products/collateral/switches/nexus-9000-series-switches/guide-c07-734107.html)**
>
> VXLAN Network with MP-BGP EVPN Control Plane Design Guide

If you have any more specific questions about this technology, let us know!

I hope this has been helpful!

Laz

---

<div class="post-metadata">

**Author:** ![giacomo.monari](https://cdn-forum.networklessons.com/letter_avatar_proxy/v4/letter/g/dec6dc/32.png) [@giacomo.monari](https://forum.networklessons.com/u/giacomo.monari)\
**Post date:** [December 18, 2021, 4:49pm UTC](https://forum.networklessons.com/t/introduction-to-virtual-extensible-lan-vxlan/9744/33 "2021-12-18T16:49:12Z")

</div>

Great Lesson!  
when VETP1 sends the packets to VETP2, it encapsulates them in another L2 header, that it is not mentioned for clarity. A lot of overhead 🙂

---

<div class="post-metadata">

**Author:** ![lagapidis](https://cdn-forum.networklessons.com/user_avatar/forum.networklessons.com/lagapidis/32/4949_2.png) [@lagapidis](https://forum.networklessons.com/u/lagapidis)\
**Post date:** [December 21, 2021, 3:16pm UTC](https://forum.networklessons.com/t/introduction-to-virtual-extensible-lan-vxlan/9744/34 "2021-12-21T15:16:51Z")

</div>

Hello Giacomo

If I’m not mistaken, you’re talking about this particular diagram here:

 ![image](https://cdn-forum.networklessons.com/uploads/default/original/2X/a/a4cbbd8358d96c683b53f8d00f430c4ee23a811f.png)  
Yes, you are correct, there will be an additional layer 2 header added when information is sent from VTEP1 to VTEP2. However, in between these two devices, you may have multiple networks, routers, and even the Internet. So what L2 headers will be added depends upon the network topology between the two VTEPs. For this reason, only IP addresses are shown here, which will remain the same for the duration of the communication between the two VTEPs, whereas the L2 headers may change multiple times throughout that particular leg of the journey.

Yes, there is a lot of overhead! But as you can see, the more complex the overhead is, the simpler the the whole operation seems from the point of view of the hosts themselves. There is always a tradeoff…

I hope this has been helpful!

Laz

---

<div class="post-metadata">

**Author:** ![giacomo.monari](https://cdn-forum.networklessons.com/letter_avatar_proxy/v4/letter/g/dec6dc/32.png) [@giacomo.monari](https://forum.networklessons.com/u/giacomo.monari)\
**Post date:** [December 21, 2021, 9:09pm UTC](https://forum.networklessons.com/t/introduction-to-virtual-extensible-lan-vxlan/9744/35 "2021-12-21T21:09:14Z")

</div>

thanks for the explanation!

---

<div class="post-metadata">

**Author:** ![umukhopa](https://cdn-forum.networklessons.com/letter_avatar_proxy/v4/letter/u/8dc957/32.png) [@umukhopa](https://forum.networklessons.com/u/umukhopa)\
**Post date:** [August 1, 2022, 7:41pm UTC](https://forum.networklessons.com/t/introduction-to-virtual-extensible-lan-vxlan/9744/36 "2022-08-01T19:41:47Z")

</div>

Hi Rene,  
VxLAN tutorial was excellent.  
This is a suggestion! Not sure this is the right place.  
I think it may be very helpful to have a lesson on EVPN. VxLAN EVPN goes almost hand-in-hand.  
EVPN as technology can bring in extra values.

Regards

Utpal

---

<div class="post-metadata">

**Author:** ![lagapidis](https://cdn-forum.networklessons.com/user_avatar/forum.networklessons.com/lagapidis/32/4949_2.png) [@lagapidis](https://forum.networklessons.com/u/lagapidis)\
**Post date:** [August 3, 2022, 5:52am UTC](https://forum.networklessons.com/t/introduction-to-virtual-extensible-lan-vxlan/9744/37 "2022-08-03T05:52:32Z")

</div>

Hello Utpal

Great to hear that you enjoyed the lesson. Thanks so much for your suggestion, and yes it does make sense to include EVPN as part of the VXLAN topics. It would be great if you can make this suggestion on the Member Ideas page linked below. There you can share what kind of new topics you’d like to see covered on the site. You may find that others have made similar suggestions, and you can add your voice to theirs.

> **[Lesson Ideas - NetworkLessons.com](https://networklessons.com/lesson-ideas)**
>
> This page allows networklessons members to share what content they would like to see in the future.

I hope this has been helpful!

Laz

---

<div class="post-metadata">

**Author:** ![sims](https://cdn-forum.networklessons.com/letter_avatar_proxy/v4/letter/s/c6cbf5/32.png) [@sims](https://forum.networklessons.com/u/sims)\
**Post date:** [September 5, 2022, 11:09am UTC](https://forum.networklessons.com/t/introduction-to-virtual-extensible-lan-vxlan/9744/38 "2022-09-05T11:09:31Z")

</div>

Hi ,  
Can you give explanation about MP-BGP with EVPN  
Thanks

---

<div class="post-metadata">

**Author:** ![lagapidis](https://cdn-forum.networklessons.com/user_avatar/forum.networklessons.com/lagapidis/32/4949_2.png) [@lagapidis](https://forum.networklessons.com/u/lagapidis)\
**Post date:** [September 8, 2022, 12:45pm UTC](https://forum.networklessons.com/t/introduction-to-virtual-extensible-lan-vxlan/9744/39 "2022-09-08T12:45:03Z")

</div>

Hello Sims

MP-BGP with EVPN is not a topic that is covered on the NetworkLessons site. However you can make a suggestion for new lesson topics on the following Member Ideas page.

> **[Lesson Ideas - NetworkLessons.com](https://networklessons.com/lesson-ideas)**
>
> This page allows networklessons members to share what content they would like to see in the future.

There you can see what others have suggested, and you can add your voice to theirs.

In the meantime, take a look at the following post to find out more information about these features:

> [@Multiprotocol BGP (MP-BGP) Configuration](https://forum.networklessons.com/t/multiprotocol-bgp-mp-bgp-configuration/1177/58):
>
> Hello Shashank If you want to go more in-depth into these technologies, one of the best ways to do so is to take a look at Cisco documentation. The following links should give you a good start: [Deploy a VXLAN Network with an MP-BGP EVPN Control Plane White Paper](https://www.cisco.com/c/en/us/products/collateral/switches/nexus-7000-series-switches/white-paper-c11-735015.html#:~:text=MP%2DBGP%20EVPN%20has%20been,for%20private%20and%20public%20clouds.)[Configuration and Verification VXLAN with MP-BGP EVPN Control Plane.](https://www.cisco.com/c/en/us/support/docs/ip/border-gateway-protocol-bgp/200952-Configuration-and-Verification-VXLAN-wit.html) I hope this has been helpful! Laz

I hope this has been helpful!

Laz

---

<div class="post-metadata">

**Author:** ![suprit.chinchodikar](https://cdn-forum.networklessons.com/user_avatar/forum.networklessons.com/suprit.chinchodikar/32/5790_2.png) [@suprit.chinchodikar](https://forum.networklessons.com/u/suprit.chinchodikar)\
**Post date:** [March 1, 2023, 1:44pm UTC](https://forum.networklessons.com/t/introduction-to-virtual-extensible-lan-vxlan/9744/40 "2023-03-01T13:44:21Z")

</div>

Hello Team  
I have just joined the Network Lessons Course and I must the VXLAN is pretty easy to understand and explain now  
I have 2 questions regarding the packet walk through section.

1. How did the H1 host came to know about the MAC address of H2?
2. How did switch came to know that the Packet I’m receving from H1 should go through the vxlan tunnel?

---

<div class="post-metadata">

**Author:** ![lagapidis](https://cdn-forum.networklessons.com/user_avatar/forum.networklessons.com/lagapidis/32/4949_2.png) [@lagapidis](https://forum.networklessons.com/u/lagapidis)\
**Post date:** [March 4, 2023, 9:43am UTC](https://forum.networklessons.com/t/introduction-to-virtual-extensible-lan-vxlan/9744/41 "2023-03-04T09:43:10Z")

</div>

Hello Suprit

Great to hear that you are enjoying the content here and it is helpful for you. First of all, note that the IP addresses on the hosts in the lesson are incorrect. I have informed Rene to make the correction. Both H1 and H2 are on the same subnet, and should have addresses like so:

- H1: 192.168.1.101
- H2: 192.168.1.102

Now, on to your questions:

> [@suprit.chinchodikar](#):
>
> - How did the H1 host came to know about the MAC address of H2?

In the same way as if the two hosts were on the same physical network segment. [ARP is used](https://networklessons.com/cisco/ccie-enterprise-infrastructurearp-address-resolution-protocol-explained) to determine this. In this particular case, the ARP request sent out by H1 is encapsulated within the VXLAN overlay network and is forwarded through the VXLAN infrastructure to reach H2. H2 responds with an ARP reply which in the same way traverses the VXLAN infrastructure encapsulated as usual and reaches H1. H1 then populates its ARP table.

> [@suprit.chinchodikar](#):
>
> 1. How did switch came to know that the Packet I’m receving from H1 should go through the vxlan tunnel?

This is achieved using the mapping information that VTEP1 has obtained. What mechanism is used to create these mappings? There are various options, as stated in the lesson. [In the lesson, the VXLAN with multicast underlay](https://networklessons.com/cisco/ccnp-encor-350-401/introduction-to-virtual-extensible-lan-vxlan#Control_Plane) is described in further detail. Once the VTEP sees the mapping it knows how to deal with the particular packet it has received, to encapsulate it and send it through the tunnel.

I hope this has been helpful!

Laz

---

<div class="post-metadata">

**Author:** ![suprit.chinchodikar](https://cdn-forum.networklessons.com/user_avatar/forum.networklessons.com/suprit.chinchodikar/32/5790_2.png) [@suprit.chinchodikar](https://forum.networklessons.com/u/suprit.chinchodikar)\
**Post date:** [March 5, 2023, 4:38am UTC](https://forum.networklessons.com/t/introduction-to-virtual-extensible-lan-vxlan/9744/42 "2023-03-05T04:38:33Z")

</div>

Hello Laz,  
Thanks for your explanation.  
 ![image](https://forum.networklessons.com/uploads/default/original/2X/2/21dace6528a2866394d8820f5ef84d363bdcb387.png)  
Did you mean 192.168.1.101/102?

 ![image](https://forum.networklessons.com/uploads/default/original/2X/9/9b7e1aa292916d66a12e5d4c5e9c905faafc1108.png)  
So, when the H1 sends the ARP our device being layer 3 device (I’m assuming) it should not have send the broadcast arp request from VTEP1 to VTEP2.  
So, did VTEP1 generated the new broadcast to find the MAC of H2?

[Previous page](https://forum.networklessons.com/t/introduction-to-virtual-extensible-lan-vxlan/9744.md?page=1)

[Next page](https://forum.networklessons.com/t/introduction-to-virtual-extensible-lan-vxlan/9744.md?page=3)
