Open vswitch separates the control and forwarding layers of traditional switches. Open vswitch only forwards data packets. The controller controls the forwarding topology of open vswitch as follows:
My machine has eth0, eth1, and eth2 Network Ports. eth0 is separated from eth1 and eth2, host1 is connected to eth1 through a network cable, host2 is connected to eth2 through a network cable, and br0 bridge is equivalent to an open vswitch, the automatically generated network port br0 is not currently used. host1 and host2 can ping each other, but cannot ping the IP address of eth0, open vswitch and controller Add a bridge named br0 through eth0 communication [email protected]: ~ # Ovs-vsctl add-Br br0 list all bridges [email protected]: ~ # Ovs-vsctl list-Br mount the network interfaces eth1 and eth2 to the bridge br0 [email protected]: ~ # Ovs-vsctl add-port br0 eth1 [email protected]: ~ # Ovs-vsctl add-port br0 eth2 all network interfaces mounted to br0 of the bridge [email protected]: ~ # Ovs-vsctl list-ports br0 if you need to delete the eth0 network interface on the bridge br0 [email protected]: ~ # Ovs-vsctl del-port br0 eth0 set the IP address of the independent eth0 Network Interface [email protected]: ~ # Ifconfig eth0 192.168.28.209/24 up set the connection between the vswitch and the Controller: [email protected] Ubuntu :~ # Ovs-controller TCP: 192.168.28.233: 6633-Detach view result [email protected]: ~ # Ovs-vsctl show131648b5-f7a6-4949-9a39-273ed62c0922Bridge "br0" controller "TCP: 192.168.28.233: 6633" is_connected: true port "br0" interface "br0" type: internal port "eth1" interface "eth1" Port "eth2" interface "eth2" Verification: [email protected]: ~ # Netstat-anput | grep 6633