查找 OPF 数据包,其中包含因空闲超时到期而删除流的指令

Finding OPF packet with instruction to remove flow due to idle timeout expiration

我正在使用带有 openvswitch-testcontroller 的单一拓扑,所以启动 mininet 的命令是:sudo mn --topo=single --controller=remote,127.0.0.1:6653

我跟踪了交换机和控制器之间的通信。从 h1 ping h2 后,对于 FLOW_MOD OPF 消息,我检测到 空闲超时设置为 60 秒

下一系列 ping 较晚(经过 60 秒后),由于不匹配,有 PACKET_IN 条来自交换机的消息 - 这意味着之前的流与模式匹配(从 h1 ping h2 ) 已删除。

但是我找不到指示交换机去流超时的包!为什么?

交换机在过期时间后删除流,不需要为此获取数据包。

来自Openflow official documentation:(5.5流量去除部分)

The switch flow expiry mechanism that is run by the switch independantly of the controller and is based on the state and configuration of flow entries. Each flow entry has an idle_timeout and a hard_timeout associated with it. If either value is non-zero, the switch must note the flow entry's arrival time, as it may need to evict the entry later. A non-zero hard_timeout field causes the flow entry to be removed after the given number of seconds, regardless of how many packets it has matched. A non-zero idle_timeout field causes the flow entry to be removed when it has matched no packets in the given number of seconds. The switch must implement flow expiry and remove flow entries from the flow table when one of their timeout is exceeded.