Advertisement
Guest User

Untitled

a guest
Apr 21st, 2019
205
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.86 KB | None | 0 0
  1. ovs-ofctl add-flow <switch1> "arp,actions=flood"
  2. ovs-ofctl add-flow <switch1>
  3. "in_port=1,ip,nw_dst=172.16.2.1,actions=output:2"
  4. ovs-ofctl add-flow <switch1>
  5. "in_port=2,ip,nw_dst=172.16.1.1,actions=output:1"
  6.  
  7. ovs-ofctl add-flow <switch2> "arp, actions=flood"
  8. ovs-ofctl add-flow <switch2>
  9. "in_port=2,ip,nw_dst=172.16.2.1,actions=output:1"
  10. ovs-ofctl add-flow <switch2>
  11. "in_port=1,ip,nw_dst=172.16.1.1,actions=output:2"
  12.  
  13. Assuming the switches use port 1 towards the containers, and port 2 to
  14. connect to each other.
  15.  
  16. Then, ARP will work easily, and your hosts will know the MAC address of
  17. each of them.
  18. Pinging will also work according to the IP addresses!
  19.  
  20. Again, in case they are in different IP range, then other rules are
  21. necessary, but I recommend to play first within Layer 2, then migrate
  22. your use case to Layer 3 - as it is a little bit more complicated.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement