IP fabric is one the network cluster configuration types. This configuration type allows you to create virtual machines (VMs) with public IP addresses in a private network.
Virtual machines in the cluster are assigned IPv4 addresses with the /32 mask or IPv6 addresses with the /128 mask. A separate virtual interface is used as the default gateway for each VM. Cluster nodes act as routers.
Routing in the cluster is performed using the iBGP protocol. Route Reflector (RR) equipment is used to transmit information about iBGP routes. Physical or virtual routers and/or servers can be used in this function. We recommend using at least two sets of RR equipment in one cluster — the main and the backup set.
Advantages of IP fabric:
- reduced service traffic;
- saving the address space;
- isolation of VM traffic;
- IP addresses are not bound to cluster nodes;
- VMs can be migrated promptly among cluster nodes.
Operation logic
When creating a VM in an IP fabric cluster:
- VMmanager platform:
- Creates a separate virtual interface <vmname>_net0. For example, for a VM with the name sea_gold, the interface will be called sea_gold_net0. All virtual interfaces on the node will have the same IP and MAC addresses.
- Sets the IP address of the created interface as the gateway for the VM. Routing between the VM and the gateway is performed through a point-to-point connection (PtP).
- Adds the created route to the FRR service configuration on the cluster node.
- The FRR service transmits information about the created route via iBGP protocol to RR equipment.
- RR equipment transmits the route information to Core Gateway equipment. After that, the VM becomes available from the external network (Internet).
Example of IP fabric cluster operation
Configuration order
- In VMmanager:
- Create an IP pool for the VMs. Read more in Pools management.
- Create a cluster with the IP fabric network configuration type. Read more in Creating a cluster. When creating the cluster, specify the following:
- gateway IP address for the VM. VMmanager will assign this address of the gateway to all virtual interfaces on the cluster node and use it only for routing between the VM within the node. We recommend to specify a private address (e.g. 10.0.0.1). This address should not be in use anywhere else in the local network.
- BGP community.
- IP addresses and numbers of autonomous systems of RR equipment.
-
Add the nodes to the cluster. Read more in Managing servers in the cluster.
The nodes of the IP-fabric with KVM virtualization must have AlmaLinux 8, with LXD virtualization — Ubuntu 20.04.
- Configure BGP sessions for each cluster node on the RR equipment: specify the IP addresses of nodes and numbers of autonomous BGP systems in the settings. Maximum number of BGP sessions is 32.
Example of configuration
In this example, we consider the IP-fabric configuration in a cluster of servers used as hypervisors. The role of Core Gateway is performed by a Juniper MX router. Physical servers with Linux are used as Route Reflector.
Preparation
The following equipment will be required for the setup:
- a server with the VMmanager platform;
- one or more cluster nodes with AlmaLinux 8 or Ubuntu 20.04 installed;
- one or two Route Reflector servers;
- Juniper MX switch.
Before configuration:
- Get information from your hosting provider about BGP settings: autonomous system number and community.
- Make sure that the BGP protocol is configured and functioning properly.
- Create an IP address pool for virtual machines in VMmanager.
Configuring the Core Gateway router
To configure the "neighborhood" of Core Gateway and Route Reflector:
-
Add a new filter to the router configuration:
set policy-options policy-statement VM term isp-ipv4 from protocol bgp set policy-options policy-statement VM term isp-ipv4 from route-filter <filter> orlonger set policy-options policy-statement VM term isp-ipv4 then accept set policy-options policy-statement VM then reject set policy-options policy-statement reject-all then reject
Comments to the command -
Add a new group to the router configuration:
set protocols bgp group VM import VM set protocols bgp group VM export reject-all set protocols bgp group VM peer-as <as> set protocols bgp group VM neighbor <rr_ip>
Comments to the command -
Check that BGP routes have been received:
commit check
commit confirmed 5
-
Проверьте, что маршруты BGP получены:
show bgp group VM detail
-
Confirm the configuration changes:
commit
Configuring Route Reflector servers
To configure "neighborhood" among Route Reflector, Core Gateway and cluster nodes, install and configure FRRouting (FRR) software. You can automate this process with a script.
If you are using a VMmanager virtual machine for Route Reflector, run the Route Reflector script on it:
- Go to Virtual machines → menu → Run script.
- Select the Route Reflector script and specify its parameters:
- AS — BGP autonomous system number.
- NEIGHBOR — IP address of the "neighbor" — VMmanager cluster node.
- PREFIX — prefix of the IP networks that Route Reflector will receive.
- VxLAN support — whether it is necessary to transfer information about virtual networks (VxLANs).
- AS — BGP autonomous system number.
- Click Run script.
If you are using a physical server for Route Reflector:
-
Create the route_reflector.sh file with the following content:
File contents - Replace the macros in the file text:
- ($AS) — with the BGP autonomous system number.
- ($NEIGHBOR) — with the IP address of the "neighbor" — VMmanager cluster node.
- ($PREFIX) — with the prefix of the IP networks that Route Reflector will receive.
- ($VXLAN) — with:
- уеs — if the service should transfer information about virtual networks (VxLANs);
- no — if there is no need to transfer information about virtual networks.
-
Run the script:
sh route_reflector.sh
VMmanager configuration
To configure IP-fabric in VMmanager:
- Create a cluster with IP-fabric network type. When creating, specify the settings for connections to the Core Gateway and Route Reflector.
- Connect the servers to the created cluster.
- Create VMs in the cluster.