6. Finalizing Network Configuration

For the entire setup to work, routes need to be created between the MSP broker’s and client’s private networks. For this, the MSP broker’s router needs to have a port in the client’s network and client’s router needs to have a port in the broker’s network. In this guide’s example, the values are:

  • router: router-vdiprovider.lab
    • network: 192.168.100.0/24
    • port: 192.168.100.1
    • network: 192.168.200.0/24
    • port: 192.168.200.254
    • route: 192.168.200.0/24 via 192.168.100.254
  • router: router-abc.local
    • network: 192.168.200.0/24
    • port: 192.168.200.1
    • network: 192.168.100.0/24
    • port: 192.168.100.254
    • route: 192.168.100.0/24 via 192.168.200.254

If tenants are deployed in different Virtuozzo Hybrid Infrastructure domains and projects, only the Virtuozzo Hybrid Infrastructure administrator can create ports for their routers.

To set up the routers, do the following:

  1. Load Virtuozzo Hybrid Infrastructure administrator OpenStack credentials:

    # source /etc/kolla/admin-openrc.sh
    
  2. Find out the network IDs:

    # openstack --insecure network list --fit-width
    +--------------------------------------+---------------------+----------------+
    | ID                                   | Name                | Subnets        |
    +--------------------------------------+---------------------+----------------+
    | ef35a550-7c6e-4675-8653-cff10ee4a637 | abc.local-net       | 119b2d20-<...> |
    | 099e2b91-fd2e-4285-9183-f1c6ac8d54f6 | vdiprovider.lab-net | fc4be57a-<...> |
    +--------------------------------------+---------------------+----------------+
    
  3. Find out the router IDs:

    # openstack --insecure router list --fit-width
    +--------------------------------------+------------------------+--------+-------+
    | ID                                   | Name                   | Status | State |
    +--------------------------------------+------------------------+--------+-------+
    | 8558fe74-ebe0-43bc-a66f-9054561e7a77 | router-abc.local       | ACTIVE | UP    |
    | e11d6b76-4972-4cb0-a04b-9687f6e03542 | router-vdiprovider.lab | ACTIVE | UP    |
    +--------------------------------------+------------------------+--------+-------+
    
  4. Create the port 192.168.100.254 in vdiprovider.lab-net for router-abc.local:

    # openstack --insecure port create port-router-abc.local \
    --network 099e2b91-fd2e-4285-9183-f1c6ac8d54f6 --fixed-ip \
    subnet=fc4be57a-a288-46ea-95a5-25873b195b41,ip-address=192.168.100.254
    

    Then add it to the router:

    # openstack --insecure router add port router-abc.local port-router-abc.local
    
  5. Create the port 192.168.200.254 in abc.local-net for router-vdiprovider.lab-net:

    # openstack --insecure port create port-router-vdiprovider.lab-net \
    --network ef35a550-7c6e-4675-8653-cff10ee4a637 --fixed-ip \
    subnet=119b2d20-51b3-4574-a24f-c79d00fdcb85,ip-address=192.168.200.254
    

    Then add it to the router:

    # openstack --insecure router add port router-vdiprovider.lab \
    port-router-vdiprovider.lab-net
    
  6. Add a static route from vdiprovider.lab to 192.168.200.0/24:

    # openstack --insecure router set --route destination=192.168.200.0/24,\
    gateway=192.168.100.254 router-vdiprovider.lab
    

    And add a static route from abc.local-net to 192.168.100.0/24:

    # openstack --insecure router set --route destination=192.168.100.0/24,\
    gateway=192.168.200.254 router-abc.local