九、网络配置
9.1 网络拓扑
多计算节点的拓扑如下所示

9.2 配置外部OVS网桥
安装好OpenStack后我们用ifconfig查看多出了一个网络设备
[root@host1 ~]# ifconfig
br-ex: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.0.10 netmask 255.255.255.0 broadcast 192.168.0.255
inet6 fe80::c04:16ff:fe70:5842 prefixlen 64 scopeid 0x20<link>
ether 0e:04:16:70:58:42 txqueuelen 1000 (Ethernet)
RX packets 2141 bytes 18504917 (17.6 MiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 2100 bytes 154677 (151.0 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet6 fe80::5054:ff:fe96:4d72 prefixlen 64 scopeid 0x20<link>
ether 52:54:00:96:4d:72 txqueuelen 1000 (Ethernet)
RX packets 17027 bytes 80812288 (77.0 MiB)
RX errors 0 dropped 4217 overruns 0 frame 0
TX packets 11021 bytes 1447603 (1.3 MiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
eth1: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.4.10 netmask 255.255.255.0 broadcast 192.168.4.255
inet6 fe80::5054:ff:feef:9fd8 prefixlen 64 scopeid 0x20<link>
ether 52:54:00:ef:9f:d8 txqueuelen 1000 (Ethernet)
RX packets 18375 bytes 242385292 (231.1 MiB)
RX errors 0 dropped 1055 overruns 0 frame 0
TX packets 14687 bytes 1071717 (1.0 MiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
这儿发现一个现象eth0的ip已经消失了,跑到br-ex这个设备上去了
配置br-ex为外部OVS网桥
[root@host1 ~]# cd /etc/sysconfig/network-scripts/
[root@host1 network-scripts]# cat ifcfg-br-ex (自动生成不需配置)
ONBOOT="yes"
IPADDR="192.168.0.10"
NETMASK="255.255.255.0"
GATEWAY="192.168.0.254"
DEVICE=br-ex #驱动
NAME=br-ex
DEVICETYPE=ovs #驱动类型
OVSBOOTPROTO="static"
TYPE=OVSBridge
[root@host1 network-scripts]# cat ifcfg-eth0
DEVICE=eth0
NAME=eth0
DEVICETYPE=ovs
TYPE=OVSPort #变成虚拟交换机的一个端口
OVS_BRIDGE=br-ex
ONBOOT=yes
BOOTPROTO=none
9.3 验证OVS配置
[root@host1 network-scripts]# ovs-vsctl show
[root@host1 network-scripts]# ip -o addr show

浙公网安备 33010602011771号