openstack 虚地址创建

步骤:

       一、登陆到openstack后台,根据路径 项目->网络→网络, 找到对应网络

               

    二、进入网络详情界面,创建端口

 

    三、根目录(环境变量所在目录),执行环境变量

[root@controller ~]# source admin-openrc

    四、执行neutron port-list, 找到需配置虚地址机器的网络port-id 

   10.300.0.117/10.300.0.118为需要配置虚地址的机器IP , 53e13274-9589-45bf-8b26-7617848ac54b/10a28179-368b-4e8c-9f71-046d24bb6ec7 为对应网络port-id

[root@controller ~]# neutron port-list|grep 10.300.0.117

neutron CLI is deprecated and will be removed in the future. Use openstack CLI instead.

| 53e13274-9589-45bf-8b26-7617848ac54b | kh-v300-117                                     | 2098c535c358495cbcae0564d0d66037 | fa:16:3e:33:17:72 | {"subnet_id""2da3c97e-d6ba-4384-ae18-3d919dc28920""ip_address""10.300.0.117"} |

[root@controller ~]# neutron port-list|grep 10.300.0.118

neutron CLI is deprecated and will be removed in the future. Use openstack CLI instead.

| 10a28179-368b-4e8c-9f71-046d24bb6ec7 | kh-v300-118                                     | 2098c535c358495cbcae0564d0d66037 | fa:16:3e:16:d5:bb | {"subnet_id""2da3c97e-d6ba-4384-ae18-3d919dc28920""ip_address""10.300.0.118"} |

 

  五、执行neutron port-update, 增加allow_address_pairs属性

   neutron port-update xxx(port-id) --allowed_address_pairs list=true type=dict ip_address=10.300.0.217(虚地址)

[root@controller ~]# neutron port-update 53e13274-9589-45bf-8b26-7617848ac54b --allowed_address_pairs list=true type=dict ip_address=10.300.0.217                                    

neutron CLI is deprecated and will be removed in the future. Use openstack CLI instead.

Updated port: 53e13274-9589-45bf-8b26-7617848ac54b

[root@controller ~]# neutron port-update 10a28179-368b-4e8c-9f71-046d24bb6ec7 --allowed_address_pairs list=true type=dict ip_address=10.300.0.217                                    

neutron CLI is deprecated and will be removed in the future. Use openstack CLI instead.

Updated port: 10a28179-368b-4e8c-9f71-046d24bb6ec7

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值