- 积分
- 16840
在线时间 小时
最后登录1970-1-1
|
马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有账号?开始注册
x
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.9 m- ~& Q* [7 I9 K
% {5 u; z! q+ Y
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).5 [0 U9 z1 R, |1 V
! |) c$ w+ F; R6 b
Install the requisite packages.
8 j, G9 u" t3 u# @# a# p#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' S9 |. C! B# C# J' @
Necessary steps for building RPM
5 C0 }5 \. ]! E7 G#mkdir -p ~/rpmbuild/SOURCES1 t) S# H2 N$ \
#wget http://openvswitch.org/releases/openvswitch-2.5.1.tar.gz
, \9 {" K" I# Z7 H. p/ S2 Z1 V#cp openvswitch-2.5.1.tar.gz ~/rpmbuild/SOURCES/' K8 `; g, i9 a
#tar xfz openvswitch-2.5.1.tar.gz3 q9 H# _" k/ { m
#sed 's/openvswitch-kmod, //g' openvswitch-2.5.1/rhel/openvswitch.spec > openvswitch-2.5.1/rhel/openvswitch_no_kmod.spec
! f5 n& v- R B+ kBuild the RPM
9 U: v+ A" ?. h% q' {#rpmbuild -bb --nocheck ~/openvswitch-2.5.1/rhel/openvswitch_no_kmod.spec
% V7 s+ d7 E+ m2 ?9 m$ u& n; QInstall the RPM4 T9 @4 o) E! y9 G
#ls -l ~/rpmbuild/RPMS/x86_64/
! E$ Z3 k6 L& B9 u1 y#yum localinstall ~/rpmbuild/RPMS/x86_64/openvswitch-2.5.1-1.x86_64.rpm2 F1 @. H K6 C2 w* N8 A% b5 ]
Start the OVS service and enable it for the next boot7 P; U1 Z i, g! ]) Y" V6 `
#systemctl start openvswitch.service+ {- C! f8 Y, s' l
#chkconfig openvswitch on
6 {, H# }' Q9 \" C" x7 g s5 h- iThis 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.) ^! d0 M+ p% \1 l" b. q! ]7 `
( Z$ E( T s! d7 q) O. u
Test the OVS Version
( H6 P3 G1 L3 Q8 n' N5 a#ovs-vsctl -V' _+ i" s2 c, T2 j8 R: F
- F3 `4 u& U0 ]* K( ^Useful OVS commands: O. J! Z0 [# J
#ovs-vsctl show( z0 J1 Z5 P" f. n
#ovs-ofctl show br0' M, ~( ^# q9 L4 ?
W% N# Q, F9 x1 c
Create a new OVS Bridge, add physical ports, connect OVS with ODL controller
. v% e2 L* w* T5 R$ n5 O3 C7 N#ovs-vsctl add-br ovsbr0' B: t5 A( }+ o
#ovs-vsctl set bridge ovsbr0 protocols=OpenFlow13& T8 l; h1 B7 M* k3 B" W* K
#ovs-vsctl list controller+ ~; z. W0 n9 \9 U I4 [
#ovs-vsctl add-port ovsbr0 eth4" r+ X4 k) Y, j2 m5 g
#ovs-vsctl add-port ovsbr0 eth81 E/ H" ~: E! U* q
#ovs-vsctl set-controller ovsbr0 tcp:192.168.15.57:6633. F y( E* T% |: c/ Q: t) C: w
#ovs-vsctl show |
|