Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

Navigation
Guide That Contains This Content
[+] Expand All
[-] Collapse All

    Juniper Networks DMI Plug-In for OpenStack Neutron

    Plug-In Overview

    The Juniper Networks plug-in for OpenStack Neutron enables you to use the DMI/NETCONF interfaces on Juniper Networks switches to orchestrate virtual networks. The plug-in uses Open vSwitch (OVS) as the virtual switch.

    OpenStack release supported: Grizzly

    To orchestrate virtual networks, the plug-in requires you to specify the Juniper Networks switch port to node (compute and Neutron server) NIC mapping information or use LLDP. See Configuring Nodes for information about specifying this mapping information.

    The plug-in supports the following Juniper Networks switching platforms running Junos OS Release 11.4R1.6 or later. For more information about these platforms, see http://www.juniper.net/us/en/products-services/switching/.

    • All EX Series switches
    • QFX3500 and QFX3600 standalone switches
    • QFX3000-G QFabric system
    • QFX3000-M QFabric system

    Plug-In Directory Structure

    The directory structure for the plug-in is described below:

    Directory

    Description

    quantum/plugins/juniper/dmi/

    Main plug-in directory

    quantum/plugins/juniper/dmi/bin

    Contains CLI commands for the plug-in

    quantum/plugins/juniper/dmi/cli

    Contains the code for binaries

    Pre-requisites for Using the Plug-In

    Before you use the plug-in:

    1. Install and configure OpenStack Neutron with the Open vSwitch (OVS) plug-in.
    2. Install the following on the Neutron server:
      • ncclient Python library for NETCONF clients (see https://github.com/leopoul/ncclient/)
      • novaclient Python client for the OpenStack Nova API
      • lldpd must be installed and running on all the nodes if the plugin is used with lldp (see "USE_LLDP" option in "[DEVICE]")
    3. Configure the same login name and password on all the Juniper Networks switches you want to use with the plug-in.

      This is a requirement for the plug-in settings in the [DEVICE] section of the ovs_quantum_plugin.ini file. For more information, see Configuring the Plug-In on the Neutron Server.

    4. Ensure that all nodes in the openstack cluster have DNS resolvable names.

    Installing the Plug-In

    To install the plug-in:

    1. Download the tar.gz file for the plug-in to a directory.
    2. Extract the tar.gz file.

      For example:

      tar zxvf neutron-juniper-dmi-plugin-version.tar.gz

      A neutron-juniper-dmi-plugin-version directory is created in your current working directory.

    3. Copy the contents of the neutron-juniper-dmi-plugin-version directory to the neutron plugins directory.

      The neutron plugins directory is usually /usr/lib/python2.7/dist-packages/quantum/plugins.

      cp -rp neutron-juniper-dmi-plugin-version/quantum/plugins/juniper neutron-plugins-directory

    Configuring the Plug-In on the Neutron Server

    To configure the plug-in on the Neutron Server:

    1. Make a backup copy of the /etc/quantum/quantum.conf file.
    2. Edit the quantum.conf file to specify the Juniper Networks OpenStack Neutron plug-in in the core_plugin section.

      core_plugin = quantum.plugins.juniper.dmi.dmi_plugin.JuniperDmi

    3. Make a backup copy of the /etc/quantum/plugins/openvswitch/ovs_quantum_plugin.ini file.
    4. Specify the following settings in the ovs_quantum_plugin.ini file.
      • In the [DATABASE] section, replace <mysql-host> with the actual MySQL hostname for your setup.
      • In this example, physnet1 is used as the bridge_mappings alias name in the [OVS] section. You can specify any other alias name instead. However, ensure that the same alias name is specified for other settings in the ovs_quantum_plugin.ini file and for specifying port mapping information using the jnpr_switchport_mapping command.
          [DATABASE]
          sql_connection = mysql://root:password@<mysql_host>/ovs_quantum?charset=utf8
          reconnect_interval = 2
      
          [OVS]
          tenant_network_type = vlan
          network_vlan_ranges = physnet1:1000:2999
          bridge_mappings = physnet1:br-eth1
      
          [AGENT]
          polling_interval = 2
          root_helper = sudo /usr/local/bin/quantum-rootwrap /etc/quantum/rootwrap.conf
      
          
    5. Create the file /etc/quantum/plugins/juniper/juniper.ini with the following settings:
      [DEVICE]
      PORT = 22
      TIMEOUT = 600
      LOGIN = root
      PASSWORD = password
      VLAN_DESCRIPTION = "openstack network created by juniper plugin"
      USE_LLDP = False
      # List of switches is used only when USE_LLDP is True
      # E.g. SWITCHES =  switch1,switch2
      SWITCHES =
      # Maps bridge alias to nic
      # E.g. NIC_MAPPINGS = physnet1:eth1
      NIC_MAPPINGS =
      
    6. Update "/etc/default/quantum-server" with the following settings:
      VSWITCH_CONFIG="/etc/quantum/plugins/openvswitch/ovs_quantum_plugin.ini"
      PSWITCH_CONFIG="/etc/quantum/plugins/juniper/juniper.ini"
      
    7. Update the [SCRIPT] section in "/etc/init/quantum-server.conf" file with the following settings:
      script
                  [ -r /etc/default/quantum-server ] && . /etc/default/quantum-server
                  [ -r "$PSWITCH_CONFIG" ] && [ -r "$VSWITCH_CONFIG" ] && CONF_ARG="--config-file $PSWITCH_CONFIG --config-file 
      $VSWITCH_CONFIG" exec start-stop-daemon --start --chuid quantum --exec /usr/bin/quantum-server -- \ --config-file /etc/quantum/quantum.conf \ --log-file /var/log/quantum/server.log $CONF_ARG end script

    Configuring Nodes

    Juniper plugin can work with host to switch port mapping from LLDP or with static switch port mapping.

    Ensure that the Open vSwitch (OVS) agent is configured on every node.

    1. To configure the nodes using LLDP-based configuration, install and start lldpd on all compute and network nodes:
      apt-get install lldpd
    2. To configure the nodes using static port mapping based configuration of the plugin, log in into the Neutron server and enter the jnpr_switchport_mapping command to specify the Juniper Networks switch port to node (compute and Neutron server) NIC mapping information.

      The port mapping information can be specified one at a time or read from a comma separated value (CSV) file.

      • To specify port mapping information one at a time, issue the following command:

        quantum/plugins/juniper/dmi/bin/jnpr_switchport_mapping add -H host-name -n network-name -s switch-name -p switch-port-name

        For example:

        quantum/plugins/juniper/dmi/bin/jnpr_switchport_mapping add -H compute-node47 -n physnet1 -s qfx3500-a -p ge-0/0/34

        Where:

        -H

        Specifies the DNS name of the host that is connected to the switch

        -n

        Specifies the name of the physical network on the host

        -s

        Specifies the DNS name of the switch to which the physical network on the host is connected

        -p

        Specifies the switch port name to which the physical network on the host is connected

      • To read port mapping information from a comma separated value (CSV) file:
        1. Enter the port mapping information using the following syntax in a file:

          host-name,net-name,switch-name,switch-port-name

          For example:

          compute-node47,physnet1,qfx3500-a,ge-0/0/34

          compute-node48,physnet1,qfx3500-a,ge-0/0/30

        2. Enter the following command to read the port mapping information in the CSV file.

          quantum/plugins/juniper/dmi/bin/jnpr_switchport_mapping update -f map-file-name.csv

          Where map-file-name.csv is the path to the CSV file in which the port mapping information exists.

      For more information about the jnpr_switchport_mapping command, enter the jnpr_switchport_mapping -h command.

    3. After you complete the above steps, restart the Neutron server and the Neutron agent for Open vSwitch.

    Configuring Juniper Networks Switches for the Plug-In

    To use Juniper Networks switches with the plug-in, you must configure the NETCONF management protocol on the switches.

    To configure the NETCONF management protocol on a switch:

    1. Configure SSH and NETCONF on the switch.
      [edit]user@host# set system services sshuser@host# set system services netconf ssh
    2. Review your configuration and enter the commit command.
      [edit]user@host# commitcommit complete
    3. To use LLDP for topology discovery:
      [edit]user@host# set protocols lldp interface all
    4. Ensure that Ethernet switching has been set for all interfaces connected to the openstack cluster. To enable Ethernet switching on an interface:
      [edit]user@host# set interface interface-name unit 0 family ethernet switching
    5. Review your configuration and enter the commit command.
      [edit]user@switch# commit

    LLDP neighbourhood information takes some time to populate. To check the LLDP database on the switch:

    cli> show lldp neighbour

    Additional Information

    For more information about the plug-in, write to quantum-plugin-support@juniper.net.

    Published: 2013-07-19