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>
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步