|
|
Open vSwitch (OVS) is a production quality, multilayer virtual switch software available for various platforms. The server platforms include x86 based latest Linux distributions e.g. Debian 16 LTS or CentOS 7.2. Popular SDN switch operating system development company Pica8 also bundles the OVS in a custom Ubuntu version for Pronto, Dell, and many other switches.3 A i0 b+ B3 G& ^, S
2 o* _# }9 e8 O+ y$ P; @
Below is an effort to provide easy installation instructions for OVS on CentOS 7.2 and also to integrate OVS with the OpenDaylight. Note this blog is updated to use OVS version 2.5.1 (bug fix release for OVS 2.5.0).: i+ y6 {. m4 ]' m) q
# w0 [6 p, e* l/ l
Install the requisite packages.) z( k# W3 b: j, T ^0 D( C; m
#yum -y install make gcc openssl-devel autoconf automake rpm-build redhat-rpm-config python-devel openssl-devel kernel-devel kernel-debug-devel libtool wget/ I* Q: J5 ^# P M' n! ~& p- x
Necessary steps for building RPM
: _5 I# `3 R' t% z. t3 c#mkdir -p ~/rpmbuild/SOURCES9 x) W: o9 H4 h9 `: _, p
#wget http://openvswitch.org/releases/openvswitch-2.5.1.tar.gz( y1 ?- u; H8 D% ^9 b9 G1 ^; D% P
#cp openvswitch-2.5.1.tar.gz ~/rpmbuild/SOURCES// f$ Z4 t' k/ D0 `- C
#tar xfz openvswitch-2.5.1.tar.gz# S5 S" j0 T7 }- x
#sed 's/openvswitch-kmod, //g' openvswitch-2.5.1/rhel/openvswitch.spec > openvswitch-2.5.1/rhel/openvswitch_no_kmod.spec3 U6 B/ i" l7 X& H ~
Build the RPM
$ z. L( }8 @6 W- c#rpmbuild -bb --nocheck ~/openvswitch-2.5.1/rhel/openvswitch_no_kmod.spec
" w1 t# @, o% a W) qInstall the RPM
1 F! r; k( ` ^6 ?#ls -l ~/rpmbuild/RPMS/x86_64/5 v$ J( f0 U. C. B. P+ g
#yum localinstall ~/rpmbuild/RPMS/x86_64/openvswitch-2.5.1-1.x86_64.rpm
; A" p/ B8 X- L2 ~3 ~1 q; DStart the OVS service and enable it for the next boot5 W7 j) {; p9 F8 X. S, k
#systemctl start openvswitch.service
: x! k' A" g7 d, Y( B6 B9 O#chkconfig openvswitch on; m4 b' K" [2 q8 |1 E
This process will install the OVS on the server and start the process. Firewall should be open to accept the incoming TCP connection at port 6633.- T0 k$ B/ M4 B: V/ f% e5 p" m7 [
! r- }! K7 C. y4 Q
Test the OVS Version
# s2 v! M) h1 N) X* ~#ovs-vsctl -V# w/ J7 K8 J/ z* b, k: @& l
- h3 A# z5 V# W! V" b. mUseful OVS commands
( b. y( Z6 Q/ r. W- |+ I6 x& K2 w0 i#ovs-vsctl show
! }8 m' q/ p" k#ovs-ofctl show br09 ]+ W6 _" s0 @
) R5 h+ ]. \# l* B4 GCreate a new OVS Bridge, add physical ports, connect OVS with ODL controller" P& F/ }3 d9 U) D& N8 L
#ovs-vsctl add-br ovsbr0
8 p: n2 D8 x4 j! Y/ q#ovs-vsctl set bridge ovsbr0 protocols=OpenFlow13
1 U: S6 T. S/ j" K' `#ovs-vsctl list controller: ~" C" D7 [4 C8 h& y+ d
#ovs-vsctl add-port ovsbr0 eth4
. l4 m4 O& Y) q0 f4 o#ovs-vsctl add-port ovsbr0 eth8$ ]6 x+ Q2 x$ `
#ovs-vsctl set-controller ovsbr0 tcp:192.168.15.57:66336 t( y$ I5 ~9 u, M% u! p
#ovs-vsctl show |
|