Chinaunix首页 | 论坛 | 博客
  • 博客访问: 879309
  • 博文数量: 655
  • 博客积分: 0
  • 博客等级: 民兵
  • 技术积分: 4281
  • 用 户 组: 普通用户
  • 注册时间: 2016-11-11 09:12
个人简介

To be a better coder

文章分类

全部博文(655)

文章存档

2019年(211)

2018年(217)

2017年(146)

2016年(82)

分类: LINUX

2019-09-11 16:14:26

https://wiki.onosproject.org/display/ONOS/Flow+Rules


onos> flows
deviceId=of:0000000000000001, flowRuleCount=1 id=30000b889cb32, state=ADDED, bytes=8722, packets=89, duration=89, priority=10, appId=org.onlab.onos.fwd
      selector=[ETH_TYPE{ethType=800}, ETH_SRC{mac=00:00:00:00:00:01}, ETH_DST{mac=00:00:00:00:00:13}, IN_PORT{port=2}] treatment=[OUTPUT{port=5}] deviceId=of:0000000000000002, flowRuleCount=1 id=30000b889cf4d, state=ADDED, bytes=8624, packets=88, duration=88, priority=10, appId=org.onlab.onos.fwd
      selector=[ETH_TYPE{ethType=800}, ETH_SRC{mac=00:00:00:00:00:13}, ETH_DST{mac=00:00:00:00:00:01}, IN_PORT{port=5}] treatment=[OUTPUT{port=2}] deviceId=of:000000000000000b, flowRuleCount=2 id=30000b88a8321, state=ADDED, bytes=8722, packets=89, duration=89, priority=10, appId=org.onlab.onos.fwd
      selector=[ETH_TYPE{ethType=800}, ETH_SRC{mac=00:00:00:00:00:13}, ETH_DST{mac=00:00:00:00:00:01}, IN_PORT{port=2}] treatment=[OUTPUT{port=3}] id=30000b88a833e, state=ADDED, bytes=8722, packets=89, duration=89, priority=10, appId=org.onlab.onos.fwd
      selector=[ETH_TYPE{ethType=800}, ETH_SRC{mac=00:00:00:00:00:01}, ETH_DST{mac=00:00:00:00:00:13}, IN_PORT{port=3}] treatment=[OUTPUT{port=1}] deviceId=of:000000000000000c, flowRuleCount=0 deviceId=of:000000000000000d, flowRuleCount=0 deviceId=of:000000000000000e, flowRuleCount=2 id=30000b88a8e45, state=ADDED, bytes=8722, packets=89, duration=89, priority=10, appId=org.onlab.onos.fwd
      selector=[ETH_TYPE{ethType=800}, ETH_SRC{mac=00:00:00:00:00:01}, ETH_DST{mac=00:00:00:00:00:13}, IN_PORT{port=1}] treatment=[OUTPUT{port=3}] id=30000b88a8e82, state=ADDED, bytes=8722, packets=89, duration=89, priority=10, appId=org.onlab.onos.fwd
      selector=[ETH_TYPE{ethType=800}, ETH_SRC{mac=00:00:00:00:00:13}, ETH_DST{mac=00:00:00:00:00:01}, IN_PORT{port=3}] treatment=[OUTPUT{port=2}] 

从上面的输出中可以看出,ONOS提供了很多交换机上流表的详细信息。例如:每一条流表项定义一个“selector”和一个“treatment”,他们被流表项进行流量匹配,和匹配的流量如何被处理。每一个流表项被appId标记,指出此流表项被那个应用程序安装,这是非常有用的特性,因为它能帮助管理员区分那个应用程序行为不当或耗费较多的资源。

4.5 apps命令



