4个节点(controller, network,2 compute nodes)

1.0   on the network node

1.1

set –I ‘s/start] on/#start\ on/g’ /etc/init/neutron-dhcp-agent.conf

1.2   Stop dhcp agent”
service neutron-dhcpagent stop

2.0  
on the compute node1

2.1  
install the dhcp agent:
apt-get install neutron-dhcp-agent -y

2.2  
mv /etc/neutron/dhcp_agent.ini  /etc/neutron/dhcp_agent.ini.bk

2.3  
拷贝网络节点的配置到计算节点node1
mv network:/etc/neutron/dhcp_agent.ini 
/etc/neutron/dhcp_agent.ini.

2.4  
启动node1上的dhcp agent
service neutron-dhcp-agent restart

3.0  
On compute node 2

3.1  
和node1一样,同样在node2上启动dhcp-agent

4.0  
On the controller node

4.1  
查看agent的状态:neutron agent-list

4.2  
创建network
“private”和相应的subnet
neutron net-create private
neutron subnet-create –name private-subnet private 10.0.0.0/29

4.3  
创建network
“private1”和相应的subnet
neutron net-create private1
neutron subnet-create –name private1-subnet private1 10.0.1.0/29

4.4  
在private上启动一个instance,private1上启动2个instance
nova boot –image cirros-qcow2 –flavor 1 –nic net-id=<private net is>
private one

nova boot –image cirros-qcow2 –flavor 1 –nic
net-id=<private1 net is> private1 two

nova boot –image cirros-qcow2 –flavor 1 –nic
net-id=<private1 net is> private1 three

4.5  
nova list

5.0  
on node1 和node2

5.1  
ip netns
可以看到network namespaces

6.0  
on controller node

6.1  
查找dhcp agent 的ID

6.2  
查找那个dhcp agent 服务private 和private1
neutron dhcp-agent-list-hosting-net private
neutron dhcp-agent-list-hosting-net private1

6.3  
或者查找private(1)上都有哪些dhcp agent

Neutron net-list-on-dhcp-agent <dhcp agent ID on
node1>

Neutron net-list-on-dhcp-agent <dhcp agent ID on node2>

6.4  
检查2个dhcp agent

Neutron agent-show  <dhcp agent ID on node1>

Neutron agent-show 
<dhcp agent ID on node2>
可以看到neutron 会track每个agent的heartbeat信息

6.5   为每个网络private(1) 部署 DHCP HA(需要为每个network添加?)

Neutron dhcp-agent-network-add  <dhcp agent ID on node2> private1

Neutron dhcp-agent-network-add  <dhcp agent ID on node1> private2

6.6  
验证每个网络都有2个agent

neutron dhcp-agent-list-hosting-net private
neutron dhcp-agent-list-hosting-net private1

6.7  
log in instance3,通过node1(2)上的netns

ip netns exec <qdhcp-network id> ssh cirros@instance3

6.8  
停掉node2 上的agent

Killall dnsmasq

Service neutron-dhcp-agent stop

6.9  
用udhcpc验证instance3依然可以得到IP

ip netns exec <qdhcp-network id> ssh cirros@instance3

  • on instance3

sudo udhcpc

7.0 
on controller and node1(2)

7.1 移除已经stop的node2上的agent

Neutron agent-delete <dhcp agent ID on node2>

7.2 验证node2上的agent不在

Neutron agent-list

7.3 重启node2上的agent

Service neutron-dhcp-agent restart

7.4 验证node2的agent又回来了

Neutron agent-list

最新文章

  1. New Year&#39;s resolution for 2016
  2. linux 内核cache
  3. mac上mysql乱码问题解决
  4. php 解析 视频 信息 封面 标题 图片 支持 优酷, 土豆 酷6 56 新浪 qq播客 乐视 乐视
  5. JForum二次开发(一)
  6. Centos6.3建立FTP
  7. PHP之路——Apache启动失败查看日志
  8. Centos下需安装Pytnon,Pytharm
  9. ##DAY6 UIScrollView
  10. Asp.Net请求响应过程
  11. 假如时光倒流,我会这么学习Java
  12. 金融量化分析【day110】:IPython介绍及简单操作
  13. Android打开doc、xlsx、ppt等office文档解决方案
  14. puppet(3) 变量、数据类型、表达式、条件判断语句-if、case、selector、unless
  15. Java高并发系列 — AQS
  16. Xcode工程编译错误之iOS开发之Xcode9报错 Compiling IB documents for earlier than iOS7 is no longer supported.
  17. (玩起来)DAX/PowerBI系列 - 参数表(Parameter Table) - 多时间段数值对比
  18. 安全提示:IIS不要开启“WebDAV”扩展(转载)
  19. 自学Linux Shell10.1-使用编辑器vim
  20. python运维小技巧

热门文章

  1. 创建超小的Golang docker 镜像
  2. SQL case when else
  3. window.location.href = window.location.href window.location.reload()
  4. Taylor&#39;s theorem
  5. FatMouse and Cheese---hdu1078(记忆化搜索=搜索+dp)
  6. MongoDB的Python客户端PyMongo(转)
  7. 【我的Android进阶之旅】Android使用getIdentifier()方法根据资源名来获取资源id
  8. Android系统移植与调试之------->如何添加一个adb wifi无线调试的功能【开发者选项】-【Wifi调试】
  9. python collection 和 heapq 模块使用说明
  10. Linux(6)- redis发布订阅/持久化/主从复制/redis-sentinel/redis-cluster、nginx入门