标签:iptables etc 1.3 lan neu 1.7 bootproto 实例 9.png
类似于阿里云ECS主机的内外网(双网卡不通网段)的结构,最终实现内外网区分隔离。
如果已经是双网卡不需要重新添加,网段配置文192.168.10.20
选择网络适配器然后点下一步:
选仅主机模式然后点完成
确认添加正确然后点确定
# cd /etc/sysconfig/network-scripts/
# vim ifcfg-eth1
TYPE=Ethernet
BOOTPROTO=static
ONBOOT=yes
DEVICE=eth1
NAME=eth1
IPADDR=192.168.20.202 #与192.168.10.x网段最后一位IP相同
NETMASK=255.255.252.0
按照以上过程添加其他服务器,然验证各服务器第二块网卡之间是否网络互通:
# vim /etc/neutron/plugins/ml2/linuxbridge_agent.ini
155 physical_interface_mappings = internal:eth0, external:eth1
# vim /etc/neutron/plugins/ml2/ml2_conf.ini
172 flat_networks = internal, external
# grep "^[a-Z]" /etc/neutron/plugins/ml2/linuxbridge_agent.ini
physical_interface_mappings = internal:eth0, external:eth1
firewall_driver = neutron.agent.linux.iptables_firewall.IptablesFirewallDriver
enable_security_group = true
enable_vxlan = false
# grep "^[a-Z]" /etc/neutron/plugins/ml2/ml2_conf.ini
type_drivers = flat,vlan
tenant_network_types =
mechanism_drivers = linuxbridge
extension_drivers = port_security
flat_networks = internal, external
enable_ipset = true
# systemctl restart neutron-linuxbridge-agent
# systemctl restart neutron-server
# vim /etc/neutron/plugins/ml2/linuxbridge_agent.ini
155 physical_interface_mappings = internal:eth0, external:eth1
# vim /etc/neutron/plugins/ml2/linuxbridge_agent.ini
physical_interface_mappings = internal:eth0,external:eth1
# grep "^[a-Z]" /etc/neutron/plugins/ml2/linuxbridge_agent.ini
physical_interface_mappings = internal:eth0, external:eth1
firewall_driver = neutron.agent.linux.iptables_firewall.IptablesFirewallDriver
enable_security_group = true
enable_vxlan = false
# grep "^[a-Z]" /etc/neutron/plugins/ml2/linuxbridge_agent.ini
physical_interface_mappings = internal:eth0,external:eth1
firewall_driver = neutron.agent.linux.iptables_firewall.IptablesFirewallDriver
enable_security_group = true
enable_vxlan = false
# systemctl restart neutron-linuxbridge-agent
# systemctl restart neutron-linuxbridge-agent
# neutron net-create --shared --provider:physical_network external --provider:network_type flat external-net
neutron CLI is deprecated and will be removed in the future. Use openstack CLI instead.
# neutron subnet-create --name external-subnet --allocation-pool start=192.168.20.100,end=192.168.20.200 --dns-nameserver 223.5.5.5 external-net 192.
168.20.0/24
# neutron net-list
其他保持不变
#如果是在虚拟机启动的实例,则实例启动过程会稍微有点慢,下面是计算节点192.168.10.202上面的实例:
# 下面是计算节点192.168.10.203上面的实例:
标签:iptables etc 1.3 lan neu 1.7 bootproto 实例 9.png
原文地址:https://www.cnblogs.com/chengjian-physique/p/9765623.html