{
  "priority": 40000,
  "timeout": 0,
  "isPermanent": true,
  "deviceId": "of:0000000000000001",
  "treatment": {
    "instructions": [
      {
        "type": "OUTPUT",
        "port": "CONTROLLER"
      }
    ]
  },
  "selector": {
    "criteria": [
      {
        "type": "ETH_TYPE",
        "ethType": "0x88cc"
      },
      {
        "type": "ETH_DST",
        "mac": "00:00:11:00:00:01"
      },
      {
        "type": "ETH_SRC",
        "mac": "00:00:11:00:00:01"
      },
      {
        "type": "IN_PORT",
        "port": "1"
      },
      {
        "type": "IN_PHY_PORT",
        "port": "1"
      },
      {
        "type": "METADATA",
        "metadata": "0x1000"
      },
      {
        "type": "VLAN_VID",
        "vlanId": "1"
      },
      {
        "type": "VLAN_PCP",
        "priority": "1"
      },
      {
        "type": "INNER_VLAN_VID",
        "innerVlanId": "1"
      },
      {
        "type": "INNER_VLAN_PCP",
        "innerPriority": "1"
      },
      {
        "type": "IP_DSCP",
        "ipDscp": 1
      },
      {
        "type": "IP_ECN",
        "ipEcn": 1
      },
      {
        "type": "IP_PROTO",
        "protocol": 1
      },
      {
        "type": "IPV4_SRC",
        "ip": "10.1.1.0/24"
      },
      {
        "type": "IPV4_DST",
        "ip": "10.1.1.0/24"
      },
      {
        "type": "TCP_SRC",
        "tcpPort": 1
      },
      {
        "type": "TCP_DST",
        "tcpPort": 1
      },
      {
        "type": "UDP_SRC",
        "udpPort": 1
      },
      {
        "type": "UDP_DST",
        "udpPort": 1
      },
      {
        "type": "SCTP_SRC",
        "sctpPort": 1
      },
      {
        "type": "SCTP_DST",
        "sctpPort": 1
      },
      {
        "type": "ICMPV4_TYPE",
        "icmpType": "1"
      },
      {
        "type": "ICMPV4_CODE",
        "icmpCode": 1
      },
      {
        "type": "IPV6_SRC",
        "ip": "1111::2222/64"
      },
      {
        "type": "IPV6_DST",
        "ip": "1111::2222/64"
      },
      {
        "type": "IPV6_FLABEL",
        "flowlabel": 1
      },
      {
        "type": "ICMPV6_TYPE",
        "icmpv6Type": 1
      },
      {
        "type": "ICMPV6_CODE",
        "icmpv6Code": 1
      },
      {
        "type": "IPV6_ND_TARGET",
        "targetAddress": "1111::2222"
      },
      {
        "type": "IPV6_ND_SLL",
        "mac": "00:00:11:00:00:01"
      },
      {
        "type": "IPV6_ND_TLL",
        "mac": "00:00:11:00:00:01"
      },
      {
        "type": "MPLS_LABEL",
        "label": 1
      },
      {
        "type": "IPV6_EXTHDR",
        "exthdrFlags": 1
      },
      {
        "type": "OCH_SIGID",
        "lambda": 1
      },
      {
        "type": "GRID_TYPE",
        "gridType": DWDM
      },
      {
        "type": "CHANNEL_SPACING",
        "channelSpacing": 100
      },
      {
        "type": "SPACING_MULIPLIER",
        "spacingMultiplier": 4
      },
      {
        "type": "SLOT_GRANULARITY",
        "slotGranularity": 8
      },
      {
        "type": "OCH_SIGID",
        "ochSignalId": 1
      },
      {
        "type": "TUNNEL_ID",
        "tunnelId": 5
      },
      {
        "type": "OCH_SIGTYPE",
        "ochSignalType": 1
      },
      {
        "type": "ODU_SIGID",
        "oduSignalId": 1
        "tributaryPortNumber": 11
        "tributarySlotBitmap": bitmap
        "type": "ETH_TYPE",
        "tributarySlotLen": 1
      },
      {
        "type": "ODU_SIGTYPE",
        "oduSignalType": 4
      },
    ]
  }
}
阅读(79) | 评论(0) | 转发(0) |
0

上一篇:时间复杂度

下一篇:onos学习link

给主人留下些什么吧!~~
评论热议
请登录后评论。

登录 注册