Prepare for the Macvlan environment-5 minutes a day to play Docker container Technology (54)

Source: Internet
Author: User

In addition to Overlay,docker, another Driver:macvlan has been developed to support cross-host container networks.

The Macvlan itself is the Linxu kernel module, which allows multiple MAC addresses to be configured on the same physical network card, that is, multiple interface, each of which can be configured with its own IP. Macvlan is essentially a network card virtualization technology, it's not surprising that Docker implements a container network with Macvlan.

The biggest advantage of Macvlan is the excellent performance, compared to other implementations, Macvlan does not need to create a Linux bridge, but instead connects directly to the physical network via an Ethernet interface. Now let's create a Macvlan network.

Prepare the lab environment

We will create Macvlan using a separate NIC Enp0s9 on Host1 and Host2. To ensure that the network packets for multiple MAC addresses are available from ENP0S9, we need to turn on the promiscuous mode of the NIC.

IP link set enp0s9 promisc on

Make sure the ENP0S9 status up and Promisc mode is in effect.

650) this.width=650; "Title=" http://7xo6kd.com1.z0.glb.clouddn.com/ Upload-ueditor-image-20170813-1502590944556070415.png "src=" http://7xo6kd.com1.z0.glb.clouddn.com/ Upload-ueditor-image-20170813-1502590959621015272.jpg "style=" border:0px;float:none; "/>


Because Host1 and Host2 are VirtualBox virtual machines, you also need to set promiscuous mode on the NIC configuration Options page.

650) this.width=650; "Title=" http://7xo6kd.com1.z0.glb.clouddn.com/ Upload-ueditor-image-20170813-1502590944578040770.png "src=" http://7xo6kd.com1.z0.glb.clouddn.com/ Upload-ueditor-image-20170813-1502590959846014897.jpg "style=" border:0px;float:none; "/>

Current Lab Environment:

650) this.width=650; "Title=" http://7xo6kd.com1.z0.glb.clouddn.com/ Upload-ueditor-image-20170813-1502590944551018799.png "src=" http://7xo6kd.com1.z0.glb.clouddn.com/ Upload-ueditor-image-20170813-1502590960440044504.jpg "alt=" 259.png "style=" BORDER:0PX;FONT-SIZE:14.4PX; Vertical-align:middle; "/>

Ready, next section we create a Macvlan network.

650) this.width=650; "Title=" http://7xo6kd.com1.z0.glb.clouddn.com/ Upload-ueditor-image-20170813-1502590767482040568.png "src=" http://7xo6kd.com1.z0.glb.clouddn.com/ Upload-ueditor-image-20170813-1502590960645097668.jpg "alt=" two-dimensional code + fingerprint. png "style=" border:0px; "/>

Prepare for the Macvlan environment-5 minutes a day to play Docker container Technology (54)

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.