0x01 实验背景
两台虚拟机:
- mininet虚拟机(10.108.43.23)
- onos虚拟机(10.108.43.136)
mininet实验拓扑:
- h1: IP=10.0.0.1 MAC=46:04:9a:e2:10:55
- h2: IP=10.0.0.2 MAC=2e:02:18:92:01:aa
- h3: IP=10.0.0.3 MAC=8e:35:18:7a:f0:f0
- s3: IP=10.108.43.23
- s4: IP=10.108.43.23
- c0: IP=10.108.43.136
0x02 实验操作
在mininet控制台:
h1 ping h2
0x03 抓包分析
3.1 ARP请求
h1( IP=10.0.0.1 MAC=46:04:9a:e2:10:55 )不知道h2 (IP=10.0.0.2 MAC=2e:02:18:92:01:aa)的IP对应的MAC地址,h1发出ARP请求。
ARP请求到达s3,流表table-miss,产生packet-in和packet-out消息。
圈2,packet_in消息:
圈3,packet_out消息:
ARP请求到达s4,流表table-miss,产生packet-in和packet-out消息。
圈5,packet-in消息:
圈6,packet-out消息:
3.2 ARP响应
h2(IP=10.0.0.2 MAC=2e:02:18:92:01:aa)收到ARP请求产生ARP响应。
ARP响应到达s4,流表table-miss,产生packet_in和packet_out消息。
packet_in消息:
packet_out消息:
ARP响应经过s4后,又到达s3,流表table-miss,产生packet_in和packet_out消息。
packet_in消息:
packet_out消息:
3.3 h1向h2发ICMP包
Ping命令会构建一个固定格式的ICMP请求数据包。
packet_in消息:
packet_out消息:
packet_in消息:
packet_out消息:
3.4 h2向h1发ICMP包
h2响应ICMP数据包。
packet_in消息:
packet_out消息:
packet_in消息:
packet_out消息:
0x04 结论分析
流表项超时的时间太短,ARP响应过程产生的流表项在ICMP响应数据包到达时已经失效,导致又产生packet_in和packet_out消息。
转载请注明出处