In the Open vSwitch environment, a packet is sent from the instance to a physical NIC generally will go through the following several types of devices:
-
tap interface named tapXXXX.
-
linux bridge named qbrXXXX.
-
veth pair named qvbXXXX, qvoXXXX.
-
OVS integration bridge named br-int.
-
OVS patch ports designated int-br-ethX and phy-br-ethX (X is the number interface).
-
OVS Provider Bridge named br-ethX (X is the number interface).
-
Physical interface named ethX (X is the number interface).
-
OVS tunnel bridge named br-tun.
OVS provider bridge will be used in flat and vlan network; OVS tunnel bridge and will be used in vxlan gre network.
1.1 VXLAN implementation model
The conversion process messages
- Virtual Machine (VM) issued Untag message
- After qbr-xxx, the message is still Untag
- Entering br-int, a tag marked VLANID = N
- Leaving br-int, VLANID = N
- Entering br-tun, VLANID = N
- Leaving, VLAN encapsulation of VXLAN, and VNI = M
Note: When the br-tun, VLAN becomes VXLAN, and converted VNI = 100.
The conversion process messages
- Before the message from the host to br-tun, it is VXLAN packets, VNI = M;
- Entering the br-tun, it is converted to a VLAN packet, VLANID = N;
- After leaving to enter from the br-tun br-int, are tag packets, VLANID = N;
- When the br-int, becomes Untag;
- Into a virtual machine (VM) by qbr-xxx
and model VXLAN achieve substantially the same, except that the br-tun becomes br-ethx.
![](https://img2018.cnblogs.com/i-beta/665372/202002/665372-20200210184207613-1428284041.png)
The conversion process messages
- After the virtual machine (VM) issued as Untag message
- After qbr-xxx, or Untag message
- Upon entering br-int, it is labeled before, VLANID = N, and when leaving br-int still VLANID = N
- Upon entering br-ethx, marked with a tag VLANID = M
- When leaving br-ethx, i.e. away from the host Host, VLANID = M.
I.e., when the tag the tag becomes br-int, an ID tag the packet in the conversion br-ethx.
The conversion process messages
- Enters from the Host br-ethx, to tag packets, VLANID = M;
- Leaving br-ethx, VLANID = N;
- Entering br-int, VLANID = N;
- When the br-int, becomes Untag;
- By qbr-xxx into the virtual machine (VM)