1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
| root@t1:~# ovs-ofctl dump-flows --protocols=OpenFlow13 ovsbr0
cookie=0x0, duration=5.551s, table=0, n_packets=0, n_bytes=0, priority=200,dl_src=6e:fd:e7:0f:f5:18 actions=drop
cookie=0x0, duration=35.665s, table=0, n_packets=0, n_bytes=0, priority=100,in_port="veth1_ovs",dl_dst=de:31:e9:31:98:6d actions=output:"veth2_ovs"
cookie=0x0, duration=35.645s, table=0, n_packets=0, n_bytes=0, priority=100,in_port="veth2_ovs",dl_dst=a2:d7:7d:02:be:bb actions=output:"veth1_ovs"
cookie=0x0, duration=35.625s, table=0, n_packets=2, n_bytes=84, priority=90,arp actions=FLOOD
cookie=0x0, duration=35.606s, table=0, n_packets=3, n_bytes=266, priority=0 actions=drop
root@t1:~# sudo ip netns exec host1 ping -c 3 192.168.1.20
PING 192.168.1.20 (192.168.1.20) 56(84) 字节的数据。
64 字节,来自 192.168.1.20: icmp_seq=1 ttl=64 时间=9.33 毫秒
64 字节,来自 192.168.1.20: icmp_seq=2 ttl=64 时间=0.175 毫秒
^C
--- 192.168.1.20 ping 统计 ---
已发送 2 个包, 已接收 2 个包, 0% packet loss, time 1002ms
rtt min/avg/max/mdev = 0.175/4.754/9.334/4.579 ms
root@t1:~#
root@t1:~# sudo ip netns exec host3 ping -c 3 192.168.1.10
PING 192.168.1.10 (192.168.1.10) 56(84) 字节的数据。
^C
--- 192.168.1.10 ping 统计 ---
已发送 2 个包, 已接收 0 个包, 100% packet loss, time 1050ms
# 修改后
root@t1:~# ovs-ofctl dump-flows --protocols=OpenFlow13 ovsbr0
cookie=0x0, duration=50.440s, table=0, n_packets=0, n_bytes=0, priority=200,dl_src=6e:fd:e7:0f:f5:18 actions=drop
cookie=0x0, duration=4.307s, table=0, n_packets=0, n_bytes=0, priority=150,in_port="veth1_ovs" actions=output:"veth3_ovs"
cookie=0x0, duration=80.534s, table=0, n_packets=0, n_bytes=0, priority=100,in_port="veth2_ovs",dl_dst=a2:d7:7d:02:be:bb actions=output:"veth1_ovs"
cookie=0x0, duration=80.514s, table=0, n_packets=2, n_bytes=84, priority=90,arp actions=FLOOD
cookie=0x0, duration=80.495s, table=0, n_packets=3, n_bytes=266, priority=0 actions=drop
root@t1:~# sudo ip netns exec host1 ping -c 3 192.168.1.20
PING 192.168.1.20 (192.168.1.20) 56(84) 字节的数据。
^C
--- 192.168.1.20 ping 统计 ---
已发送 3 个包, 已接收 0 个包, 100% packet loss, time 2047ms
root@t1:~#
root@t1:~# sudo ip netns exec host1 ping -c 3 192.168.1.30
PING 192.168.1.30 (192.168.1.30) 56(84) 字节的数据。
^C
--- 192.168.1.30 ping 统计 ---
已发送 3 个包, 已接收 0 个包, 100% packet loss, time 2079ms
|