Ubuntu 14.04.02 安装openvswitch-2.3.1

Open vSwitch安装

 

安装好操作系统

# lsb_release -a
LSB Version:	core-2.0-amd64:core-2.0-noarch:core-3.0-amd64:core-3.0-noarch:core-3.1-amd64:core-3.1-noarch:core-3.2-amd64:core-3.2-noarch:core-4.0-amd64:core-4.0-noarch:core-4.1-amd64:core-4.1-noarch:security-4.0-amd64:security-4.0-noarch:security-4.1-amd64:security-4.1-noarch
Distributor ID:	Ubuntu
Description:	Ubuntu 14.04.2 LTS
Release:	14.04
Codename:	trusty

安装依赖包

apt-get install -y build-essential fakeroot debhelper \autoconf automake bzip2 libssl-dev \openssl graphviz python-all procps \python-qt4 python-zopeinterface \python-twisted-conch libtool

下载最新版本openvswitch

wget http://openvswitch.org/releases/openvswitch-2.3.1.tar.gz

tar –zxvf openvswitch-2.3.1.tar.gz

cd openvswitch-2.3.1/

可以用# dpkg-checkbuilddeps检查下是否依赖包已经安装完毕

构建安装包

DEB_BUILD_OPTIONS='parallel=8 nocheck' fakeroot debian/rules binary

查看已经构建完成的包

# ls
openvswitch-2.3.1                            openvswitch-dbg_2.3.1-1_amd64.deb     openvswitch-vtep_2.3.1-1_amd64.deb
openvswitch-2.3.1.tar.gz                     openvswitch-ipsec_2.3.1-1_amd64.deb   python-openvswitch_2.3.1-1_all.deb
openvswitch-common_2.3.1-1_amd64.deb         openvswitch-pki_2.3.1-1_all.deb       
openvswitch-datapath-dkms_2.3.1-1_all.deb    openvswitch-switch_2.3.1-1_amd64.deb
openvswitch-datapath-source_2.3.1-1_all.deb  openvswitch-test_2.3.1-1_all.deb

安装openvswitch 2.3.1

dpkg -i openvswitch-common_2.3.1-1_amd64.deb  openvswitch-switch_2.3.1-1_amd64.deb

查看内核模块是否加载

# lsmod | grep open
openvswitch            65844  0 
gre                    13796  1 openvswitch
vxlan                  37629  1 openvswitch
libcrc32c              12644  1 openvswitch

查看openvswitch版本

# ovs-vsctl -V
ovs-vsctl (Open vSwitch) 2.3.1
Compiled Mar 14 2015 15:37:45
DB Schema 7.6.2

查看OVS进程是否启动

# ps -ef | grep ovs | grep -v grep
root       1526      1  0 07:59 ?        00:00:00 ovsdb-server: monitoring pid 1527 (healthy)                                                                                                                                                                                                                                                                                                                                                         
root       1527   1526  0 07:59 ?        00:00:00 ovsdb-server /etc/openvswitch/conf.db -vconsole:emer -vsyslog:err -vfile:info --remote=punix:/var/run/openvswitch/db.sock --private-key=db:Open_vSwitch,SSL,private_key --certificate=db:Open_vSwitch,SSL,certificate --bootstrap-ca-cert=db:Open_vSwitch,SSL,ca_cert --no-chdir --log-file=/var/log/openvswitch/ovsdb-server.log --pidfile=/var/run/openvswitch/ovsdb-server.pid --detach --monitor
root       1536      1  0 07:59 ?        00:00:00 ovs-vswitchd: monitoring pid 1537 (healthy)                                                                                                                                                                                     
root       1537   1536  0 07:59 ?        00:00:02 ovs-vswitchd unix:/var/run/openvswitch/db.sock -vconsole:emer -vsyslog:err -vfile:info --mlockall --no-chdir --log-file=/var/log/openvswitch/ovs-vswitchd.log --pidfile=/var/run/openvswitch/ovs-vswitchd.pid --detach –monitor

Open vSwitch基本操作

创建一个名为br0的网桥

# ovs-vsctl add-br br0

查看创建的网桥

# ovs-vsctl list-br
br0

将网卡接口 eth0 加入 br0

ovs-vsctl add-port br0 eth0

如果服务器就一个网卡且是远程操作此时肯定会断网,建议写条语句操作。这边是虚拟机断网之后通过管理窗口进去修改配置文件

