- 1 Neutron ML2 Driver For Cisco Nexus Devices
Neutron ML2 Driver For Cisco Nexus Devices
The Cisco Nexus ML2 mechanism driver implements the ML2 Plugin Mechanism Driver API. The Cisco Nexus ML2 mechanism driver manages multiple types of Cisco Nexus switches.
Note: This driver supports only the VLAN network type and only supports the Cisco Nexus 9000 switch.
Nexus switch support requires the following OS versions and packages:
- Cisco NX-OS 5.2.1 (Delhi) Build 69 or later.
- paramiko library, the SSHv2 protocol library for python
- One of two supported OSes:
- RHEL 6.1 or above
- Ubuntu 11.10 or above
- Package: python-configobj-4.6.0-3.el6.noarch (or later)
- Package: python-routes-1.12.3-2.el6.noarch (or later)
- Package: pip install mysql-python
- The ncclient v0.4.2 Python library for NETCONF clients. See the following for instructions on how to download the modified library. For more information on ncclient, see http://ncclient.grnet.gr/.
Get the ncclient library by using the pip package manager at your shell prompt:
pip install ncclient == 0.4.2
The Cisco Nexus mechanism driver code is located in the following directory:
The Cisco Nexus mechanism configuration template is located at:
In both cases,
<neutron_install_dir> is the directory where the Neutron project is installed. This is often the home directory of the username assigned to Neutron.
To configure the Cisco Nexus ML2 mechanism driver, do the following:
Create a configuration file using the syntax template
Add the Nexus switch information to a configuration file. Include the following information (see the example below):
- The IP address of the switch
- The hostname and port of the node that is connected to the switch
- The switch port that host is connected to
- The Nexus switch credential username and password
Include the configuration file on the command line when the neutron-server is started. You can configure multiple switches as well as multiple hosts per switch.
# Use section header 'ml2_mech_cisco_nexus:' followed by the IP address of the Nexus switch. [ml2_mech_cisco_nexus:18.104.22.168] # Hostname and port used on the switch for this compute host. # Where 1/2 indicates the "interface ethernet 1/2" port on the switch. compute-1=1/2 # Port number where the SSH will be running at the Nexus Switch. Default is 22 so this variable # only needs to be configured if different. # ssh_port=22 # Provide the Nexus log in information username=admin password=mySecretPasswordForNexus
Virtual Port Channel (vPC) ConfigurationThe Cisco mechanism plugin supports multi-homes hosts in a vPC setup. A typical vPC setup is illustrated in the following diagram:
- The vPC interconnect must be set up as described in this document: NXOS vPC configuration. The Cisco plugin will not set up vPC interconnect channels between switches.
- The data interfaces on the host must be bonded. This bonded interface must be attached to the external bridge.
Configure vPC in the plugin with multiple connections per host. For example, if host 1 is connected to two nexus switches 22.214.171.124 and 126.96.36.199 over portchannel2:
[ml2_mech_cisco_nexus:188.8.131.52] # Hostname and port used of the node host1=portchannel:2 # Port number where the SSH will be running at the Nexus Switch, e.g.: 22 (Default) ssh_port=22 # Provide the Nexus credentials, if you are using Nexus switches. If not this will be ignored. username=admin password=mySecretPasswordForNexus [ml2_mech_cisco_nexus:184.108.40.206] # Hostname and port used of the node host1=portchannel:2 # Port number where the SSH will be running at the Nexus Switch, e.g.: 22 (Default) ssh_port=22 # Provide the Nexus credentials, if you are using Nexus switches. If not this will be ignored. username=admin password=mySecretPasswordForNexus
Specify the etherytype (portchannel, etherchannel, etc.) for the vPC setup. Note: If you do not specify the ethertype, the plugin assumes an ethertype of Ethernet.
No configuration change is required for non-vPC configurations. Non-vpc setups are not affected by this feature.
Configuring Devstack for the Cisco Nexus Mechanism Driver
For general Devstack configuration, see the ML2 main page at https://wiki.openstack.org/wiki/Neutron/ML2#ML2_Configuration.
As described in the ML2 main page, set the devstack localrc variable Q_ML2_PLUGIN_MECHANISM_DRIVERS to the required mechanism drivers. For the Cisco Nexus MD the required drivers are:
Make the nexus switch configuration accessible by adding the following to the devstack
# CONF_PATH can be any valid directory path on the devstack system. Q_PLUGIN_EXTRA_CONF_PATH=(/home/openstack) Q_PLUGIN_EXTRA_CONF_FILES=(ml2_conf_cisco.ini)
Create the file
/home/openstack/ml2_conf_cisco.ini and add the nexus switch information. The configuration file syntax is described in the #Configuration section above.