其他分享
首页 > 其他分享> > neutron相关

neutron相关

作者:互联网

neutron net-list                        #列出当前租户所有的网络
neutron net-list --all-tenants          #列出当前租户所有的网络
neutron net-create public --shared --provider:network_type vlan --provider:physical_network physnet1   #创建一个网络(vlan/flat)
neutron net-show NET_ID                 #查看一个网络的详细信息
neutron net-delete NET_ID               #删除一个网络
neutron subnet-create public 192.168.1.0/24 --name NAME --allocation-pool start =192.168.1.100,end=192.168.1.200 --gateway 192.168.1.254 --dns_nameserver 8.8.8.8    #创建一个子网
neutron agent-list                      #列出所有的agent
neutron port-create public (--fixed-ip ip_address=10.0.0.1)             #创建端口
neutron port-list                       #查看端口列表

neutron port-create --tenant-id <租户ID> --fixed-ip ip_address=100.107.128.117  <网络ID>  #创建浮动ip
例如:neutron port-create --tenant-id 5de37d2523e04fb9a641a106c560a4c4 --fixed-ip ip_address=100.107.128.117  435c65ea-4018-424f-bc8d-ef2bb1124962

nova interface-attach --port-id <浮动ip的ID> <虚拟机uuid>                                 #将创建的浮动ip挂载到虚拟机上
例如:nova interface-attach --port-id 9fb80a69-ff2e-45b6-98c7-7db42e0978a5 c3c5aef8-f7ca-473a-9cf2-8496c7af0ad0

openstack底层添加安全组规则:
openstack security group rule create  --remote-ip 0.0.0.0/0 --protocol 0  --ingress --ethertype ipv4 <id>

 

标签:--,ip,create,相关,net,port,neutron
来源: https://www.cnblogs.com/xuning-xuning/p/16164891.html