Juniper vMX - Dual Routing Engine Setup

Recent releases of the Juniper vMX (18.1 onwards) support dual routing engines when using KVM as the virtualisation technology. One or both of the routing engines do not need to be configured on the same host - it is supported to run the routing engines on another host if required. For this example I am deploying the dual routing engines on the same host together with the vFPC. More information about the requirements for the vMX can be found on the "Installing vMX for Different Use Cases" document available on the Juniper website here.

Configuration File

Edit the vmx.conf configuration file. Look for the CONTROL_PLANE definition in the configuration file, typically it would look something like this:

#vRE VM parameters
CONTROL_PLANE:
    vcpus       : 3
    memory-mb   : 8192
    console_port: 8601

    interfaces  :
      - type      : static
        ipaddr    : 10.102.144.94 
        macaddr   : "0A:00:DD:C0:DE:0E"

First, set the vCPU and memory allocations correctly for your environment. The amount of vCPU's allocated to each control plane follows the formula vcpus / 2 - if you define 8 vCPU's each vCP will be allocated 4 vCPU's. The memory allocation is set per vCP, so in the above example 16GB will be used for the two vCP VM's.

Next the key deploy : 0,1 needs to be added so that two VM's are deployed. This needs to be added under the CONTROL_PLANE key like this:

CONTROL_PLANE:
    deploy      : 0,1
    vcpus       : 8
...

The interfaces key will need to be edited next. First, set the instance ID for the existing interface (this will be set to 0). Second, add a second interface but this time set the instance to 1. The second interface will also need to have a new key added for console_port - the port must be unique otherwise both vCP VM's will attempt to bind to the same port and fail during startup. Make sure the IP address and MAC address are also unique.

The end result should look something like this:

---
#vRE VM parameters
CONTROL_PLANE:
    deploy      : 0,1
    vcpus       : 8
    memory-mb   : 8192
    console_port: 8601

    interfaces  :
      - type      : static
        instance  : 0
        ipaddr    : 10.102.144.94
        macaddr   : "0A:00:DD:C0:DE:0E"

      - type      : static
        instance  : 1
        console_port : 8602
        ipaddr    : 10.102.144.95
        macaddr   : "0A:00:DD:C0:DF:0E"