在centos6上,使用openvswitch-2.4.0版本,通过ovs-ofctl 命令添加流表。重新启动主机后,流表恢复到初始值了。
如何将添加的流表,重新启动host后,不会被删除。
[root@localhost ~]# ovs-ofctl add-flow switch0 priority=1,idle_timeout=0,dl_type=0x800,nw_src=192.168.10.2,actions=drop
[root@localhost ~]#
[root@localhost ~]#
[root@localhost ~]# ovs-ofctl dump-flows switch0
NXST_FLOW reply (xid=0x4):
cookie=0x0, duration=1516.329s, table=0, n_packets=0, n_bytes=0, idle_age=1516, priority=0 actions=NORMAL
cookie=0x0, duration=43.387s, table=0, n_packets=0, n_bytes=0, idle_age=43, priority=1 actions=drop
cookie=0x0, duration=3.319s, table=0, n_packets=0, n_bytes=0, idle_age=3, priority=1,ip,nw_src=192.168.10.2 actions=drop
[root@localhost ~]#
|
|