OVS 精确删除流表

前言

今天看了sdnlab小姐姐的mininet教程之后,看到有一个下流表的操作,优先级没能下成功,然后回来实验一下,这个问题是解决了,不过遇到了一个小问题,ovs如何精确删除流表

OVS精确删除流表

查找了若干文献、文档均无果

  • 问题描述

以下是我的流表

OFPST_FLOW reply (OF1.3) (xid=0x2):
cookie=0x0, duration=50.313s, table=0, n_packets=55, n_bytes=3878, priority=0 actions=CONTROLLER:65535
cookie=0x0, duration=2.921s, table=0, n_packets=0, n_bytes=0, priority=100,in_port=1 actions=drop
cookie=0x0, duration=42.320s, table=0, n_packets=167, n_bytes=10020, priority=65535,dl_dst=01:80:c2:00:00:0e,dl_type=0x88cc actions=CONTROLLER:65535
cookie=0x0, duration=2746.808s, table=0, n_packets=20, n_bytes=1400, priority=1,in_port=3,dl_dst=de:34:d2:d3:1b:1e actions=output:2
cookie=0x0, duration=2746.809s, table=0, n_packets=20, n_bytes=1400, priority=1,in_port=2,dl_dst=72:11:da:8b:c8:6e actions=output:3
cookie=0x0, duration=2746.814s, table=0, n_packets=20, n_bytes=1400, priority=1,in_port=3,dl_dst=66:6b:6d:d1:97:cc actions=output:1
cookie=0x0, duration=2746.820s, table=0, n_packets=28, n_bytes=2128, priority=1,in_port=2,dl_dst=66:6b:6d:d1:97:cc actions=output:1
cookie=0x0, duration=47.854s, table=0, n_packets=3, n_bytes=182, priority=1,in_port=1,dl_dst=72:11:da:8b:c8:6e actions=output:3
cookie=0x0, duration=47.865s, table=0, n_packets=3, n_bytes=182, priority=1,in_port=1,dl_dst=de:34:d2:d3:1b:1e actions=output:2

目的是为了删除上面的第二条流表

cookie=0x0, duration=2.921s, table=0, n_packets=0, n_bytes=0, priority=100,in_port=1 actions=drop

试了各种,优先级匹配,动作匹配均发现这不是其关键字,无法做到,稍稍得到OVS命令行的缺陷无法精确删除流表(希望大家打脸)~~ 想了想堂堂一个OVS不支持精确删除流表,我以前做的那些控制器删除流表的实验是怎么实现的,其本质不是也是调用底层吗?以前ODL是根据table-id,flow-id,我通过命令行查看的流表其中并无flow-id该关键字。

后来还是向控制器求助了,查看了RYU的官方RestFul接口,其删除流表可以用到优先级以及对应的匹配域得到

# delete flow entry strictly matching wildcards and priority
# POST /stats/flowentry/delete_strict

于是我就用POSTMAN搞了

然后就删除了

OFPST_FLOW reply (OF1.3) (xid=0x2):
cookie=0x0, duration=62.799s, table=0, n_packets=55, n_bytes=3878, priority=0 actions=CONTROLLER:65535
cookie=0x0, duration=54.806s, table=0, n_packets=169, n_bytes=10140, priority=65535,dl_dst=01:80:c2:00:00:0e,dl_type=0x88cc actions=CONTROLLER:65535
cookie=0x0, duration=2759.294s, table=0, n_packets=20, n_bytes=1400, priority=1,in_port=3,dl_dst=de:34:d2:d3:1b:1e actions=output:2
cookie=0x0, duration=2759.295s, table=0, n_packets=20, n_bytes=1400, priority=1,in_port=2,dl_dst=72:11:da:8b:c8:6e actions=output:3
cookie=0x0, duration=2759.300s, table=0, n_packets=20, n_bytes=1400, priority=1,in_port=3,dl_dst=66:6b:6d:d1:97:cc actions=output:1
cookie=0x0, duration=2759.306s, table=0, n_packets=28, n_bytes=2128, priority=1,in_port=2,dl_dst=66:6b:6d:d1:97:cc actions=output:1
cookie=0x0, duration=60.340s, table=0, n_packets=3, n_bytes=182, priority=1,in_port=1,dl_dst=72:11:da:8b:c8:6e actions=output:3
cookie=0x0, duration=60.351s, table=0, n_packets=3, n_bytes=182, priority=1,in_port=1,dl_dst=de:34:d2:d3:1b:1e actions=output:2

结论

与其说是结论,我觉得更适合说是我的猜想,OVS依旧也是向上层提供相应的OpenFlow的接口,供与控制器交互,我们使用命令行去对OVS进行操纵,其实本身也有利用一些OVS的接口,只是我们命令行的接口封装得并不是那么全面,所有有些操作还是得通过控制器层面去进行,命令行可以作为一种辅助的工具。

