Home Archives Categories Tags

OpenStack 物理网卡网桥配置

发布时间: 更新时间: 总字数:341 阅读时间:1m 作者: 分享

OpenStack 的虚机要和外部或跨主机通信,必须经过物理网卡。文本介绍 OpenStack 物理网卡网桥配置。

示例

br-manager

[root@xiexianbin-cn network-scripts]# cat ifcfg-eth0
DEVICE=eth0
NAME=eth0
DEVICETYPE=ovs
TYPE=OVSPort
OVS_BRIDGE=br-manager
ONBOOT=yes
BOOTPROTO=none
[root@xiexianbin-cn network-scripts]#
[root@xiexianbin-cn network-scripts]# cat ifcfg-br-manager
DEFROUTE=yes
PEERDNS=yes
PEERROUTES=yes
ONBOOT=yes
IPADDR=192.168.8.88
GATEWAY=192.168.8.1
NETMASK=255.255.255.0
DEVICE=br-manager
NAME=br-manager
DEVICETYPE=ovs
OVSBOOTPROTO=static
TYPE=OVSBridge
OVS_EXTRA="set bridge br-manager other-conf:hwaddr=fa:16:3e:8a:f4:00"
[root@xiexianbin-cn ~]# ifconfig eth0
eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet6 fe80::f816:3eff:fe6c:d00  prefixlen 64  scopeid 0x20<link>
        ether fa:16:3e:8a:f4:00  txqueuelen 1000  (Ethernet)
        RX packets 1837  bytes 146800 (143.3 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 1707  bytes 2226701 (2.1 MiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
[root@xiexianbin-cn ~]# ifconfig br-manager
br-manager: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.8.88  netmask 255.255.255.0  broadcast 192.168.8.255
        inet6 fe80::a4cb:a6ff:fefb:4d43  prefixlen 64  scopeid 0x20<link>
        ether fa:16:3e:8a:f4:00  txqueuelen 1000  (Ethernet)
        RX packets 1654  bytes 110856 (108.2 KiB)
        RX errors 0  dropped 35  overruns 0  frame 0
        TX packets 1600  bytes 2218039 (2.1 MiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

br-service

[root@xiexianbin-cn network-scripts]# cat ifcfg-eth1 
DEVICE=eth1
NAME=eth1
DEVICETYPE=ovs
TYPE=OVSPort
OVS_BRIDGE=br-service
ONBOOT=yes
BOOTPROTO=none
[root@xiexianbin-cn network-scripts]# 
[root@xiexianbin-cn network-scripts]# cat ifcfg-br-service 
DEFROUTE=yes
PEERDNS=yes
PEERROUTES=yes
ONBOOT=yes
DEVICE=br-service
NAME=br-service
DEVICETYPE=ovs
OVSBOOTPROTO=none
TYPE=OVSBridge

br-ex

[root@xiexianbin-cn network-scripts]# cat ifcfg-eth2
DEVICE=eth2
NAME=eth2
DEVICETYPE=ovs
TYPE=OVSPort
OVS_BRIDGE=br-ex
ONBOOT=yes
BOOTPROTO=none
[root@xiexianbin-cn network-scripts]# cat ifcfg-br-ex 
DEFROUTE=yes
PEERDNS=yes
PEERROUTES=yes
ONBOOT=yes
DEVICE=br-ex
NAME=br-ex
DEVICETYPE=ovs
OVSBOOTPROTO=none
TYPE=OVSBridge
[root@xiexianbin-cn ~]# ifconfig eth2
eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet6 fe80::f816:3eff:fe6c:d00  prefixlen 64  scopeid 0x20<link>
        ether fa:16:3e:56:5f:53  txqueuelen 1000  (Ethernet)
        RX packets 1837  bytes 146800 (143.3 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 1707  bytes 2226701 (2.1 MiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
[root@xiexianbin-cn ~]# ifconfig br-ex
br-ex: flags=4098<BROADCAST,MULTICAST>  mtu 1500
        ether fa:16:3e:56:5f:53  txqueuelen 1000  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 13  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

完毕。

最新评论
加载中...