部署完icehouse,安装完实例之后。假设虚拟主机须要和外部进行通信。还须要对宿主机的网桥进行配置
宿主机的配置
改动ifcfg-em1的内容为下面内容:
DEVICE=em1
ONBOOT=yes
DEVICETYPE=ovs
TYPE=OVSPort
OVS_BRIDGE=br-ex
#HWADDR=F8:B1:56:AE:3A:84
#TYPE=Ethernet
#UUID=6f49b547-f1f8-4b21-a0fc-68791a5237dd
#BOOTPROTO=static
#IPADDR=192.168.40.145
#NETMASK=255.255.255.0
#GATEWAY=192.168.40.1
改动ifcfg-br-ex的内容为下面形式
DEVICE=br-ex
DEVICETYPE=ovs
TYPE=OVSBridge
ONBOOT=yes
OVSBOOTPROTO=static
IPADDR=192.168.40.145
PREFIX=24
GATEWAY=192.168.40.1
虚拟主机的配置
为了防止解包对网络带来的影响,须要在虚拟主机中设置恰当的MTU的值,配置例如以下
watermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5uZXQvZXJpY19zdW5haA==/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve/70/gravity/SouthEast" alt="">