-1

I have two name spaces red and blue. Red is connected to host1, and blue is connected to host2, but these two hosts cannot ping each other. Here is the commands that I put:

ip link add host1 type veth peer name virt1
ip link add host2 type veth peer name virt2

ip netns add red
ip link set virt1 netns red

ip netns add blue
ip link set virt2 netns blue

ip netns exec red ip addr add 10.1.2.3/24 dev virt1
ip netns exec red ip link set virt1 up

ip netns exec blue ip addr add 10.1.2.5/24 dev virt2
ip netns exec blue ip link set virt2 up

ovs-vsctl add-br vsbr0 
ovs-vsctl add-port vsbr0 host1
ovs-vsctl add-port vsbr0 host2    

ovs-ofctl del-flows vsbr0
ovs-ofctl dump-flows vsbr0
ovs-ofctl add-flow vsbr0 action=normal

ip netns exec blue ping 10.1.2.3
ip netns exec red ping 10.1.2.5
secret
  • 99
  • 2

1 Answers1

0

Should turn hosts and bridge UP:

ip link set host1 up
ip link set host2 up
ip link set dev vsbr0 up
secret
  • 99
  • 2