OVS 精确删除流表的更多相关文章

  1. [ovs] 编写openflow流表的文档指引

    首先,openflow流表都是使用ovs-ofctl命令进行添加的. 1. 看 ovs-ofctl 的man手册 man ovs-ofctl 或者,这个地方也有:http://www.openvswi ...

  2. ovs 删除流表 指定 actions 中字段

    例: ovs-ofctl del-flows br-int in_port=100,out_group=100 -O openflow13 ovs-ofctl del-flows br-int in_ ...

  3. ovs源码阅读--流表查询原理

    背景 在ovs交换机中,报文的处理流程可以划分为一下三个步骤:协议解析,表项查找和动作执行,其中最耗时的步骤在于表项查找,往往一个流表中有数目巨大的表项,如何根据数据报文的信息快速的查找到对应的流表项 ...

  4. openflow流表项中有关ip掩码的匹配的问题(控制器为ryu)

    一.写在前面 唉,被分配到sdn安全方向,顶不住,顶不住,感觉搞不出来什么有搞头的东西.可若是让我水水的应付,我想我也是做不到的,世上无难事只怕有心人.好了,进入正题,本次要讨论的时一个比较细节的东西 ...

  5. openvswitch 流表操作

    流表组成 每条流表规则由一些列字段组成,可以分为**基础字段.匹配字段和动作字段**三部分. 在打印流表时,在流表中还存在一些显示字段,如duration,idle_age等,此处把这些字段也暂时归之 ...

  6. Open vSwitch流表应用实战

    本文参考:Open vSwitch流表应用实战 一个通过改变流表下发而实现的互相通信实验. 实验目的: 掌握Open vSwitch下发流表操作: 掌握添加.删除流表命令以及设备通信的原理. 原理:. ...

  7. Neutron 理解 (4): Neutron OVS OpenFlow 流表 和 L2 Population [Netruon OVS OpenFlow tables + L2 Population]

    学习 Neutron 系列文章: (1)Neutron 所实现的虚拟化网络 (2)Neutron OpenvSwitch + VLAN 虚拟网络 (3)Neutron OpenvSwitch + GR ...

  8. OVS 流表offload

    原文链接:https://www.dazhuanlan.com/2019/12/31/5e0af1858dada/ 最近开始调研网卡的OVS流表offload功能,所以目前查看一下OVS这块是怎么做的 ...

  9. OVS中arp响应的流表的实现

    总结: 1.br-int 流表总体是按照Normal 的方式,即常规的交换机的转发方式进行转发.而br-tun 交换机则主要按照流表的方式进行转发. 2.一般情况下,VM发出的ARP请求,会在该VM的 ...

随机推荐

  1. How to display values with in piechart using Jfreechart(values in sector )

    I am using Jfreechart to create pie charts. Values are displayed outside pie chart as labels. I want ...

  2. swift类型擦除的定义-swift的类型擦除只是一个类型高低阶转换的游戏。

    所谓swift的类型擦除是指: moand转换: 通过技术手段(通常是包装器),将具体类型的类型信息擦除掉了,只将类型的(某一个侧面的)抽象信息(通常指的是类型尊从的协议.接口.或基类)暴露出来. A ...

  3. 【转】通过blob获取图像并显示

    HTML代码: <div id="forAppend" class="demo"></div> JS代码: var eleAppend ...

  4. 为什么web3 1.0 的接口有personal_*和eth_*的,两者有什么不同

    看https://github.com/ethereum/EIPs/pull/712 Why personal_* namespace instead of eth_* namespace? I be ...

  5. RMAN常用命令汇总!

    进入RMAN:$ rman target sys/oracle@orcl   --远程连接到rman$ rman target sys/oracle@orcl @backup_db.ram   --远 ...

  6. ubuntu16.04下的htk安装编译

    HTK(HMM Tools Kit)是一个剑桥大学开发的专门用于建立和处理HMM的实验工具包[1],主要应用于语音识别领域,也可以应用于语音合成.字符识别和DNA排序等领域.HTK经过剑桥大学.Ent ...

  7. PAT B1018 锤子剪刀布 (20 分)

    大家应该都会玩“锤子剪刀布”的游戏:两人同时给出手势,胜负规则如图所示: 现给出两人的交锋记录,请统计双方的胜.平.负次数,并且给出双方分别出什么手势的胜算最大. 输入格式: 输入第 1 行给出正整数 ...

  8. HDU 2709 Sumsets 经典简单线性dp

    Sumsets Time Limit: 6000/2000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Total Sub ...

  9. 串口通信DMA中断

    这是以前学32的时候写的,那时候学了32之后感觉32真是太强大了,比51强的没影.关于dma网上有许多的资料,亲们搜搜,这里只贴代码了,其实我也想详详细细地叙述一番,但是自己本身打字就慢,还有好多事情 ...

  10. 八,ESP8266 文件保存数据(基于Lua脚本语言)

    https://www.cnblogs.com/yangfengwu/p/7533845.html 应该是LUA介绍8266的最后一篇,,,,,,下回是直接用SDK,,然后再列个12345...... ...