OpenStack adds a network port to a virtual machine

Source: Internet
Author: User

Create subnet  
--allocation-pool start=start_ip_address,end=end_ip_address --dns-nameserver dns_resolver--gateway Public _network_gateway

Find tenant First

[[email protected] ~]# OpenStack Project list
+----------------------------------+---------+
| ID | Name |
+----------------------------------+---------+
| 3013fa8f600145108b836228236cb8f3 | Demo |
| 4a930be69d0540d38d5529449d93f1d0 | Service |
| a7d90c2bbe1b49a18a04482447a52aa9 | admin |

Create port for demo tenant If the admin tenant is not visible under demo tenant

SOURCE admin-openrc.sh
[Email protected] ~]# neutron port-create--tenant-id 3013fa8f600145108b836228236cb8f3--fixed-ip subnet_id=27539347- F509-4368-9ec1-36dcb07942da,ip_address=172.16.0.123 Flat

Show Port List

[Email protected] ~]# neutron port-list
+--------------------------------------+------+-------------------+-------------------------------------------- -------------------------------------------+
| ID | name | mac_address | Fixed_ips |
+--------------------------------------+------+-------------------+-------------------------------------------- -------------------------------------------+
| 26130380-B1E9-491F-8232-65946C90A3B9 | | Fa:16:3e:ee:55:ac | {"subnet_id": "d0440b1c-84ac-438a-be93-8e70f6416b3c", "IP_Address": "192.168.26.122"} |
| 5e92c6fb-e869-4596-819b-d827b9264ce6 | | fa:16:3e:7d:c2:9c | {"subnet_id": "27539347-f509-4368-9ec1-36dcb07942da", "IP_Address": "172.16.0.122"} |
| bbee04e8-9e21-4651-9c37-ea2372198f8b | | fa:16:3e:e7:7f:5e | {"subnet_id": "27539347-f509-4368-9ec1-36dcb07942da", "IP_Address": "172.16.0.123"} |
| c22ca00f-48d5-494c-a602-f230443abc87 | | fa:16:3e:92:3d:1e | {"subnet_id": "d0440b1c-84ac-438a-be93-8e70f6416b3c", "IP_Address": "192.168.26.123"} |

Attach port to virtual machine

Nova Interface-attach--port-id bbee04e8-9e21-4651-9c37-ea2372198f8b server-name

OpenStack adds a network port to a virtual machine

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.