As the growing of the big data, more and more computing power is requested, also more and more data requires huge of storage disk to restore. But these machines cannot be installed in a single server room, and layer 2 communication requires a widely scaled layer 2 net, to satisfy these requirements, a new overlay network technology is promoted. The VxLAN, Virtual Extensible LAN, connects the dispersive server room logically to generate a overlay layer 2 net.
What is overlay network? To simplely explain that, we should back to the OSI model, also know as the known as 7 layers model.
In this picture, the network is divided into 7 parts, we’ll concern on the data-link layer and network layer.
As known, in the current network, IPs are necessary to communication between two sperated hosts, the communication between two network segments is called layer 3 communication. But if these two hosts are in the same server room, they could reach to each other on layer 2 network(suppose they are in the same network segment).
What the overlay network is to build a layer 2 network based on a layer 3 network.
As the picture above shows, R1 and R2 connected to each other through a layer 3 IP network. R3 and R4 connected to each other through a layer 2 overlay network based on the layer 3 network which connects the R1 and R2.
In this situation, the layer 2 network is a overlay network.
In VxLAN, the packets are encapsulated at VTEP(VXLAN Tunnel Endpoints), and transffered to the remote VTEP to fullfill the layer 2 pakets sperading on the layer 3 network.
Take the picture above as an example, R1 and R2 is VTEP, also, there are other physical network on R1 and R2, pacekt from R3 to R4 is a layer 2 packet. It’s encapsulated on R1 and the encapsulated content will be treated as the payload of the layer 3 network. Then the multi encapsulated packets are sent to R2 based on the regually layer 3 sperading. When received on R2, it will be decapsulated, by the network layer, then the VTEP will decapsulate the payload, and a layer 2 packet will get, which will be sent to R4.
This is the simple VxLAN data transfer processing. Hope you like it.