- 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:
- Using the appropriate credentials, SSH into the OpenStack node where the Neutron client software packages are installed.
- Source the shell RC file to initialize the environment variables required for the CLI commands as seen in the previous recipe.
- 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: - Now, when we execute the
neutron net-list
command, we will see thatCookbookNetwork2
has an associated Subnet that we just created: - Users can view the list of Subnets using the
neutron subnet-list
command:
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.
推薦閱讀
- Node.js+Webpack開發實戰
- Mobile Application Development:JavaScript Frameworks
- Magento 2 Theme Design(Second Edition)
- TypeScript實戰指南
- Python漫游數學王國:高等數學、線性代數、數理統計及運籌學
- RabbitMQ Cookbook
- Kotlin編程實戰:創建優雅、富于表現力和高性能的JVM與Android應用程序
- 執劍而舞:用代碼創作藝術
- 微信小程序開發與實戰(微課版)
- Cocos2d-x Game Development Blueprints
- 微信小程序開發實戰:設計·運營·變現(圖解案例版)
- Struts 2.x權威指南
- Android移動應用開發項目教程
- CodeIgniter Web Application Blueprints
- Akka入門與實踐