Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to analyze the structure of Weave Network

2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/01 Report--

How to carry out Weave network structure analysis, many novices are not very clear about this, in order to help you solve this problem, the following editor will explain for you in detail, people with this need can come to learn, I hope you can gain something.

The editor will deploy the container and analyze the Weave network structure.

Run the container bbox1 in host1:

Eval $(weave env)

Docker run-- name bbox1-itd busybox

It is important to execute eval $(weave env) first, and its purpose is to send subsequent docker commands to weave proxy for processing. If you want to restore the previous environment, execute eval $(weave env-- restore).

Check the network configuration of the current container bbox1

Bbox1 has two network interfaces, eth0 and ethwe, where eth0 connects to the default bridge network, the bridge docker0.

Now let's focus on ethwe. From the named and assigned IP 10.32.0.1 weave 12, we can guess that ethwe is related to weave, and ethwe@if77 tells us that ethwe corresponds to interface with number 77. Find the interface from the ip link command output of host1:

Vethwepl22809 and ethwe are a pair of veth pair, and vethwepl22809 is hung on host1's Linux bridge weave.

Besides there is a vethwe-bridge on vethwepl22809,weave, what is this? Let's take a closer look at the ip-d link output:

Here are several new interface:

① vethwe-bridge and vethwe-datapath are veth pair.

The parent device (master) of ② vethwe-datapath is datapath.

③ datapath is an openvswitch.

④ vxlan-6784 is vxlan interface, and its master is also datapath,weave. Hosts communicate through VxLAN.

The weave network consists of two virtual switches: Linux bridge weave and Open vSwitch datapath,veth pair vethwe-bridge and vethwe-datapath that connect the two. The division of labor between weave and datapath is different. Weave is responsible for connecting containers to the weave network, and datapath is responsible for sending and receiving data in VxLAN tunnels between hosts.

Run another container bbox2.

Docker run-- name bbox2-itd busybox

Weave DNS creates a default domain name for the container. Weave.local,bbox1 can communicate with bbox2 directly through hostname.

Is it helpful for you to read the above content? If you want to know more about the relevant knowledge or read more related articles, please follow the industry information channel, thank you for your support.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report