VXLAN concept (part II)-5 minutes a day to play with OpenStack (109)

Source: Internet
Author: User

650) this.width=650; "Src=" http://7xo6kd.com1.z0.glb.clouddn.com/ Upload-ueditor-image-20161106-1478393048220020745.jpg "/>

In the previous section we introduced the VXLAN package format as well as the VTEP.
Today we will discuss the process of VXLAN encapsulation and forwarding packages, as well as the native support of Linux to VXLAN.

VXLAN Packet Forwarding process

VXLAN a tunnel between VTEP and transmits the encapsulated Layer 2 data through a Layer 3 network.
The following example shows how the data is transmitted on the VXLAN:

650) this.width=650; "Src=" http://7xo6kd.com1.z0.glb.clouddn.com/ Upload-ueditor-image-20161106-1478392784308097415.png "/>

The Host-a and Host-b are located in the VXLAN of VNI 10, which communicates through VTEP-1 tunnels established between VTEP-2 and VXLAN.
The data transfer process is as follows:

    1. When Host-a sends data to Host-b, Host-b's Mac and IP act as the source Mac and IP of the packet, and then send the data through the VTEP-1 as the destination Mac and Ip,host-a Mac of the packet.

    2. VTEP-1 find the mac-b corresponding VTEP-2 from the mapping table that they maintain, then perform VXLAN encapsulation, plus VXLAN header, UDP header, and outer IP and MAC headers. At this point the outer IP header, the destination address is VTEP-2 IP, the source address is VTEP-1 IP. At the same time, because the next hop is Router-1, the target address in the outer MAC header is Router-1 Mac.

    3. After the packets are sent out of the VTEP-1, the routers of the external network are routed according to the outer IP header and finally to the router Router-2 connected to the VTEP-2.

    4. Router-2 sends the data packets to VTEP-2. VTEP-2 is responsible for unpacking the packets, removing the outer MAC header, the outer IP header, the UDP header, and the VXLAN header in turn.

    5. VTEP-2 data packets to host-b based on the destination MAC address.

The above process we see VTEP is the most core component of VXLAN, responsible for the encapsulation and decryption of data. The tunnel is also built between VTEP, and VTEP is responsible for the transmission of the data.

Linux Support for VXLAN

VTEP can be implemented by proprietary hardware or by using pure software. The more mature VTEP software implementations currently include:

    1. Linux with VXLAN kernel module

    2. Open VSwitch

Let's start by looking at how Linux supports the Vxlan,open vSwitch approach, which is discussed later in this chapter.

650) this.width=650; "Src=" http://7xo6kd.com1.z0.glb.clouddn.com/ Upload-ueditor-image-20161106-1478392973783000572.jpg "/>

Implementation method:

    1. Linux Vxlan creates a UDP Socket, which is monitored by default on port 8472.

    2. After the Linux Vxlan receives the Vxlan packet on the UDP socket, it will unpack and then transfer it to a Vxlan interface based on the Vxlan ID, and then to the VM via the Linux bridge it is connected to.

    3. After receiving the packets from the virtual machine, the Linux Vxlan is encapsulated as a multicast UDP packet and sent from the NIC.

Here, I believe you have a general understanding of the principle of VXLAN. In the next section we will learn how to configure and implement VXLAN in Neutron.


650) this.width=650; "Src=" http://7xo6kd.com1.z0.glb.clouddn.com/ Upload-ueditor-image-20161106-1478392975717028696.jpg "alt=" Blob.png "/>

VXLAN concept (part II)-5 minutes a day to play with OpenStack (109)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.