当前位置: 首页 > SDN工具 > 正文

修改openvswitch中的已有配置

修改openvswitch中的已有配置

删除 OVS 的现有配置,使用 ovs-vsctl remove 指令:

# 设置端口的 vlan 标签为 100
# ovs-vsctl set port vnet0 tag=100
# 删除 wlan 标签,注意remove需要4个参数
# ovs-vsctl remove port vnet0 tag 100

有时需要将配置还原为初始值,ovs-vsctl remove 命令无法达到预期效果。则需要使用 ovs-vsctl set 指令。(例如:This is how you “remove” QoS rate-limiting, by the way: you set the QoS values back to 0.)

这与 Open vSwitch database schema 有关(http://openvswitch.org/ovs-vswitchd.conf.db.5.pdf).

If you look through the OVS database schema, you’ll find that some values (the document references them as “columns”) will be listed as “integers,” while others are listed as “optional integers.” For example, the tag column in the Port table (which is where VLAN tags are stored for an OVS port) is listed as an optional integer. The ingress_policing_rate column in the Interface table (where QoS rate-limiting is specified) is listed as an integer.

所以:

  • If column is classified as an optional integer, then you can use ovs-vsctl remove to remove the value.

  • If, on the other hand, a column is specified as an integer, then you have to set the value back to its original value (using ovs-vsctl set) to remove the value. You can’t use ovs-vsctl remove as it will generate an error.

参考:

本文固定链接: http://sdnhub.cn/index.php/openvswitch-modify/ | 软件定义网络SDN

该日志由 sdnhub 于2015年05月24日发表在 SDN工具 分类下, 通告目前不可用,你可以至底部留下评论。
原创文章转载请注明: 修改openvswitch中的已有配置 | 软件定义网络SDN
关键字:

修改openvswitch中的已有配置:等您坐沙发呢!

发表评论

*

快捷键:Ctrl+Enter