Jump to: navigation, search

Difference between revisions of "Neutron/ML2/MechCiscoNexus"

< Neutron‎ | ML2
(Configuration)
Line 2: Line 2:
 
<!-- #format wiki -->
 
<!-- #format wiki -->
 
<!-- #language en -->
 
<!-- #language en -->
 
 
  
 
= Neutron ML2 Driver For Cisco Nexus Devices =
 
= Neutron ML2 Driver For Cisco Nexus Devices =
Line 10: Line 8:
 
== Overview ==
 
== Overview ==
  
The Cisco Nexus ML2 Mechanism Driver implements the ML2 Plugin Mechanism Driver API.
+
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.
This 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.
 +
 
 +
== Prerequisites ==
  
Note: The initial version of this driver supports only the VLAN network type on a single physical network.
+
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/.
  
== Prerequisites ==
 
  
The following NX-OS version and packages to enable Nexus switch support:
+
Get the ncclient library by using the ''pip'' package manager at your shell prompt:
  
* NX-OS 5.2.1 (Delhi) Build 69 or above.
 
* paramiko library - SSHv2 protocol library for python
 
* ncclient v0.3.1 - Python library for NETCONF clients
 
** You need a version of ncclient modified by Cisco Systems. To get it, from your shell prompt do:
 
 
 
<pre><nowiki>
 
<pre><nowiki>
git clone git@github.com:CiscoSystems/ncclient.git
+
pip install ncclient == 0.4.2
sudo python ./setup.py install
 
 
</nowiki></pre>
 
</nowiki></pre>
 
* For more information of ncclient, see: http://schmizz.net/ncclient/
 
* OS supported:
 
* RHEL 6.1 or above
 
* Ubuntu 11.10 or above
 
* Package: python-configobj-4.6.0-3.el6.noarch (or newer)
 
* Package: python-routes-1.12.3-2.el6.noarch (or newer)
 
* Package: pip install mysql-python
 
 
  
 
== Directory Structure ==
 
== Directory Structure ==
  
The Cisco Nexus mechanism driver code can be found here:
+
The Cisco Nexus mechanism driver code is located in the following directory:
  
 
<pre><nowiki>
 
<pre><nowiki>
/opt/stack/neutron/neutron/plugins/ml2/drivers/cisco/nexus
+
<neutron_install_dir>/neutron/neutron/plugins/ml2/drivers/cisco/nexus
 
</nowiki></pre>
 
</nowiki></pre>
  
The Cisco Nexus mechanism configuration file code is located at:
+
The Cisco Nexus mechanism configuration template is located at:
  
 
<pre><nowiki>
 
<pre><nowiki>
/opt/stack/neutron/etc/neutron/plugins/ml2/ml2_conf_cisco.ini
+
<neutron_install_dir>/neutron/etc/neutron/plugins/ml2/ml2_conf_cisco.ini
 
</nowiki></pre>
 
</nowiki></pre>
 +
 +
In both cases, <code>&lt;neutron_install_dir&gt;</code> is the directory where the Neutron project is installed. This is often the home directory of the username assigned to Neutron.
  
 
== Configuration ==
 
== Configuration ==
 +
===VLAN Configuration===
 +
To configure the Cisco Nexus ML2 mechanism driver, do the following:
 +
 +
Create a configuration file using the syntax template <code>neutron/etc/neutron/plugins/ml2/ml2_conf_cisco.ini</code>.
 +
 +
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
 +
  
Using the syntax template found here, etc/neutron/plugins/ml2/ml2_conf_cisco.ini, add the Nexus switch information to a configuration file included on the command line when the neutron-server is started. The format should include the IP address of the switch, a host that's connected to the switch and the port on the switch that host is connected to. Also, add the Nexus switch credential username and password. You can configure multiple switches as well as multiple hosts per switch as shown in the example below:
+
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.
  
 
<pre><nowiki>
 
<pre><nowiki>
Line 71: Line 78:
 
</nowiki></pre>
 
</nowiki></pre>
  
== Configuring Devstack for the Cisco Nexus Mechanism Driver ==
+
=== Virtual Port Channel (vPC) Configuration ===
 +
 
 +
The Cisco mechanism plugin supports multi-homes hosts in a vPC setup. A typical vPC setup is illustrated in the following diagram: [[File:Cisco-plugin-vpc.png|thumbnail|Multi Homed vPC hardware configuration]]
 +
 
 +
==== Prerequisites ====
 +
* The vPC interconnect must be set up as described in this document: [http://www.cisco.com/en/US/docs/switches/datacenter/nexus3000/sw/layer2/503_U2_1/b_Cisco_n3k_layer2_config_gd_503_U2_1_chapter_01000.html 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.
 +
 
 +
 
 +
==== Plugin Configuration ====
 +
Configure vPC in the plugin with multiple connections per host. For example, if host 1 is connected to two nexus switches 1.1.1.1 and 2.2.2.2 over portchannel2:
  
See the ML2 main page for general Devstack configuration - https://wiki.openstack.org/wiki/Neutron/ML2#ML2_Configuration
 
  
As described in the ML2 main page the devstack localrc variable Q_ML2_PLUGIN_MECHANISM_DRIVERS must be set to the mechanism drivers (MD) required.
 
For the Cisco Nexus MD the required drivers are:
 
 
<pre><nowiki>
 
<pre><nowiki>
Q_ML2_PLUGIN_MECHANISM_DRIVERS=openvswitch,cisco_nexus
+
[ml2_mech_cisco_nexus:1.1.1.1]
 +
# 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:2.2.2.2]
 +
# 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
 
</nowiki></pre>
 
</nowiki></pre>
  
In addition to the Cisco Nexus Mechanism Driver configuration the nexus switch configuration must also be accessible by adding the following to the devstack localrc file.
+
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 ==
 +
===VLAN Configuration===
 +
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:
 +
 
 +
<pre><nowiki>Q_ML2_PLUGIN_MECHANISM_DRIVERS=openvswitch,cisco_nexus</nowiki></pre>
 +
 
 +
Make the nexus switch configuration accessible by adding the following to the devstack <code>localrc</code> file:
 +
 
 
<pre><nowiki>
 
<pre><nowiki>
# Where CONF_PATH can be any valid directory path on the devstack system.
+
# CONF_PATH can be any valid directory path on the devstack system.
 
Q_PLUGIN_EXTRA_CONF_PATH=(/home/openstack)
 
Q_PLUGIN_EXTRA_CONF_PATH=(/home/openstack)
 
Q_PLUGIN_EXTRA_CONF_FILES=(ml2_conf_cisco.ini)
 
Q_PLUGIN_EXTRA_CONF_FILES=(ml2_conf_cisco.ini)
 
</nowiki></pre>
 
</nowiki></pre>
  
Then create the file /home/openstack/ml2_conf_cisco.ini and add the nexus switch information. Syntax is described in the "Configuration" section above.
+
Create the file <code>/home/openstack/ml2_conf_cisco.ini</code> and add the nexus switch information. The configuration file syntax is described in the [[#Configuration]] section above.

Revision as of 22:28, 16 October 2014


Neutron ML2 Driver For Cisco Nexus Devices


Overview

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.

Prerequisites

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

Directory Structure

The Cisco Nexus mechanism driver code is located in the following directory:

<neutron_install_dir>/neutron/neutron/plugins/ml2/drivers/cisco/nexus

The Cisco Nexus mechanism configuration template is located at:

<neutron_install_dir>/neutron/etc/neutron/plugins/ml2/ml2_conf_cisco.ini

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.

Configuration

VLAN Configuration

To configure the Cisco Nexus ML2 mechanism driver, do the following:

Create a configuration file using the syntax template neutron/etc/neutron/plugins/ml2/ml2_conf_cisco.ini.

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:1.1.1.1]
# 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) Configuration

The Cisco mechanism plugin supports multi-homes hosts in a vPC setup. A typical vPC setup is illustrated in the following diagram:
Multi Homed vPC hardware configuration

Prerequisites

  • 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.


Plugin Configuration

Configure vPC in the plugin with multiple connections per host. For example, if host 1 is connected to two nexus switches 1.1.1.1 and 2.2.2.2 over portchannel2:


[ml2_mech_cisco_nexus:1.1.1.1]
# 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:2.2.2.2]
# 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

VLAN Configuration

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:

Q_ML2_PLUGIN_MECHANISM_DRIVERS=openvswitch,cisco_nexus

Make the nexus switch configuration accessible by adding the following to the devstack localrc file:

# 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.