我将OpenDayLight用作OpenFlow控制器,我有2台主机连接到启用了OpenFlow的路由器(wr1043ndv4),该控制器可以正常工作以查看拓扑清单,但是当我想尝试从一台主机ping到另一个我不能。我已经按照ICMPv4指南进行了操作
根据此处的某些帖子,目标地址的子网掩码必须为/ 32,因此我将流放在了流表中,但主机之间无法ping通,甚至尝试建立子网主机上的掩码设置为/ 32,以匹配我在流程中输入的内容,但仍然无法正常工作。
这是我从指南站点更改的xml代码:
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<flow xmlns="urn:opendaylight:flow:inventory">
<strict>false</strict>
<instructions>
<instruction>
<order>0</order>
<apply-actions>
<action>
<order>0</order>
<dec-nw-ttl/>
</action>
</apply-actions>
</instruction>
</instructions>
<table_id>235</table_id>
<id>100</id>
<cookie_mask>255</cookie_mask>
<match>
<ethernet-match>
<ethernet-type>
<type>2048</type>
</ethernet-type>
<ethernet-destination>
<address>e8:06:88:xx:xx:xx</address>
</ethernet-destination>
<ethernet-source>
<address>e8:06:88:xx:xx:xx</address>
</ethernet-source>
</ethernet-match>
<ipv4-source>192.168.1.100/32</ipv4-source>
<ipv4-destination>192.168.5.100/32</ipv4-destination>
<ip-match>
<ip-protocol>1</ip-protocol>
<ip-dscp>27</ip-dscp>
<ip-ecn>3</ip-ecn>
</ip-match>
<icmpv4-match>
<icmpv4-type>6</icmpv4-type>
<icmpv4-code>3</icmpv4-code>
</icmpv4-match>
<in-port>3</in-port>
</match>
<hard-timeout>1200</hard-timeout>
<cookie>11</cookie>
<idle-timeout>3400</idle-timeout>
<flow-name>flowicmp1</flow-name>
<priority>2</priority>
</flow>
,这是流表上显示的结果:
{
"flow-node-inventory:table": [
{
"id": 235,
"opendaylight-flow-table-statistics:flow-table-statistics": {
"active-flows": 3,
"packets-looked-up": 0,
"packets-matched": 0
},
"flow": [
{
"id": "100",
"priority": 2,
"opendaylight-flow-statistics:flow-statistics": {
"packet-count": 0,
"byte-count": 0,
"duration": {
"nanosecond": 589000000,
"second": 12
}
},
"table_id": 235,
"cookie_mask": 0,
"hard-timeout": 1200,
"match": {
"ethernet-match": {
"ethernet-source": {
"address": "e8:06:88:xx:xx:xx"
},
"ethernet-type": {
"type": 2048
},
"ethernet-destination": {
"address": "e8:06:88:xx:xx:xx"
}
},
"icmpv4-match": {
"icmpv4-code": 3,
"icmpv4-type": 6
},
"ip-match": {
"ip-dscp": 27,
"ip-protocol": 1,
"ip-ecn": 3
},
"ipv4-destination": "192.168.5.100/32",
"ipv4-source": "192.168.1.100/32",
"in-port": "3"
},
"cookie": 11,
"flags": "",
"instructions": {
"instruction": [
{
"order": 0,
"apply-actions": {
"action": [
{
"order": 0,
"dec-nw-ttl": {}
}
]
}
}
]
},
"idle-timeout": 3400
},
我做错了什么?我希望主机在进行流量推送后能够相互ping通。
答案 0 :(得分:0)
您的流程动作似乎只是减少ttl。你想要 要转发出另一个端口的动作?
也是,您为流表提供的输出来自配置 数据存储还是可操作的?如果您添加流(例如通过REST),它将结束 在配置数据存储区中。但是,如果流程从未编程过 在openflow交换机上,它将不会最终出现在操作数据存储区中。的 运营数据存储区反映了网络的实际状态,而 config数据存储区反映了“所需”状态。