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 configure OVS flat network3 in ML2

2025-04-09 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

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

How to configure OVS flat network3 in ML2, I believe that many inexperienced people are at a loss about this. Therefore, this article summarizes the causes and solutions of the problem. Through this article, I hope you can solve this problem.

Flat network is a network without tag. The physical network card of the host is connected to the flat network through a bridge, and each flat network occupies a physical network card.

Enable flat network in ML2 configuration

Set the flat network-related parameters in the control node / etc/neutron/plugins/ml2/ml2_conf.ini:

Tenant_network_types = flat

Specifies that the network type created by an ordinary user is flat. It should be noted that because the flat network corresponds to the physical Nic one by one, the tenant network will not use flat in general. This is just an example.

Then you need to specify the corresponding relationship between the flat network and the physical network.

A flat network is defined through flat_networks in [ml2_type_flat], and label is "default".

The Open vSwitch bridge corresponding to default is specified as br-eth2 through bridge_mappings in [ovs].

Label is the identity of the flat network, which will be used when creating the flat (shown later). The name of the label can be any string, as long as you make sure that the label names in each node ml2_conf.ini are the same.

The relationship between label and physical Nic may be different from node to node. This is because each node can connect the instance to the flat network using a different physical network card.

Unlike the flat network implemented by linux bridge, the corresponding relationship between label and physical Nic is not directly specified in ml2, but the corresponding relationship between label and ovs bridge is specified.

[ovs] bridge_mappings = default:br-eth2

The ovs bridge here is br-eth2. We need to issue the ovs-ovctl command in advance:

Create a br-eth2.

Bridge the physical network card eth2 to the br-eth2.

If you want to create multiple flat networks, you need to define multiple label separated by commas, and of course you need to use multiple ovs bridge, as shown below:

[ml2_type_flat] flat_networks = flat1,flat2

[ovs]

Bridge_mappings = flat1:br-eth2,flat2:br-eth3

Through the above steps, the flat network of the control node is ready. The compute nodes need to do the same configuration, and then restart the Neutron services for all nodes.

Next, it is necessary to examine the current network structure through ovs-vsctl show.

We should not be surprised by the ovs bridge "br-eth2" and the port "eth2" bridged on it, which is the result of the previous configuration.

In addition, however, br-int and br-eth2 have an extra port "int-br-eth2" and "phy-br-eth2" respectively, and both port are of "patch" type and point to each other through "peer".

The above configuration describes the fact that the two bridges br-int and br-eht1 are connected by int-br-eth2 and phy-br-eth2.

Veth pair VS patch port

In the previous local network, we saw that br-int and linux bridge can be connected through veth pair.

Here the two ovs bridge are connected by patch port.

It seems that both veth pair and patch port can be connected to the bridge, how to choose when using it?

Patch port is a port type unique to ovs bridge and can only be used in ovs.

If you are connecting two ovs bridge, use patch port first because the performance is better.

So:

1. Connect two ovs bridge and use patch port first. Technically, veth pair can also be implemented, but its performance is not as good as patch port.

two。 To connect ovs bridge and linux bridge, you can only use veth pair.

3. Connect two linux bridge, only veth pair can be used.

After reading the above, have you mastered how to configure OVS flat network3 in ML2? If you want to learn more skills or want to know more about it, you are welcome to follow the industry information channel, thank you for reading!

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: 234

*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