.. _Managing Virtual Networks: Managing Virtual Networks ------------------------- In the compute cluster, you can create and manage two types of virtual networks: **Private** VXLAN-based overlay virtual networks that can be used for intercommunication between VMs. Each private network is isolated from other private networks as well as public networks. **Public** Virtual networks that use IP address ranges of public physical networks. Such networks can be used to provide Internet access to VMs. Each public virtual network can use IP addresses of only one physical network. In |product_name|, virtual networking also includes virtual routers and floating public IP addresses. The next subsections explain the virtual network architecture and describe how to add, edit, and delete virtual networks as well as manage virtual routers and floating IP addresses. .. _Virtual Network Architecture: Virtual Network Architecture ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |product_name| supports distributed virtual switching on the basis of Open vSwitch. Open vSwitch runs on every compute node and forwards network traffic between virtual machines on the same node and between virtual machines and physical networks. Distributed virtual switching provides centralized management and monitoring of virtual network configuration across all nodes in a compute cluster. .. _Private Network Connectivity: Private Network Connectivity **************************** VXLAN technology used for private virtual networks allows creating logical L2 networks in L3 networks by encapsulating (tunneling) Ethernet frames over UDP packets. The physical representation of private network connectivity can be shown as follows: .. image:: /images/stor_image164.png :align: center :class: align-center On the figure above: - Three virtual machines are distributed across the compute cluster and connected to two private virtual networks via two virtual switches: ``VM1`` and ``VM2`` belong to one private virtual network, ``VM3`` belongs to the other one. - For each virtual network, the DHCP server runs on the management node. - The virtual router that runs on the management node connects the two private virtual networks and the public virtual network created on top of the physical one, thus enabling connectivity between the VMs from different private virtual networks. - The compute nodes are connected to the physical switch via the ``eth0`` network interfaces and reside in one L2 segment. - The ``eth0`` network interfaces are connected to the physical network with the ``VM private`` and ``VM public`` traffic types. - The physical router provides access to public networks, such as the Internet. Logically the private networking scheme can be represented as follows: .. image:: /images/stor_image163.png :align: center :class: align-center .. _Public Network Connectivity: Public Network Connectivity *************************** Public virtual networks are connected to physical networks on Layer 2. The physical representation of public network connectivity can be shown as follows: .. image:: /images/stor_image166.png :align: center :class: align-center On the figure above: - Five virtual machines are distributed across the compute cluster and connected to two public virtual networks via two physical switches: ``VM1`` and ``VM2`` belong to one public virtual network, while ``VM3``, ``VM4``, and ``VM5`` belong to the other one. - For each virtual network, the DHCP server runs on the management node. - The compute nodes are connected to one physical switch via the ``eth0`` network interfaces and to the other physical switch via ``eth1`` and reside in two separate L2 segments. - The ``eth0`` and ``eth1`` network interfaces are connected to the physical networks with the ``VM public`` traffic type. - The physical router interconnects two public virtual networks created on top of the physical ones and provides access to public networks, such as the Internet. Logically the public networking scheme can be represented as follows: .. image:: /images/stor_image165.png :align: center :class: align-center .. _Creating, Editing, and Deleting Virtual Networks: Creating, Editing, and Deleting Virtual Networks ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ To add a new virtual network, do the following: #. .. include:: /includes/managing-virtual-networks-part1_1.inc #. .. include:: /includes/managing-virtual-networks-part1_2.inc #. .. include:: /includes/managing-virtual-networks-part1_3.inc #. .. include:: /includes/managing-virtual-networks-part1_4.inc #. Provide network details depending on type: - For a private network, specify a name. If IP address management is enabled, specify network's IPv4 address range in **Subnet CIDR**. Optionally specify a gateway. |gateway_blank|. - For a public network, specify a name and choose a physical network with the **VM public** traffic type (that is not already used by a public network). If IP address management is enabled, optionally specify a gateway. |gateway_blank|. The **Subnet CIDR** field will be filled in automatically. Optionally, select the **Share between all projects** checkbox. With the disabled option, the public network will only be available in the **admin** project of the **Default** domain. Click **Next**. .. only:: ac .. image:: /images/stor_image82_1_ac.png :align: center :class: align-center .. only:: vz .. image:: /images/stor_image82_1_vz.png :align: center :class: align-center #. .. include:: /includes/managing-compute-clusters-part2.inc .. only:: ac .. image:: /images/stor_image82_2_ac.png :align: center :class: align-center .. only:: vz .. image:: /images/stor_image82_2_vz.png :align: center :class: align-center #. .. include:: /includes/managing-compute-clusters-part3.inc .. only:: ac .. image:: /images/stor_image82_3_ac.png :align: center :class: align-center .. only:: vz .. image:: /images/stor_image82_3_vz.png :align: center :class: align-center .. include:: /includes/managing-virtual-networks-part2.inc .. _Managing Virtual Routers: Managing Virtual Routers ~~~~~~~~~~~~~~~~~~~~~~~~ .. include:: /includes/managing-virtual-routers-part1.inc .. _Managing Router Interfaces: Managing Router Interfaces ************************** .. include:: /includes/managing-virtual-routers-part2.inc .. _Managing Static Routes: Managing Static Routes ********************** .. include:: /includes/managing-virtual-routers-part3.inc #. On the **STATIC ROUTES** tab of a virtual router, click **Add static route**. #. .. include:: /includes/managing-virtual-routers-part4_1.inc #. .. include:: /includes/managing-virtual-routers-part4_2.inc .. include:: /includes/managing-virtual-routers-part4_3.inc .. _Managing Floating IP Addresses: Managing Floating IP Addresses ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .. include:: /includes/managing-floating-ips.inc .. |create_cluster_or_network| replace:: **Add virtual network** .. |gateway_blank| replace:: If you leave the **Gateway** field blank, the gateway will be omitted from network settings .. |floating_ip_path| replace:: **COMPUTE** > **Networks** > **FLOATING IPS** tab .. |create_network_path_1| replace:: **COMPUTE** > **Networks** > **NETWORKS** tab .. |create_network_path_2| replace:: **NETWORKS** tab .. |virtual_router_path_1| replace:: **COMPUTE** > **Networks** > **NETWORKS** .. |virtual_router_path_2| replace:: **ROUTERS**