- OpenStack Networking Cookbook
- Sriram Subramanian Chandan Dutta Chowdhury
- 345字
- 2021-07-09 21:40:42
Creating a Port without an associated instance using the OpenStack CLI
Port is another building block in OpenStack Neutron. You will not find a way to create a Port using the Horizon dashboard. As we saw earlier in the Associating a Network to an instance using Horizon recipe, a Port is created implicitly as a part of the create instance operation from the dashboard. However, using CLI, some advanced networking configuration can be accomplished. This recipe shows you how to create a Port using OpenStack CLI.
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 Port:
- 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 Port is
neutron port-create
and the only mandatory parameter is the Network name. However, it is a good practice to specify a name for the Port: - Note that the Port has been assigned a MAC address as well as an IP address.
- You can use the
neutron port-list
command to view a list of all the Ports in the system:
How it works…
A Port primarily represents an endpoint in a Network. The most common Ports in an OpenStack environment are the virtual interfaces in a virtual machine.
When the neutron port-create
command is executed, OpenStack Neutron allocates a unique MAC address to the Port. The Network name argument effectively helps Neutron in identifying a Subnet and then Neutron assigns an IP address to the Port from the list of available IP addresses in the Subnet.
The post-create
request is also the most common trigger to configure the physical and virtual Networks using the appropriate drivers.
- 大話PLC(輕松動(dòng)漫版)
- JavaScript修煉之道
- C語(yǔ)言程序設(shè)計(jì)案例教程(第2版)
- 編程卓越之道(卷3):軟件工程化
- JavaFX Essentials
- Raspberry Pi for Secret Agents(Third Edition)
- MATLAB應(yīng)用與實(shí)驗(yàn)教程
- Functional Programming in JavaScript
- Learn WebAssembly
- QGIS Python Programming Cookbook(Second Edition)
- Access 2010數(shù)據(jù)庫(kù)應(yīng)用技術(shù)實(shí)驗(yàn)指導(dǎo)與習(xí)題選解(第2版)
- SciPy Recipes
- Apache Solr PHP Integration
- Node.js實(shí)戰(zhàn):分布式系統(tǒng)中的后端服務(wù)開(kāi)發(fā)
- 軟件自動(dòng)化測(cè)試實(shí)戰(zhàn)解析:基于Python3編程語(yǔ)言