没法绑定浮动ip

news/2024/10/18 20:20:43/

floating IP 能够让外网直接访问租户网络中的 instance。这是通过在 router 上应用 iptalbes 的 NAT 规则实现的。
floating IP 是配置在 router 的外网 interface 上的,而非 instance,这一点需要特别注意。

1、controller控制节点

# cd /etc/sysconfig/network-scripts/
# cp ifcfg-eth0 ifcfg-eth1
[root@controller network-scripts]# cat ifcfg-eth1
TYPE="Ethernet"
BOOTPROTO=static
NAME=eth1
DEVICE=eth1
ONBOOT="yes"
IPADDR=10.0.0.131
NETMASK=255.255.255.0# ifup eth1
# openstack-config --set /etc/neutron/plugins/ml2/ml2_conf.ini  ml2_type_flat flat_networks  provider,private
# openstack-config --set /etc/neutron/plugins/ml2/linuxbridge_agent.ini  linux_bridge physical_interface_mappings  provider:eth0,private:eth1
# systemctl restart neutron-server.service neutron-linuxbridge-agent.service
# openstack-config --set /etc/neutron/neutron.conf  DEFAULT service_plugins router
# openstack-config --set /etc/neutron/neutron.conf  DEFAULT allow_overlapping_ips true
# openstack-config --set /etc/neutron/plugins/ml2/ml2_conf.ini  ml2 type_drivers  flat,vlan,vxlan
# openstack-config --set /etc/neutron/plugins/ml2/ml2_conf.ini  ml2 mechanism_drivers  linuxbridge,l2population
# openstack-config --set /etc/neutron/plugins/ml2/ml2_conf.ini  ml2 tenant_network_types vxlan,vlan,flat
# openstack-config --set /etc/neutron/plugins/ml2/ml2_conf.ini  ml2_type_vxlan vni_ranges 1:10000
# openstack-config --set /etc/neutron/plugins/ml2/linuxbridge_agent.ini  vxlan enable_vxlan  True
# openstack-config --set /etc/neutron/plugins/ml2/linuxbridge_agent.ini  vxlan local_ip 10.0.0.14
# openstack-config --set /etc/neutron/plugins/ml2/linuxbridge_agent.ini  vxlan l2_population  True
# openstack-config --set /etc/neutron/l3_agent.ini  DEFAULT interface_driver linuxbridge
# openstack-config --set /etc/neutron/plugins/ml2/linuxbridge_agent.ini  vxlan local_ip 10.0.0.131
# openstack-config --set /etc/neutron/l3_agent.ini  DEFAULT external_network_bridge
# systemctl restart neutron-server.service \
>   neutron-linuxbridge-agent.service neutron-dhcp-agent.service \
>   neutron-metadata-agent.service neutron-l3-agent.service# systemctl enable neutron-l3-agent.service
Created symlink from /etc/systemd/system/multi-user.target.wants/neutron-l3-agent.service to /usr/lib/systemd/system/neutron-l3-agent.service.# systemctl status neutron-l3-agent.service
● neutron-l3-agent.service - OpenStack Neutron Layer 3 AgentLoaded: loaded (/usr/lib/systemd/system/neutron-l3-agent.service; enabled; vendor preset: disabled)Active: active (running) since 一 2020-03-30 11:02:12 CST; 1min 46s agoMain PID: 492 (/usr/bin/python)CGroup: /system.slice/neutron-l3-agent.service└─492 /usr/bin/python2 /usr/bin/neutron-l3-agent --config-file /usr/share/neutron/neutron-dist.conf --config-dir /usr/share/neutron/l3_agent --config-file /etc/neutron/neutron.conf ...3月 30 11:02:12 controller systemd[1]: Started OpenStack Neutron Layer 3 Agent.

2、compute计算节点

