我要评分
获取效率
正确性
完整性
易理解

Creating a VM Network

You can refer to this section to create different types of networks as required.

  1. Import environment variables.
    source ~/.admin-openrc
  2. Create a network.
    openstack network create $net_name --provider-network-type vxlan --project admin --provider-segment 300

    Replace net_name with the name of the created VM network.

  3. Create a subnet.
    openstack subnet create $subnet_name --ip-version 4 --project admin --network $net_name --subnet-range $subnet --allocation-pool start=$start_ip,end=$end_ip

    Modify the following parameters as required:

    • Replace subnet_name with the name of the created subnet.
    • Replace net_name with the name of the network created in step 2.
    • Replace subnet with the created subnet segment. For example: 192.168.101.0/24.
    • Replace start_ip with the start IP address of the network segment.
    • Replace end_ip with the end IP address of the network segment.