# cat /etc/network/interfaces
# interfaces(5) file used by ifup(8) and ifdown(8)
auto lo
iface lo inet loopbackauto br0
iface br0 inet dhcpauto eth0
iface eth0 inet manual
up ifconfig $IFACE 0.0.0.0 up
down ifconfig $IFACE down

重启下网络就可以了。查看信息。以下信息是我添加了br1以及连接controller之后的信息。

# ovs-vsctl show 
d0a719d3-310d-4863-ab52-b64378f03400Bridge "br1"Port "br1"Interface "br1"type: internalBridge "br0"Controller "tcp:192.168.136.129:6653"is_connected: truePort "eth0"Interface "eth0"Port "br0"Interface "br0"type: internalovs_version: "2.3.1"

Floodlight安装管理

安装jdk和ant软件环境包

 apt-get install build-essential default-jdk ant python-dev 

一般网上教程都是git clone,我试过ant时编译报错,不知道是系统版本问题不,我就直接在github下载floodlight-master.zip包进行编译启动就没有问题。

下载解压之后

# cd floodlight-master/
# ant
# java -jar target/floodlight.jar

运行成功后查看端口

# netstat -ntl
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State      
tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN     
tcp        0      0 127.0.0.1:631           0.0.0.0:*               LISTEN     
tcp6       0      0 :::8080                 :::*                    LISTEN     
tcp6       0      0 127.0.0.1:6642          :::*                    LISTEN     
tcp6       0      0 :::22                   :::*                    LISTEN     
tcp6       0      0 ::1:631                 :::*                    LISTEN     
tcp6       0      0 :::6653                 :::*                    LISTEN     
tcp6       0      0 :::6655                 :::*                    LISTEN     

转载于:https://www.cnblogs.com/yudar/p/4626628.html

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mzph.cn/news/257074.shtml

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

struts-上传

一、创建项目项目名称:demoupload二、添加jar包commons-fileupload-1.2.2.jarcommons-io-2.0.1.jarcommons-lang3-3.1.jarfreemarker-2.3.19.jarjavassist-3.11.0.GA.jarognl-3.0.5.jarstruts2-core-2.3.4.1.jarxwork-core-2.3.4.1.jar三、在web.xml文件中配置过滤器…

将数组作为参数,调用该函数时候给的是数组地址还是整个数组

1、在实际的应用中,数组经常作为函数参数,将数组中的数据传递到另外一个函数中,一般来说,传递可以采用两种方法: 1>、数组元素作为函数的实参时,用法跟普通变量作参数相同,将数组元素的值传递…

C#项目中常用到的设计模式

C#项目中常用到的设计模式 1. 引言 一个项目的通常都是从Demo开始,不断为项目添加新的功能以及重构,也许刚开始的时候代码显得非常凌乱,毫无设计可言。但是随着项目的迭代,往往需要将很多相同功能的代码抽取出来,这也是…

学习笔记(14):Python网络编程并发编程-文件传输功能实现

立即学习:https://edu.csdn.net/course/play/24458/296245?utm_sourceblogtoedu 1.课程目的: 实现客户端输入下载文件的命令,然后将命令发送给服务端,服务端再执行下载文件的命令,最后将执行下载文件命令后的结果返回给客户端&a…

NFS精简版配置方法

此实验的前提是防火墙需关闭。 1.关闭iptables /etc/init.d/iptables stop /etc/init.d/iptables status 2.关闭selinux setenforce 0 getenforce Permissive ---出现这个单词即代表selinux临时关闭,如需永久关闭则需修改/etc/sysconfig/selinux配置文件 …

Serializable接口中serialVersionUID字段的作用

序列化运行时使用一个称为 serialVersionUID 的版本号与每个可序列化类相关联,该序列号在反序列化过程中用于验证序列化对象的发送者和接收者是否为该对象加载了与序列化兼容的类。 如果接收者加载的该对象的类的 serialVersionUID 与对应的发送者的类的版本号不同&…

重新认知指针

1、把指针指向的变量的数据类型称为指针的数据类型;而任何一个指针变量本身数据值的类型都是unsigned long int 2.、指针变量名前的符号“*”表示的是指向运算。 3、不要认为“ *p" 是指针变量,指针变量是p而不是*p 4、

分布式数据库 HBase