# cd /etc/sysconfig/network-scripts/
# cp ifcfg-eth0 ifcfg-eth1# openstack-config --set /etc/neutron/plugins/ml2/linuxbridge_agent.ini  linux_bridge physical_interface_mappings  provider:eth0,private:eth1
# systemctl restart neutron-linuxbridge-agent.service
# openstack-config --set /etc/neutron/plugins/ml2/linuxbridge_agent.ini  vxlan enable_vxlan  True
# openstack-config --set /etc/neutron/plugins/ml2/linuxbridge_agent.ini  vxlan local_ip 10.0.0.16
# openstack-config --set /etc/neutron/plugins/ml2/linuxbridge_agent.ini  vxlan l2_population  True
# openstack-config --set /etc/neutron/plugins/ml2/linuxbridge_agent.ini  vxlan local_ip 10.0.0.132
# systemctl restart neutron-linuxbridge-agent.service# systemctl status neutron-linuxbridge-agent.service
● neutron-linuxbridge-agent.service - OpenStack Neutron Linux Bridge AgentLoaded: loaded (/usr/lib/systemd/system/neutron-linuxbridge-agent.service; enabled; vendor preset: disabled)Active: active (running) since 一 2020-03-30 11:04:58 CST; 9s agoProcess: 3905 ExecStartPre=/usr/bin/neutron-enable-bridge-firewall.sh (code=exited, status=0/SUCCESS)Main PID: 3912 (/usr/bin/python)Tasks: 1CGroup: /system.slice/neutron-linuxbridge-agent.service└─3912 /usr/bin/python2 /usr/bin/neutron-linuxbridge-agent --config-file /usr/share/neutron/neutron-dist.conf --config-file /etc/neutron/neutron.conf --config-file /etc/neutron/plug...3月 30 11:04:58 compute systemd[1]: Starting OpenStack Neutron Linux Bridge Agent...
3月 30 11:04:58 compute neutron-enable-bridge-firewall.sh[3905]: net.bridge.bridge-nf-call-iptables = 1
3月 30 11:04:58 compute neutron-enable-bridge-firewall.sh[3905]: net.bridge.bridge-nf-call-ip6tables = 1
3月 30 11:04:58 compute systemd[1]: Started OpenStack Neutron Linux Bridge Agent.
3月 30 11:04:59 compute sudo[3953]:  neutron : TTY=unknown ; PWD=/ ; USER=root ; COMMAND=/bin/neutron-rootwrap /etc/neutron/rootwrap.conf privsep-helper --config-file /usr/share/neutron/neutr...
3月 30 11:05:01 compute sudo[4008]:  neutron : TTY=unknown ; PWD=/ ; USER=root ; COMMAND=/bin/neu

http://www.ppmy.cn/news/248256.html

相关文章

springboot websocket怎么通过shiro验证

shiro有几种认证方式,这里只说JSESSIONID方式,正常http请求JSESSIONID是放在cookie中传过去的,但是websocket貌似不能用header和cookie传递参数,所以只能想到用url传参 试了下这种方式: ws://localhost:8730/deploy?…

第十一届蓝桥杯 2020年国赛真题(Java 大学C组)

蓝桥杯 2020年国赛真题(Java 大学C组) #A 美丽的 2 #B 合数个数 #C 扩散 #D 阶乘约数 #E 本质上升序列 #F 天干地支 #G 皮亚诺曲线距离 #H 蓝肽子序列 #I 画廊 #J 答疑 #A 美丽的 2 题目: 问题描述小蓝特别喜欢 2 ,今年是公元 2…

问题随记 —— Cannot create directory /tmp/hive. Name node is in safe mode.

文章目录 问题描述解决方法 问题描述 Hive 启动时出现以下问题: Exception in thread "main" java.lang.RuntimeException: org.apache.hadoop.ipc.RemoteException(org.apache.hadoop.hdfs.server.namenode.SafeModeException): Cannot create directo…

在不到200行的HTML代码中,实现老板要求为他的孩子绘制一个童话乐园:七彩彩虹、微笑笑脸和魔法树

文章目录 准备工作1.绘制七彩彩虹2.绘制微笑笑脸3.绘制多变的魔法树 结语 欢迎来到童话乐园!这里有一些有趣的绘图功能,让你在代码的世界中感受童话般的乐趣。本篇博文将介绍如何使用代码来绘制七彩彩虹、微笑笑脸和魔法树。让我们一起来探索吧&#xff…

HTML特殊字符编码对照表

HTML特殊字符编码对照表 特殊符号命名实体十进制编码特殊符号命名实体十进制编码特殊符号命名实体十进制编码ΑΑΒΒΓΓΔΔΕΕΖΖΗΗΘΘΙΙΚΚΛΛΜΜΝ&a…

python 读取配置文件总是报错 configparser.NoSectionError: No section:

本文为作者原创,禁止转载,违者必究法律责任!!! python 读取配置文件总是报错 configparser.NoSectionError: No section: 无论是 python2的版本,还是python3的版本在读取配置文件时都会出现上面的报错 解决…

HEAP: HEAP: Free Heap block xx modified at xxafter it was freed 堆内存出现野指针错误

首先看下问题提示: HEAP[SimEng.exe]: HEAP: Free Heap block 000002CA51FC08A0 modified at 000002CA51FC0950 after it was freed Ok,碰到这种xxxx地址的报错提示就慌得一批。 解答 经过一种暴力式解谜,找到以下的原因(解谜…

6174问题

描述 假设你有一个各位数字互不相同的四位数,把所有的数字从大到小排序后得到a,从小到大后得到b,然后用a-b替换原来这个数,并且继续操作。例如,从1234出发,依次可以得到4321-12343087、8730-3788352、8532-23586174,又…