First of all, it is necessary to configure network connections on the virtualization server, which will later be used to access virtual machines to the Internet, exchange data with each other, and, if necessary, distribute networks by VLAN. To do this, you can use the functions implemented in the Linux kernel or install Open vSwitch. The Proxmox VE control panel has a simple and intuitive network management interface.
Thus, the server on Proxmox VE can be used as the core of the virtual network. In this article, we will understand how the Proxmox Ve network is configured. Let’s see how to configure a virtual bridge and an interface with balancing according to various algorithms. Proxmox VE allows you to configure VLANs based on the Linux kernel or Open vSwitch, but this is a separate large topic, outside the scope of the overview.
The content of the article:
Types of network connections in Proxmox VE
- Linux Bridge – a method of connecting two Ethernet segments at the link layer, that is, without using higher-layer protocols such as IP. Since transmission is performed at the data link layer (layer 2 of the OSI model), all higher-layer protocols are transparently bridged.
- Linux Bond – a method of aggregating several network interfaces into a single logical bonded interface. Thus, bond provides load balancing or hot standby for a specific scenario.
- Linux VLAN – implementation on the Linux kernel of a virtual local computer network.
- OVS Bridge – implementation of the bridge based on Open vSwitch.
- OVS Bond – implementation of balancing based on Open vSwitch. Differs from the mode balancing implemented in the Linux kernel.
- OVS IntPort – VLAN implementation based on Open vSwitch.
Installing OVS in Proxmox VE
After installing Proxmox VE, Linux kernel networking functions are available. In order to use the Open vSwitch functionality, you need to install it on the system. In the terminal program, write the commands:
sudo apt install openvswitch-switch
After that, you need to restart your computer.
Network setup in Proxmox VE
After installing all the necessary packages and rebooting the OS in the Proxmox VE WTB interface, go to the section Data center, select the name of the hypervisor (in the screenshot PVE). On the menu System find the section Network and press the C buttoncreate:
1. Bridge configuration
The creation of the bridge interface for Open vSwitch and for the Linux kernel is practically the same, except for the choice of the method of creation and the possibility of specifying additional Open vSwitch keys for the OVS Bridge. If you plan to use VLAN for the network interface, do not forget to specify the checkbox next to the item VLAN when creating a bridge. Enabling check-box Autostart allows you to launch the selected network interface when the hypervisor boots:
In general, if the bridge network interface is created the only one for the hypervisor, then there is no need to list in paragraph Network Bridge Ports all available network cards. However, if there is a need at the interface level to separate connections to different communication channels or network segments, then different combinations of network devices can be used. On the presented hypervisor host, there are four of them, so you can enter two of them (by listing through a space) in bridge OVS:
The interface address can be omitted, the virtual machines configured to connect to the interface will use it as a regular switch. If you specify an IPv4 and / or IPv6 address, then it will be available from the outside on all network interfaces or on the interfaces listed in the field Network Bridge Ports:
2. Setting bond
To load balance and combine multiple network interfaces into one virtual one, create OVS Bond. This is due to the fact that its capabilities are broader than Linux Bond, and the creation process is almost identical. To create a load balancer click on the menu Network button Create and select the item OVS Bond:
Unlike creating an OVS bridge, in the vmbr1 OVS Bond parameters, the bond0 network bridge ports are specified, and in the OVS Options item, the tag = $ VLAN key can be used for VLAN tagging, where $ VLAN must be replaced with an integer numeric value, in the example it is 50:
Balancing modes can only be set when creating an interface bond, we list their main characteristics.
For OVS Bridge:
- Active-Backup uses one of the listed network interfaces for operation, and the rest are in reserve in the down status, in case of failure of the main interface
- Balance-slb, LACP modes (balance-slb), LACP (balance-tcp) are suitable for the case when you need to increase the bandwidth and fault tolerance of the channel by combining several network interfaces into a single bond.
For Linux Bond:
- Linux kernel balance-rr mode rather reassigned for outgoing traffic than for incoming traffic. Packets are sent sequentially from the first available interface to the last. Used for load balancing and fault tolerance.
- Режим active-backup is no different from the similar mode in OVS. The transmission is distributed between the network cards using the formula: [( «MAC адрес источника» XOR «MAC адрес назначения») по модулю «число интерфейсов»]… It turns out that the same network card transmits packets to the same recipients. XOR mode is used for load balancing and fault tolerance.
- IEEE 802.3ad Link Aggregation Mode… Aggregated NIC groups are created with the same speed and duplex. With this aggregation, transmission uses all channels in active aggregation, according to the IEEE 802.3ad standard. The equipment of the hypervisor and the active network part with the support of the standard is required.
- Balance-tlb transfer adaptive load balancing mode… Outgoing traffic is distributed depending on the load of each network card (determined by the download speed). Requires no additional configuration on the switch. Incoming traffic comes to the current network card. If it fails, then the other network card takes the MAC address of the failed card.
- Adaptive load balancing mode Balance-alb… Includes the balance-tlb policy and balances incoming traffic. Requires no additional configuration on the switch.
3. VLAN configuration
On the menu System find the section Network and press the C buttoncreate and select OVS InPort:
Set the interface name vlan50 VLAN tag of 50, specify OVS Bridge. VLAN 50 on the specified virtual interface OVS Bridge vmbr1 with tag 50 is created and can be used, for example, for organizing video surveillance. Thus, I propose to configure additionally VLAN30 for IP telephony and VLAN100 for a local network with virtualized workstations. To create all VLANs, use the interface vmbr1.
This article describes how to configure the Proxmox VE network. Now you know about various network connections using the server management interface. The flexibility of the solution allows you to use Proxmox VE as a managed and unmanaged switch, load balancing according to different balancing modes.