启动ovn 控制节点: # start ovsdb-server /usr/share/openvswitch/scripts/ovs-ctl start --system-id=random # start ovn northd /usr/share/openvswitch/scripts/ovn-ctl start_northd export CENTRAL_IP=10.140.0.2 export LOCAL_IP=10.140.0.2 export ENCAP_TYPE=vxlan ovs-vsctl set Open_vSwitch . external_ids:ovn-remote="tcp:$CENTRAL_IP:6642" external_ids:ovn-nb="tcp:$CENTRAL_IP:6641" external_ids:ovn-encap-ip=$LOCAL_IP external_ids:ovn-encap-type="$ENCAP_TYPE" 计算节点: # start ovsdb-server /usr/share/openvswitch/scripts/ovs-ctl start --system-id=random # start ovn-controller and vtep /usr/share/openvswitch/scripts/ovn-ctl start_controller /usr/share/openvswitch/scripts/ovn-ctl start_controller_vtep export CENTRAL_IP=10.140.0.2 export LOCAL_IP=10.140.0.2 export ENCAP_TYPE=vxlan ovs-vsctl set Open_vSwitch . external_ids:ovn-remote="tcp:$CENTRAL_IP:6642" external_ids:ovn-nb="tcp:$CENTRAL_IP:6641" external_ids:ovn-encap-ip=$LOCAL_IP external_ids:ovn-encap-type="$ENCAP_TYPE" 对于ovs 1.7,还需要设置 ovn-nbctl set-connection ptcp:6641 ovn-sbctl set-connection ptcp:6642