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

    Setting Up a Virtual Network to Assign IP Addresses to VMs That Contain VNFs

    Contrail Cloud Platform creates one virtual machine (VM) for each virtualized network function (VNF) used in the Cloud CPE Centralized Deployment Model. Contrail uses a management virtual network to assign IP addresses to the Ethernet management ports for these VMs. After you have created the virtual network in Contrail, you must add the management network to the POP you created in Cloud CPE Tenant, Site and Service Manager to enable access to the VNFs from the POP.

    Creating a Virtual Network in Contrail

    If you already created a management network in Contrail, you can use it for the Cloud CPE Centralized Deployment Model. In this case, turn on the Shared flag for the management network in Contrail.

    To create a virtual network in Contrail, refer to the Contrail documentation and complete the following actions.

    1. Create a virtual network.
    2. Assign the subnet and route target to the management virtual network.
    3. If you use this network to manage multiple projects, turn on the Shared flag for the network.

    Obtaining the List of Virtual Networks

    This procedure uses the following Cloud Contrail API: http://server-IP-address:8082/virtual-networks

    To obtain a list of virtual networks from Contrail:

    • Issue a REST call to the Contrail API.

      The API returns a list of virtual networks, specifying names and identifiers for each one.
      For example:

      ubuntu@vm1:~$ curl -X GET -H "x-auth-token:$OS_TOKEN" http://10.102.28.36:8082/
      virtual-networks
      {
          "virtual-networks": [
              {
                  "fq_name": [
                      "default-domain",
                      "admin",
                      "mgmt"
                  ],
                  "href": "http://10.102.28.36:8082/virtual-network/b2a91797-bcad-4d80-b871-beb89d430a4b",
                  "uuid": "b2a91797-bcad-4d80-b871-beb89d430a4b"
              },
      
              {
                  "fq_name": [
                      "default-domain",
                      "default-project",
                      "ip-fabric"
                  ],
                  "href": "http://10.102.28.36:8082/virtual-network/7d9000d7-971f-4b15-81a2-b93f23a86c6b",
                  "uuid": "7d9000d7-971f-4b15-81a2-b93f23a86c6b"
              }
          ]
      }
      

    Adding the Management Network to the POP in Cloud CPE Tenant, Site and Service Manager

    This procedure uses the following Cloud CPE Tenant, Site and Service Manager API: http://server-IP-address:9788/csas/pops

    Table 1 shows the fields that you must specify for this procedure.

    Table 1: Required Fields for Adding a Management Virtual Network to a POP

    Field

    Description

    Example

    property: name

    Name of the identifier of the management virtual network in Cloud CPE Tenant, Site and Service Manager.

    Best Practice: Use a name that includes the name of the management virtual network in Contrail.

    mgmt_net_id

    property: value

    Identifier of the management network obtained from Contrail

    b2a91797-bcad-4d80-b871-beb89d430a4b

    To add the management network to the POP:

    1. Create an input file.
      For example:
      ubuntu@vm1:~$cat csas_pop_prop.json
       
      {
          "pop": {
              "properties": {
                  "property": [
                      {
                          "name": "mgmt_net_id",
                          "value": "b2a91797-bcad-4d80-b871-beb89d430a4b"
                      }
                  ]
              }
          }
      }
      
    2. Issue a REST call to add the virtual network to the list of POPs in Cloud CPE Tenant, Site and Service Manager.

      The API returns the URL and identifier for the management virtual network In Cloud CPE Tenant, Site and Service Manager.
      For example:

      ubuntu@vm1:~$ curl -X PUT -D headers -H "content-type:application/json" -H "x-auth-token:$OS_TOKEN" http://10.102.56.39:9788/csas/pops/
      f8567ec7-34bd-4fd9-a170-9019b0be9d06 -d @csas_pop_prop.json
       
      {
          "pop": {
              "href": "http://10.102.56.39:9788/csas/pops/f8567ec7-34bd-4fd9-a170-9019b0be9d06",
              "uuid": "f8567ec7-34bd-4fd9-a170-9019b0be9d06"
          }
      }
      

    Modified: 2016-01-29