Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Single Adapter, Bonded Adapter, and VLANs - Oh My!
- ==================================================
- Kolla can happily use a VETH adapter for network configuration. This
- along with OpenVSwitch or Linux native tools can allow for some fairly
- creative networking setups. For instance, in my test setup I use a
- single adapter with VLANs for kolla. First, I setup my OVS network:
- root@c1n1:~# ovs-vsctl show
- 188f7b15-7e8d-4c40-a635-a247c2b43023
- Bridge "br1"
- Port mgmt
- tag: 50
- Interface mgmt
- type: internal
- Port "em1"
- tag: 51
- trunks: [50, 52, 60, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110]
- Interface "em1"
- Port "br1"
- Interface "br1"
- type: internal
- ovs_version: "2.5.0"
- This is a pretty simple OVS setup, with a single NIC trunking vlans to 'br1'. Next I'm going to
- add a 'gen' ('general') VETH pair to be used for the Kolla 'api network'. This traffic will be carried
- over VLAN 101:
- ip link add genh type veth peer name gen
- ip addr add 192.168.101.11/24 dev gen
- ip link set gen up
- ip link set genh up
- ovs-vsctl add-port br1 genh
- ovs-vsctl set port genh tag=101
- 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:
- root@c1n1:~# ovs-vsctl show
- 188f7b15-7e8d-4c40-a635-a247c2b43023
- Bridge "br1"
- Port mgmt
- tag: 50
- Interface mgmt
- type: internal
- Port "em1"
- tag: 51
- trunks: [50, 52, 60, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110]
- Interface "em1"
- Port "br1"
- Interface "br1"
- type: internal
- Port genh
- tag: 101
- Interface genh
- ovs_version: "2.5.0"
- You can now use the 'interface' side of the VETH pair ('gen') as the 'api' or 'internal' network for Kolla by adding the
- following to /etc/kolla/globals.yml:
- network_interface: "gen"
- kolla_internal_vip_address: "192.168.101.XX" # Chang to suite your setup
- We can extend this to create an 'external' network as well:
- ip link add extrnlh type veth peer name extrnl
- ip addr add 192.168.60.11/24 dev extrnl
- ip link set extrnl up
- ip link set extrnlh up
- ovs-vsctl add-port br1 extrnlh
- ovs-vsctl set port extrnlh tag=60
- Now you can use the 'extrnl' device and 192.168.60.0/24 as your 'external' network, with all traffic for it
- 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