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 use openvswitch to implement vxlan in openstack

2025-02-20 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

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

This article mainly introduces openstack how to use openvswitch to achieve vxlan, the article is very detailed, has a certain reference value, interested friends must read it!

The details are as follows:

Openstack environment:

Version 1: ocata

2 system: ubuntu16.04.2

3 1 control node + 1 computing node

4 the control node network card is ens33,ip = 172.171.5.200 ens34 manual mode without IP

As soon as you download openswitch

Controller:

Apt-get install neutron-openvswitch-agent

Compute:

Apt-get install neutron-openvswitch-agent

Second configuration openvswitch

Configuration / etc/neutron/plugins/ml2/ml2_conf.ini file

Etc/neutron/plugins/ml2/openvswitch_agent.ini increased in [ovs]

Configuration / etc/neutron/l3_agent.ini

The configuration modification / etc/neutron/plugins/ml2/ml2_conf.ini settings are as follows

The configuration modification / etc/neutron/plugins/ml2/openvswitch_agent.ini settings are as follows

Increase the number of bridges for external networks

Ovs-vsctl add-br br-ex

Add a physical network card to the external bridge

Ovs-vsctl add-port br-ex ens33

Three dashboard configuration tenant network

1 Log in with the admin user to create an external network.

2Log in as a demo user to create an intranet. Because the internal network has been selected as vxlan when configured in the background, the network created by demo users is vxlan.

The network segment configured here is an address that can be assigned by the created instance.

After creating the intranet and extranet, create a router to connect two network segments. The function completed on this router is NAT. When the instance goes out of the public network, NAT the internal network address into a public network address in order to access the public network.

When the network is created, the network topology should look like the following figure. The blue is the public network segment, the yellow is the private network segment, the middle is the router, and the connected yellow is the open instance.

Four-layer network analysis

Unlike Linux-bridge, creating a vxlan network after using Openvswitch as a network driver generates three bridges in controller, which are:

Br-int connects to Dnsmasq, flow table logic processing

Br-ex connects to the network card and goes out to the external network bridge.

Br-tun Tunnel Endpoint

Generate two bridges on the compute node, which are:

Br-int connects to the virtual machine

Br-tun tunnel endpoint, connected to controller.

As shown in the following figure, it is the br-tun analysis of controller and compute nodes, respectively.

Local_ip is the local tunnel endpoint IP address, and remote_ip is the peer tunnel endpoint IP address. In this environment, the network card is managed as the tunnel endpoint, or a separate network card can be used.

It is shown in the following figure:

The following figure shows the br-int bridge of the compute node. There are two endpoints hanging on the bridge, the first is related to the instance, and the second is connected to br-tun.

For details, see the compute node in the following figure.

The following figure shows the port information of the controller node, the first is the connection between br-int and br-tun on controller, the second is the device of dhcp, the third is the end of the router created in dashboard, and the fourth is the connection between br-int and br-ex.

The connection in the above figure is shown in the following figure.

The following figure shows the br-ex bridge of the controller node. The three ports are:

1 the other end of the router (and the other end in br-int)

2 its own loop return, similar to the loop return in linux.

3 external network card

The relationship in the above figure is shown in the following figure:

The VxLAN implemented by openstack using openvswitch is shown in the following figure. The source of the picture is the about cloud.

The above is all the content of the article "how openstack uses openvswitch to achieve vxlan". Thank you for reading! Hope to share the content to help you, more related knowledge, welcome to follow the industry information channel!

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