odl控制器

(一)OpenDaylight的安装及使用

Openlab实验平台实验--使用Postman下发流表_br-sw-CSDN博客

OpenDayLight+Mininet+Postman下发流表实验-CSDN博客

ODL十大问题:如何用postman控制ODL查看和下发流表-腾讯云开发者社区-腾讯云 (tencent.com)

SDN-Postman及python编程对流表的操作_output-node-connector-CSDN博客

OpenDayLight+Mininet+Postman下发流表实验-CSDN博客

opendaylight安装全过程(包含odl碳软件)_安装opendaylight本地化界面后默认用户名和密码-CSDN博客

OpenDaylight Lithium版本简单应用及流表操作指南-腾讯云开发者社区-腾讯云 (tencent.com)

ODL(OpenDayLight)Yang UI界面下发流表(ODL+mininet)_odl下发流表-CSDN博客

OpenDayLight+Mininet+Postman下发流表实验-CSDN博客

ubuntu16.04搭建opendaylight和mininet实验环境小结_如何确认mininet已经正确安装-CSDN博客 feature

netstat -an|grep 6633

        步骤一:更新源

步骤二:安装JDK 1.8

 apt-get install openjdk-8-jdk

yum install openjdk-8-jdk

 步骤三:配置JDK环境变量
  1.  命令如下:

root@windy-virtual-machine:~# vim /etc/profile

root@windy-virtual-machine:~# source /etc/profile

root@windy-virtual-machine:~# echo $PATH

  1.  profile中环境配置如下:

export JAVA_HOME=/usr/lib/jvm/java-1.8.0-openjdk-amd64

export JRE_HOME=${JAVA_HOME}/jre

export CLASSPATH=.:${JAVA_HOME}/lib:${JRE_HOME}/lib

export PATH=${JAVA_HOME}/bin:$PATH

  1. 检查JDK环境:

echo $JAVA_HOME

wget https://nexus.opendaylight.org/content/repositories/public/org/opendaylight/integration/distribution-karaf/0.6.4-Carbon/distribution-karaf-0.6.4-Carbon.tar.gz

  1. 解压压缩包

如果是zip 文件  unzip 命令解压

unzip karaf-0.7.3.zip

  (3)进入解压后的文件夹并启动ODL

  1. 进入web端OpenDayLight

安装组件

opendaylight-user@root>feature:install xxx  # 安装指定feature包

opendaylight-user@root>feature:uninstall xxx  # 卸载指定feature包

opendaylight-user@root>feature:info xxx  # 查看指定feature包信息

opendaylight-user@root>feature:list  # 查看feature列表

opendaylight-user@root>feature:list -i  # 查看已安装的feature列表

1.安装支持北向接口REST API的组件:feature:install odl-restconf

本节使用ODL北向RESTCONF接口下发OpenFlow流表,打通最简单的网络。

 2.  安装DLUX(web功能)功能:feature:install odl-dluxapps-applications

3.安装L2 switch和OpenFlow插件:feature:install odl-l2switch-switch-ui

重新启动karaf

4.OpenFlowPlugin相关feature介绍及安装

安装:

feature:install odl-openflowplugin-flow-services-rest(+回车)

  • 1

安装好后查看feature

feature:info odl-openflowplugin-flow-services-rest(+回车)

     7. 登陆管理WEB UI

       http://localhost:8181/index.html

http://192.168.112.131:8181/index.html#/login

       用户名和密码都是admin

安装:

feature:install odl-openflowplugin-flow-services-rest(+回车)

  • 1

安装好后查看feature

feature:info odl-openflowplugin-flow-services-rest(+回车)

ODL的web界面dlux

feature:install odl-dluxapps-yangman

feature:install odl-dluxapps-topology

第一种方法  ./karaf

第二种方法

root@mininet-vm:/home/mininet/ODL/bin# ./start

root@mininet-vm:/home/mininet/ODL/bin# ./client -u karaf

用户名 密码均为 admin

mn --topo tree,3 --controller=remote,ip=192.168.112.131:6633

mn --topo=single,3 --controller=remote,ip=192.168.112.128,port=6633 --switch ovsk,protocols=OpenFlow13

Pingall

ovs-ofctl -O OpenFlow13 show s1

 附录:
     因为SDN控制器默认的连接端口指定为6653和6633,如果在一个系统中需要使用多种SDN控制器的情况下,那么就会出现端口占用无法连接控制器的情况,在这里简单的给出修改默认端口的方法,以供参考:
        1、切换到安装的opendaylight文件夹/karaf-0.7.3/etc/opendaylight/datastore/initial/config,找到default-openflow-connection-config.xml或者legacy-openflow-connection-config.xml,如图所示:
2、使用gedit打开文件,并编辑<port>6653<port>这一行为你想要指定的端口,保存退出,重启opendaylight即可:
步骤四:查看ODL的效果

mn --topo single,3 --controller=remote,ip=192.168.112.131,port=6633

mn --topo=single,3 --controller=remote,ip=192.168.112.131,port=6633 --switch ovsk,protocols=OpenFlow13

mn --controller=remote,ip=192.168.176.131,port=6633

Mn --mac --switch ovsk,protocals=OpenFlow13 --controller=remote,ip=192.168.176.131,port=6633

Opendaylight使用界面下发流表

mn --topo single,3 --controller=remote,ip=192.168.176.131,port=6633

mn --topo=single,3 --controller=remote,ip=192.168.112.131,port=6633 --switch ovsk,protocols=OpenFlow13

创建拓扑

netstat -an|grep 6633

查看6633端口是否被侦听

查看交换机是否已连接控制器

root@mininet-vm:/home/mininet# ovs-vsctl show

918037ec-b307-45d7-a75a-f1ac4337d135

    Bridge "s1"

        Controller "ptcp:6654"

        Controller "tcp:192.168.176.131:6633"

            is_connected: true

        fail_mode: secure

        Port "s1-eth3"

            Interface "s1-eth3"

        Port "s1"

            Interface "s1"

                type: internal

        Port "s1-eth1"

            Interface "s1-eth1"

        Port "s1-eth2"

            Interface "s1-eth2"

    ovs_version: "2.0.2"

将交换机的协议版本设置为 openflow1.0

ovs-vsctl set bridge s1 protocols=OpenFlow10

在nodes菜单中 记录节点id      openflow:1

在yangui中选择 opendaylight-inventory rev.2013-08-19

点config  nodes    nodeid tableid flowid

Match的左侧 show container

Match  匹配选择 ethernet-match  type 为0x0800

Layer-3-match 选择 ip-v4-match  使用ipv4地址匹配

设置源地址 为10.0.0.1 /32

目的地址为10.0.0.2/32

删除对应流表项:

root@mininet-vm:/home/mininet# ovs-ofctl del-flows s1 dl_type=0x0800,nw_src=10.0.0.1,nw_dst=10.0.0.2

基于openflow1.3 下发流表

ovs-vsctl set bridge s1 protocols=OpenFlow13  设置 openflow 版本为1.3

评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值