When using Mirantis Fuel Web to build up an OpenStack cloud, it requires 6 separate networks to be created. Simplest way to do this is by using virtual networks (VLANs), however this presents a few challenges because of the complexities of configuring VLANs.
This post is specific to Cisco switches, but may be relevant for other networking equipment as well.
For test purposes, this was all done on one switch and each bare metal server had one interface cabled to the switch. In production environments, it is likely that, at a minimum, a completely separate storage network would also exist, but more complicated networking schemes are quite possible.
For each port on the switch that will be connected to one of the bare metal servers, the following needs to be done:
switchport mode trunk switchport trunk allowed vlan 10,100-104 switchport trunk native vlan 10 spanning-tree portfast trunk switchport nonegotiate
Trunking mode must be used because each interface needs to be able to handle all 6 of the virtual networks. In the normal access mode, an interface can only communicate over a single VLAN.
For each interface, it's a good practice to specify which vlans it is allowed to handle.
Trunk native tells the switch that untagged traffic goes over this vlan. VLAN tags are the mechanism that allows a network interface to communicate over multiple discrete subnets. So in this case, only traffic going over vlans 100 through 104 will be tagged.
Spanning-tree portfast trunk tells the switch that this port is a trunk connected to a server or PC and to bypass the usual network loop checks.
Switchport nonegotiate forces the switch to treat this interface as a trunk because the connected device does not understand the protocol the switch uses to negotiate trunking vs access modes.
In the switch config the VLANs also need to be activated using:
For those who normally work with vlans in switchport access mode, the switch automatically does this, but apparently, when working with trunks, adding a vlan to a port does not automatically create and enable that vlan.
I am not a networking expert so some particulars here may have been missed, but I hope this is helpful.