

Uplink Port on the physical switch - connects to external network.

Tap vs tun driver#
So one end of the virtual network device is also the protocol stack, and the other end depends on the driver implementation of the virtual network device. As for how and where to send out, it's device-driven. The data from the protocol stack will also be handed over to the network devices. The data from network devices will be forwarded to the protocol stack. For the Linux kernel network equipment management module, there is no difference between virtual devices and physical devices. What about a virtual network device? Firstly, it is also managed by the network equipment management subsystem of the kernel. The driver does not need to know the details of the protocol stack, nor does the protocol stack need to know the details of the device driver.įor a network device, like a pipe, there are two ends, and the data received from either end will be sent from the other end.įor example, a physical network card eth0, whose two ends are the core protocol stack (indirect communication through the kernel network device management module) and the external physical network, the data received from the physical network will be forwarded to the core protocol stack, and the data sent by the application from the protocol stack will be sent through the physical network. It is known that there is a network device management layer in the Linux kernel, which is between the network device driver and protocol stack, responsible for connecting the data interaction between them. Stay The Receiving Process of Linux Network Packet and The sending process of data package In these two articles, the process of sending and receiving data packets is introduced. The difference between virtual devices and physical devices Beginning with this article, we will introduce virtual network devices under Linux. In today's cloud era, there are virtual machines and containers everywhere, and the network management behind them can not be separated from virtual network devices, so understanding virtual network devices is conducive to our better understanding of the network structure in the cloud era.
