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

What are the operation methods of network management in openstack

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

Share

Shulou(Shulou.com)05/31 Report--

This article will explain in detail what the operation methods of network management in openstack are, and the editor thinks it is very practical, so I share it with you for reference. I hope you can get something after reading this article.

Experiment procedure:

Dashboard operation to create a network

Admin users log in to the dashboard interface, select "Project-Network-Network Topology" in the navigation bar, display the network topology of the current environment, and click create Network.

Create a network with the name "Network_web_01" and check "share". Others remain by default.

Create a subnet with the name Subnet_web_01 ", the network address 192.168.11.0 take 24, the gateway ip" 192.168.11.1 ", and the rest remain by default

Configure Subnet details, enter IP "192.168.11.100192.168.11.200" from the beginning to end of the assigned address pool, leave everything else by default, and then click create.

Go back to the network topology page and view the changes in the network topology

Select "Project-Network-Network" in the navigation bar to enter the network list and view the network you just created.

Click the network name "Network_web_01" to view network details

View subnet information

View network interfaces

Then create the network "Network_web_02", the subnet name "Subnet_web_02", the network address' 192.168.12.0Universe, the gateway ip192.168.12.1, and the address pool start and end range IP "192.168.12.100-192.168.12.200"

Virtual machine instances access each other

In the navigation bar, select "Project-Computing-instance" to enter the list of virtual machines. Refer to the previous virtual machine release operation experiment, and issue two virtual machine instances:

Virtual machine instance name: Instance_web_test

Qty 2

Select startup source: Image

Create a new volume: NO

Assign image: Img_web

Allocation specification: Flavor_web

Distribution Network: Network_web_01

Others remain by default

As you can see, the creation is successful and the network allocation is successful.

Instance_web_test_1:192.168.11.110

Instance_web_test_2:192.168.11.102

Click the names of the two virtual machine instances you just created, go to the virtual machine instance page, go to the console, and then test the mutual ping.

The network can communicate with each other.

In the navigation bar, go to "Project-Network-Network Topology" to view the current network topology

Issue virtual machine instance Instance_web_test-3, select Network_web_02 for network, and other parameters are the same as Instance_web_test_1.

You can see that the assigned address is 192.168.12.101, which cannot be interconnected with Instance_web_test1 at this time.

View the current network topology

Instance_web_test-1 and Instance_web_test-3 are on different networks.

Create a router

In "Project-Network-routing", create a router

Enter the router name Router_web, select provider for the external network, and keep the default for others to create.

Enter the route to view the route overview

Go to the interface page and add an interface

Add subnet "Network_web_01"

Return to the list of interfaces, view the added interfaces, and wait for a period of time before the interface status changes to up.

Continue to add interfaces, add "Network_web_02"

View the network topology at this time

At this point, Instance_web_1 and Instance_web_2 can communicate with each other through the router.

Manage floating ip

Although virtual instances can ping each other through routers, they cannot access the external network or communicate with the host.

If you need to access the external network, you must configure a floating ip on the router

Before using floating ip, you need to create a flat type provider network in Administrator-Network, and check the external network option if you need to access the external network.

Openstack tranning labs provides a provider network by default. You can assign a floating ip, as follows

Enter "Project-Network-floating ip" and click assign to Project

Provider is selected by default for random allocation of allocation pool.

When finished, you can see the assigned floating ip

In "Project-calculation-instance", assign a floating ip to Instance_web_test_3

It is allocated as follows

Similarly, you can assign a floating ip to the Instance_web_test_1

Create a security group

Go to the overview of Instance_web_test-3 to view the security groups currently applied to the virtual machine instance

In the navigation bar, select "Project-Network-Security Group", enter the list, and click manage rules.

View defualt security groups

The default security group rule allows all outbound traffic, but forbids incoming traffic.

Return to the list of security groups and create security groups

Create a security group named SG_web, and then add rules

Configure a rule that allows any address to ping

Add another rule that allows all tcp protocols

Check the configured security group rules

