虚拟机单一网卡设置两个IP
一、在虚拟机里修改虚拟网卡配置
cd /ect/sysconfig/network-scripts/
vi ifcfg-eth0
改BOOTPROTO=static
cp ifcfg-eth0 ifcfg-eth0:1 #复制配置文件#
vi ifcfg-eth0:1
改DEVICE=eth0:1
改IPADDR=新的IP
service network restart
二、找到网络控制节点
在控制节点中使用neutron agent-list,找到其中的Metadata agent节点,即网络控制节点。
三、登录网络控制节点
neutron port-update $portID --allowed-address-pairs type=dict list=true ip_address=新的IP
portID可通过:
neutron port-list | grep "原有IP" 查得
其它:
可绑定多个
neutron port-update ad33c996-b5e9-4c91-8f73-6d14ab3827d6 --allowed-address-pairs type=dict list=true ip_address=10.133.16.242 ip_address=10.133.16.241 ip_address=10.133.16.243
绑完可根据port-ID查看
neutron port-show portID
neutron port-show ad33c996-b5e9-4c91-8f73-6d14ab3827d6
已建好的虚拟机添加网卡
nova interface-attach --net-id 3e680906-75d7-4d97-aa5f-9466bc1fd811 880e89fd-e2f3-4e67-ac32-7f12267bd6a2
第一串是网络id,第二串是虚机id,都可以在portal里查到。
虚拟机单一网卡设置两个IP的更多相关文章
- CentOS工作内容(五)单一网卡配置多个IP
CentOS工作内容(五)单一网卡配置多个IP 用到的快捷键 tab 自动补齐(有不知道的吗) ctrl+a 移动到当前行的开头(a ahead) ctrl+e 移动到当前行的开头(e end) ct ...
- Azure China (8) 使用Azure PowerShell创建虚拟机,并设置固定Virtual IP Address和Private IP
<Windows Azure Platform 系列文章目录> 本文介绍的是由世纪互联运维的Windows Azure China. 相比于Global Azure (http://www ...
- CentOS 一个网卡设置多个IP
方法1:少量IP手动绑定: (这里以绑定IP到eth0为例,其它网卡的话修改相应的文件名即可) 1.复制ifcfg-eth0的网卡配置文件并改名为ifcfg-eth0:0 [root@akinlau ...
- Linux 双网卡配置两个IP同时只有一个会通的原因
http://blog.csdn.net/centerpoint/article/details/38542719 根本原因: Linux默认启用了反向路由检查 如果2个网卡在一个Lan里面,那么服务 ...
- linux 单网卡绑定两个ip
一.ubuntu系统: #vi /etc/network/interfaces OR $ sudo vi /etc/network/interfaces Modify as follows: au ...
- 在虚拟机中,设置centos7静态ip
https://blog.csdn.net/qq_34182808/article/details/80065908
- Centos 8双网卡设置
原理:不管开发板是通过直连.路由器还是交换机连接到PC机,最终都是接到PC的以太网网卡(对笔记本来说,一般存在两个网卡,一个WIFI网卡和以太网网卡):因此要实现PC机与虚拟机的互ping,必须把虚拟 ...
- LINUX单网卡绑定多个IP
在linux下,我们有时候需要给单网卡设置不同的IP地址,这样就涉及到单网卡绑定多个IP地址的情况.使用本方法可以方便的为单网卡绑定多个IP地址.笔者使用的环境是centos5.6,应该在fedora ...
- linux系统单网卡绑定多个IP地址
说明: 单网卡绑定两个IP地址,电信和联通,目的:是为了当电信出故障联通正常使用. 系 统 IP地址 子网掩码 网关 CentOS 6.3_64bit eth0:116.18.176.19 255.2 ...
随机推荐
- 为什么只有在用Visual Studio启动程序时会抛出InvalidOperationException异常
博客搬到了fresky.github.io - Dawei XU,请各位看官挪步.最新的一篇是:为什么只有在用Visual Studio启动程序时会抛出InvalidOperationExceptio ...
- 【C++深入浅出】智能指针之auto_ptr学习
起: C++98标准加入auto_ptr,即智能指针,C++11加入shared_ptr和weak_ptr两种智能指针,先从auto_ptr的定义学习一下auto_ptr的用法. template& ...
- C#操作sql通用类 SQLHelper
Codeusing System; using System.Data; using System.Configuration; using System.Web; using System.Web. ...
- 有如下Student 对象, private String name; private int age; private int score; private String classNum; 其中,classNum
package homework003; import java.util.ArrayList; import java.util.List; public class Text { public s ...
- 使用hexdump 查看二进制文件
国内私募机构九鼎控股打造APP,来就送 20元现金领取地址:http://jdb.jiudingcapital.com/phone.html 内部邀请码:C8E245J (不写邀请码,没有现金送) 国 ...
- POJ 1273 || HDU 1532 Drainage Ditches (最大流模型)
Drainage DitchesHal Burch Time Limit 1000 ms Memory Limit 65536 kb description Every time it rains o ...
- 细说Java多线程之内存可见性
编程这些实践的知识技能,每一次学习使用可能都会有新的认识 一.细说Java多线程之内存可见性(数据挣用) 1.共享变量在线程间的可见性 共享变量:如果一个 ...
- java_客户端防表单重复提交和服务器端session防表单重复提交
用户输入FormServlet链接 FormServlet-〉form.jsp->DoFormServlet FormServlet:产生token,放在session中 form.jsp:hi ...
- C#_delegate - 值参数和引用参数
值参数不能加,引用参数可以. 引用参数是共享的 using System; using System.Collections.Generic; using System.Linq; using Sys ...
- Dashboards (Android)
his page provides information about the relative number of devices that share a certain characterist ...