首页 > 代码库 > OVN L2 gateway实验

OVN L2 gateway实验

ovsdb-tool create /usr/local/etc/openvswitch/ovs.db /usr/local/share/openvswitch/vswitch.ovsschema
ovsdb-tool create /usr/local/etc/openvswitch/vtep.db /usr/local/share/openvswitch/vtep.ovsschema

ovsdb-server --pidfile --detach --log-file --remote punix:/usr/local/var/run/openvswitch/db.sock \
--remote=db:hardware_vtep,Global,managers \
/usr/local/etc/openvswitch/ovs.db /usr/local/etc/openvswitch/vtep.db

ovs-vswitchd --log-file --detach --pidfile unix:/usr/local/var/run/openvswitch/db.sock

ovs-vsctl add-br vtep_bfd
ovs-vsctl add-port vtep_bfd p0

vtep-ctl add-ps br0
vtep-ctl set Physical_Switch br0 tunnel_ips=192.168.80.136

/usr/local/share/openvswitch/scripts/ovs-vtep --detach br0

 

ovn-nbctl lsp-add inside pp-00
ovn-nbctl lsp-set-addresses pp-00 unknown
ovn-nbctl lsp-set-type pp-00 vtep
ovn-nbctl lsp-set-options pp-00 vtep-logical-switch=ls0 vtep-physical-switch=br0

 

参考文档:

        http://openvswitch.org/support/dist-docs/vtep/README.ovs-vtep.rst.html

        http://blog.spinhirne.com/2016/09/a-primer-on-ovn.html

        http://openvswitch.org/support/dist-docs/vtep-ctl.8.txt

OVN L2 gateway实验