Then Instance_web_test_3 in the virtual machine instance, and click Edit Security Group

Delete the default security group default and add the SG_web security group

Confirm security group rules

Verify that the security group is effective from the floating ip of the host ping Instance_web_test-3.

Log in to the virtual machine instance Instance_web_test-3 from the signed host ssh to verify that the security group is valid

CLI operation to create a network

Create a network Network_cli_01 and set it to shared

Openstack network create-share Network_cli_01

View a list of networks

Openstack network list

Create Network_cli_01 subnet subnet_cli_01, network address "192.168.21.0 take 24", subnet address "192.168.21.100" 192.168.21.200 ", gateway address:" 192.168.21.1 "

Openstack subnet create-- network Network_cli_01-- subnet-range 192.168.21.0 Subnet_cli_01 24-- allocation-pool start=192.168.21.100,end=192.168.21.200-- gateway 192.168.21.1

View list of network subnets

Openstack subnet list

View the list of network ports of the network "Network_cli_01"

Openstack port list-network Network_cli_01-long

Create the network Network_cli_02 and subnet Subnet_cli_02, with the network address 192.168.22.0 take 24, the address pool 192.168.22.100, and the gateway 192.168.22.200.

Openstack network create-share Network_cli_02

Openstack subnet create-- network Network_cli_02-- subnet-range 192.168.22.0 Subnet_cli_02 24-- allocation-pool start=192.168.22.100,end=192.168.22.200-- gateway 192.168.22.1

View a list of networks and network subnets

Openstack network list

View Subnet

Openstack subnet list

Because openstack tranning lab limits the project virtual machine resources to 10, you need to delete the virtual machine instances between them before you can continue to create new virtual machines.

Openstack server delete Instance_web_test_ {1,2,3}

Issue two virtual machine instances "Instance_cli_test", configured as follows

Start the source image

Mirror: img_cli

Specification: flavor_cli

Distribution Network: network_cli_01

Openstack server create-image Img_cli-flavor Flavor_cli-network Network_cli_01-min 2-max 2 Instance_cli_test

After the creation is completed, you can verify the network connectivity of the virtual machine instance in dashboard.

Create Instance_cli_test-3, launch source image, mirror img_cli, specification flavor_cli, network Network_cli_02

Openstack server create-image Img_cli-flavor Flavor_cli-network Network_cli_02 Instance_cli_test-3

Go to dashboard to verify the interoperability of virtual machine instances

Create a router

Create the router as follows

Openstack router create-availability-zone-hint nova Router_cli

View a list of routers

Openstack router list

Configure the external network of the router to be provider

Openstack router set-external-gateway provider Router_cli

Add subnets "Subnet_cli_01 and Subnet_cli_02" respectively

Openstack router add subnet Router_cli Subnet_cli_01openstack router add subnet Router_cli Subnet_cli_02

View the interface information of router Router_cli

Openstack router show Router_cli | grep interfaces_info

Go to dashboard to verify that virtual machine instances can communicate with each other.

Manage floating ip

View the network port of the instance Instance_cli_test-3

Openstack port list-server Instance_cli_test-3

Record the ID of the network port to be assigned

Create and assign a floating ip of the external network provider to the virtual machine instance Instance_cli_test-3 port

Openstack floating ip create-port provider

View the list of floating ip and the status of the network port

Openstack floating ip list-long

You can see that the floating ip will not be deleted because of the deletion of the virtual machine instance, but will be de-allocated

Recreate a floating ip

Openstack floating ip create provider

The created floating ip is 203.0.113.118

Assign a floating ip to the instance Instance_cli_test-1

Openstack server add floating ip Instance_cli_test-1 203.0.113.118

Security group

View the security groups of Instance_cli_test-3

Openstack server show Instance_cli_test-3

Record the name of the security group and the project ID

View Instance_cli_test-3 security group ID

Openstack security group list-project

View the security group rule ID of the corresponding virtual machine instance

Openstack security group rule list | grep

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