官术网_书友最值得收藏!

  • OpenStack Networking Cookbook
  • Sriram Subramanian Chandan Dutta Chowdhury
  • 269字
  • 2021-07-09 21:40:41

Creating a Subnet using OpenStack CLI

Similar to the CLI commands to create a Network, the next recipe will explore the CLI command to create a Subnet. The key aspect of the CLI commands for Subnet creation is that a Network Name is a mandatory attribute.

Getting ready

You will need the following information to get started:

  • The login credentials for SSH to a node where the Neutron client packages are installed
  • A shell RC file that initializes the environment variables for CLI

How to do it…

The next set of steps will show you how to use Neutron CLI to create a Subnet:

  1. Using the appropriate credentials, SSH into the OpenStack node where the Neutron client software packages are installed.
  2. Source the shell RC file to initialize the environment variables required for the CLI commands as seen in the previous recipe.
  3. The command to create a Subnet is neutron subnet-create and the mandatory arguments are the Network name and IP address range in the CIDR format. However, it is a good practice to specify a name for the Subnet. For simplicity, we will choose the Network, CookbookNetwork2, that was created earlier because it does not have any associated Subnet yet:
    How to do it…
  4. Now, when we execute the neutron net-list command, we will see that CookbookNetwork2 has an associated Subnet that we just created:
    How to do it…
  5. Users can view the list of Subnets using the neutron subnet-list command:
    How to do it…

How it works…

When the user executes the neutron subnet-create command, Neutron creates a Subnet with the specified IP address range and other parameters. Neutron also associates the Subnet with the specified Network.

主站蜘蛛池模板: 林芝县| 竹山县| 咸宁市| 屏边| 乌拉特中旗| 自治县| 青川县| 谢通门县| 中卫市| 偏关县| 壤塘县| 麦盖提县| 栾城县| 岢岚县| 荥阳市| 新巴尔虎右旗| 长治市| 镇远县| 泊头市| 安福县| 仁寿县| 阿鲁科尔沁旗| 曲松县| 吉安县| 绿春县| 桃园县| 涪陵区| 泊头市| 梨树县| 曲松县| 繁峙县| 深泽县| 宁武县| 林州市| 衡阳市| 云安县| 铜川市| 清原| 黄浦区| 静安区| 龙泉市|