Get the App
SLTechnology News&Howtos  ›  Servers  › 

How to prepare a macvlan environment

Shulou Source: shulou.com Published: 2022-06-01 00:51:18 11月16日 Update

This article introduces you how to prepare the macvlan environment, the content is very detailed, interested friends can refer to, hope to be helpful to you.

In addition to overlay,docker, another driver:macvlan has been developed that supports cross-host container networks.

Macvlan itself is a linxu kernel module, and its function is to allow multiple MAC addresses, that is, multiple interface, to be configured on the same physical network card, and each interface can configure its own IP. Macvlan is essentially a network card virtualization technology, so it's not surprising that Docker uses macvlan to implement container networks.

The biggest advantage of macvlan is its excellent performance. Compared to other implementations, macvlan does not need to create a Linux bridge, but connects directly to the physical network through an Ethernet interface. Let's create a macvlan network.

Prepare the experimental environment

We will create a macvlan using a separate network card enp0s9 on host1 and host2. In order to ensure that network packets with multiple MAC addresses can pass through enp0s9, we need to turn on the promiscuous mode of the network card.

Ip link set enp0s9 promisc on

Make sure that the enp0s9 status is UP and that the promisc mode is in effect.

Because host1 and host2 are VirtualBox virtual machines, you also need to set the promiscuous mode in the Nic configuration options page.

On how to prepare for the macvlan environment to share here, I hope that the above content can be of some help to you, can learn more knowledge. If you think the article is good, you can share it for more people to see.

Tags: Network card network environment preparation multiple mode configuration content address container more physics help hybrid good maximum excellent host advantage interest Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Redmi OPPO Reno Linux vpn Shulou Tech Info