原文地址:http://www.oschina.net/p/hbase/ HBase 概念 HBase – Hadoop Database,是一个高可靠性、高性能、面向列、可伸缩的分布式存储系统,利用HBase技术可在廉价PC Server上搭建起大规模结构化存储集群。 HBase是Google Bigtable的开源实…

学习笔记(15):Python网络编程并发编程-进程理论

立即学习:https://edu.csdn.net/course/play/24458/296423?utm_sourceblogtoedu 1.进程:正在运行的一个过程或者一个任务; 2.进程与程序的区别:程序是一堆代码,程序运行起来就是进程了,一个程序运行两次,算…

【翻译】Designing Websites for iPhone X

让网站适配 iphone X 英文原文地址:https://webkit.org/blog/7929/...本文原文地址:https://github.com/cnsnake11/... The section below about safe area insets was updated on Oct 31, 2017 to reflect changes in the iOS 11.2 beta. 以下关于safe …

指针作为函数参数引用数组的任意元素

void swap(int *a,int*b) {*a*a^*b;*b*a^*b;*a*a^*b; } swap(data[j],data[j1]); int data[10]{13,55,48,13,62,45,754,0,10};以上是我遇到的问题,我觉得调用这个swap函数是不能这样直接把数组的某个元素直接丢给swap数据 在程序中参加数据处理的量不是指…

使用 Log4Net 记录日志

第一步:下载Log4Net 下载地址:http://logging.apache.org/log4net/download_log4net.cgi 把下载的 log4net-1.2.11-bin-newkey解压后,如下图所示: 双击bin文件夹 双击net文件夹,选择针对.NET FramerWork的不同版本 找…

Xcode常用快捷键

1. 文件CMD N: 新文件CMD SHIFT N: 新项目CMD O: 打开CMD S: 保存CMDOPtS:保存所有文件CMD SHIFT S: 另存为CMD W: 关闭窗口CMD Q :退出XcodeCMD SHIFT W: 关闭文件2. 编辑CMD [: 左缩进CMD ]: 右缩进CMDshiftF:项目中查找CMDG:查找下一个CMDshiftG:查…

学习笔记(16):Python网络编程并发编程-开启子进程的两种方式

立即学习:https://edu.csdn.net/course/play/24458/296424?utm_sourceblogtoedu #方式一:使用python内置模块multiprocessing下的process类 from multiprocessing import Process import time#定义进程函数 def task(name):print(%s is running!%name)t…

ElasticSearch的API python调用

os json datetime datetime django.http HttpResponse reelasticsearch Elasticsearches Elasticsearch([])res8 es.search({:{:{:{::}}}} ) statistic():():hit res8[][]:a (%hit %hit[])a re.split(a);arow a:id row[] row[]idHttpResponse(a)转载于:https://blog.51cto…

HDU 1757 A Simple Math Problem (矩阵快速幂)

题目链接&#xff1a;http://acm.hdu.edu.cn/showproblem.php?pid1757 在吴神的帮助下才明白如何构造矩阵&#xff0c;还是好弱啊。 此处盗一张图 1 #include <iostream>2 #include <cstdio>3 #include <cstring>4 #include <cmath>5 #include <al…

Spring学习使用标签来标记资源(@Component、@Repository、 @Service和@Controller)和用法(包括如何jsp正在使用)...

首先&#xff0c;在xml其中新增部分标有下划线的文件&#xff0c;容器初始化的时候需要扫描包 注意&#xff1a; a. 包款扫描(下划线部分)一定要加&#xff0c;默认是不扫描整个包。与每一包之间’&#xff0c;’开。如过具有同样的父包&#xff0c;那么我们能够用父包来取…

python 判断字符串时是否是json格式方法

在实际工作中&#xff0c;有时候需要对判断字符串是否为合法的json格式 解决方法使用json.loads,这样更加符合‘Pythonic’写法 代码示例&#xff1a; Python import json def is_json(myjson):try:json_object json.loads(myjson)except ValueError, e:return Falsereturn Tr…

学习笔记(17):Python网络编程并发编程-Process对象的其他属性或方法

立即学习:https://edu.csdn.net/course/play/24458/296427?utm_sourceblogtoedu 1.pid与ppid&#xff1a;pid进程编码&#xff0c;ppid进程的父进程编码&#xff1b;os.getpid()查看正在运行的进程编码&#xff0c;os.getppid()查看正在运行进程的父进程编码 2.僵尸进程&…