分享

ovs在主机上,添加流表后,重新启动主机,流表恢复了

doscho 发表于 2017-3-28 14:44:26 [显示全部楼层] 回帖奖励 阅读模式 关闭右栏 2 10028
在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 ~]#




已有(2)人评论

跳转到指定楼层
einhep 发表于 2017-3-28 16:17:49
目前还没有发现好办法。
楼主可以将这些操作放到,系统启动shell中。让系统,启动自动执行添加
回复

使用道具 举报

doscho 发表于 2017-3-28 18:01:39
einhep 发表于 2017-3-28 16:17
目前还没有发现好办法。
楼主可以将这些操作放到,系统启动shell中。让系统,启动自动执行添加

谢谢,是的。找到一个帖子。http://blog.csdn.net/anzhuangguai/article/details/52670866


回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

关闭

推荐上一条 /2 下一条