CentOS7 安装 OpenVSwitch
[root@ci-cd ~]# yum install -y openvswitch
[root@ci-cd ~]# ovs-vsctl -V
ovs-vsctl (Open vSwitch) 2.0.0
Compiled Apr 19 2018 17:57:34
启动服务:
[root@ci-cd ~]# systemctl start openvswitch.service
[root@ci-cd ~]# systemctl status openvswitch.service
● openvswitch.service - Open vSwitch
Loaded: loaded (/usr/lib/systemd/system/openvswitch.service; disabled; vendor preset: disabled)
Active: active (exited) since Fri 2019-08-16 16:43:40 CST; 3s ago
Process: 9224 ExecStart=/bin/true (code=exited, status=0/SUCCESS)
Main PID: 9224 (code=exited, status=0/SUCCESS)
Aug 16 16:43:40 ci-cd systemd[1]: Starting Open vSwitch...
Aug 16 16:43:40 ci-cd systemd[1]: Started Open vSwitch.
[root@ci-cd ~]# systemctl enable openvswitch.service
创建ovs网桥:
[root@ci-cd ~]# ovs-vsctl add-br ovs-br0
[root@ci-cd ~]# ifconfig
eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.247.129 netmask 255.255.255.0 broadcast 192.168.247.255
inet6 fe80::20c:29ff:fe5e:aa08 prefixlen 64 scopeid 0x20<link>
ether 00:0c:29:5e:aa:08 txqueuelen 1000 (Ethernet)
RX packets 13166 bytes 18407974 (17.5 MiB)
RX errors