Advertisement
Guest User

VETH Doc Update for pbourke

a guest
Jun 1st, 2016
131
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.75 KB | None | 0 0
  1.  
  2.  
  3. Single Adapter, Bonded Adapter, and VLANs - Oh My!
  4. ==================================================
  5.  
  6. Kolla can happily use a VETH adapter for network configuration. This
  7. along with OpenVSwitch or Linux native tools can allow for some fairly
  8. creative networking setups. For instance, in my test setup I use a
  9. single adapter with VLANs for kolla. First, I setup my OVS network:
  10. root@c1n1:~# ovs-vsctl show
  11. 188f7b15-7e8d-4c40-a635-a247c2b43023
  12. Bridge "br1"
  13. Port mgmt
  14. tag: 50
  15. Interface mgmt
  16. type: internal
  17. Port "em1"
  18. tag: 51
  19. trunks: [50, 52, 60, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110]
  20. Interface "em1"
  21. Port "br1"
  22. Interface "br1"
  23. type: internal
  24. ovs_version: "2.5.0"
  25.  
  26. This is a pretty simple OVS setup, with a single NIC trunking vlans to 'br1'. Next I'm going to
  27. add a 'gen' ('general') VETH pair to be used for the Kolla 'api network'. This traffic will be carried
  28. over VLAN 101:
  29. ip link add genh type veth peer name gen
  30. ip addr add 192.168.101.11/24 dev gen
  31. ip link set gen up
  32. ip link set genh up
  33. ovs-vsctl add-port br1 genh
  34. ovs-vsctl set port genh tag=101
  35.  
  36. We created a pair of VETH devices (gen & genh), assigned an address/netmask to the 'interface' side, and added the 'host' (genh) side to the bridge. Finally, we tag the traggic on the 'host side' (OVS Port). This should give you:
  37. root@c1n1:~# ovs-vsctl show
  38. 188f7b15-7e8d-4c40-a635-a247c2b43023
  39. Bridge "br1"
  40. Port mgmt
  41. tag: 50
  42. Interface mgmt
  43. type: internal
  44. Port "em1"
  45. tag: 51
  46. trunks: [50, 52, 60, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110]
  47. Interface "em1"
  48. Port "br1"
  49. Interface "br1"
  50. type: internal
  51. Port genh
  52. tag: 101
  53. Interface genh
  54. ovs_version: "2.5.0"
  55.  
  56. You can now use the 'interface' side of the VETH pair ('gen') as the 'api' or 'internal' network for Kolla by adding the
  57. following to /etc/kolla/globals.yml:
  58. network_interface: "gen"
  59. kolla_internal_vip_address: "192.168.101.XX" # Chang to suite your setup
  60.  
  61. We can extend this to create an 'external' network as well:
  62. ip link add extrnlh type veth peer name extrnl
  63. ip addr add 192.168.60.11/24 dev extrnl
  64. ip link set extrnl up
  65. ip link set extrnlh up
  66. ovs-vsctl add-port br1 extrnlh
  67. ovs-vsctl set port extrnlh tag=60
  68.  
  69. Now you can use the 'extrnl' device and 192.168.60.0/24 as your 'external' network, with all traffic for it
  70. being carried over VLAN 60. (NOTE: of course, you DO need your switches setup for the VLANs you use!)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement