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 understand the principle and configuration of flat network

2025-03-26 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

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

How to understand the principle and configuration of flat network, I believe that many inexperienced people are at a loss about it. Therefore, this paper 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, which requires the physical Nic of the host to be directly connected to the linux bridge, which means that each flat network will own a physical Nic.

In the figure above, eth2 is bridged to brqXXX to provide a flat network for instance. If you need to create multiple flat network, you need to prepare multiple physical network cards.

Next we will discuss how to configure the flat network.

Enable flat network in ML2 configuration

Set the parameters related to flat network in / 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 indicate the correspondence between the flat network and the physical Nic.

As shown above: 1. A flat network is defined through flat_networks in [ml2_type_flat], and label is "default". two。 Indicate that the physical Nic corresponding to default is eth2 through physical_interface_mappings in [linux_bridge].

Understand the relationship between label and ethX

Label is the identity of the flat network, and you need to specify the label when creating the flat (demonstrated 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 correspondence between label and physical network card 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.

For example, for flat network with label of "default", Node A may use eth2, configured as:

Physical_interface_mappings = default:eth2

Node B may use eth3 and is configured to:

Physical_interface_mappings = default:eth3

Support for multiple flat

If you want to create multiple flat networks, you need to define multiple label separated by commas. Of course, you also need to use multiple physical NICs, as shown below:

[ml2_type_flat]

Flat_networks = flat1,flat2

[linux_bridge]

Physical_interface_mappings = flat1:eth2,flat2:eth3

After reading the above, have you mastered how to understand the principle and configuration of flat network? 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: 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