Wednesday, July 10, 2019

Install Open vSwitch on CentOS 7

At the time of writing, I couldn't find any Open vSwitch package for CentOS 7, but there is an Open vSwitch package on OpenStack, so I try to use this package to install Open vSwitch on CentOS 7:

# yum update
# yum install centos-release-openstack-queens
# yum install openvswitch
# systemctl enable openvswitch
# systemctl start openvswitch
# systemctl status openvswitch
# ovs-vsctl show
Edit interface configuration:

# vim /etc/sysconfig/network-scripts/ifcfg-eno1

TYPE=Ethernet
NAME=eno1
UUID=65cf8a92-1734-43ac-9abf-6dd0f41463b0
DEVICE=eno1
TYPE=OVSPort
DEVICETYPE=ovs
OVS_BRIDGE=ovs-br1
ONBOOT=yes

# vim /etc/sysconfig/network-scripts/ifcfg-ovs-br0

DEVICE=ovs-br0
DEVICETYPE=ovs
TYPE=OVSBridge
BOOTPROTO=static
IPADDR=192.168.1.5
NETMASK=255.255.255.0
GATEWAY=192.168.1.1
ONBOOT=yes

Finish, now restart network service:

# systemctl restart network

No comments:

Post a Comment