Before you run your virtual network under GNS3, make sure you:
To run your virtual network under GNS3:
- Start GNS3.
- In GNS3, select GNS3 > Preferences. The Preferences dialog opens. From the left pane, select QEMU VMs, then click New. The VM list shows the KVM VMs that you set up earlier.
- In the Type list, keep Default, then click Next.
- In the Name box, enter the name, then click Next.
- Select the path to the Qemu binary and RAM size, then click Next.
- Browse to select the Disk image, selecting the qcow2 image you downloaded earlier.
- Click Finish to save the configuration and close the New QEMU VM template dialog.
- Repeat the previous step for every VM you want to include or re-use the single VM imported. For the example topology above, they are: Cumulus VX-spine1, Cumulus VX-spine2, Cumulus VX-leaf1, Cumulus VX-leaf2.
- Enable GNS3 to work with the network interfaces of the QEMU VMs. For each VM, configure the network settings using the GNS3 interface:
- Select a VM in the center pane, then click Edit.
- In the QEMU VM configuration dialog, click the Network tab.
- Increase the number of Adapters to 4.
- Select the Type to be Legacy paravirtualized.
- Check the Use the legacy networking mode check box.
Click Advanced Settings. In the options field, enter:
Each node requires a different port. For the second CL node, increment 1401 to 1402.
Click OK to save your settings and close the dialog.
This enables SSH to port 1401 (ssh -p 1401 email@example.com).
- Click OK to save your settings and close the dialog.
- Start each VM, then SSH to each VM and configure the network interfaces and routing.
- To interconnect the VMs, select the cable icon from the left pane, then select the VMs to connect directly. Select which network interface you want to connect to each VM.
- Cumulus VX-spine1:
e1<-> e1 Cumulus VX-leaf1
e2<->e1 Cumulus VX-leaf2
- Cumulus VX-spine2:
e1<->e2 Cumulus VX-leaf1
e2<->e2 Cumulus VX-leaf2
- Cumulus VX-leaf1:
e1<->e1 Cumulus VX-spine1
e2<->e1 Cumulus VX-spine2
e3<->e0 PC1 (VPCS)
- Cumulus VX-leaf2:
e1<->e2 Cumulus VX-spine1
e2<->e2 Cumulus VX-spine2
e3<->e0 PC2 (VPCS)
- Cumulus VX-spine1:
e1 in GNS3 corresponds to swp1 in Cumulus VX, e2 to swp2, and so forth.
You can also drag and drop virtual PCs (VPCS) and connect them to the Cumulus VX switch.
To open a console to a VPC, right click on the VPCS icon and select Console.
In the console, you can configure the IP address and default gateway for the VPCS. For example:
ip 10.4.1.101/25 10.4.1.1
Start all the VMs.
You should be able to ping between the VMs and between the virtual PCs.
- After you start the VMs, they run headless. You can SSH into a VM as:
ssh -p port-nr firstname.lastname@example.org
port-nris the one specified for this node in step 4 above.
- It takes a couple of minutes for the VMs to spin up and be ready for SSH connections.
- Console access does not work with GNS3 in this configuration. For a workaround, run QEMU/KVM from the command line; see below.
KVM/QEMU from the Command Line
For console access with GNS3 and QEMU/KVM VMs, use the qemu binary that is bundled with GNS3. On OSX, this binary is located in: /Applications/GNS3.app/Contents/Resources/qemu/bin/qemu-system-x86_64.
When using the command line to access QEMU, start the two-leaf/two-spine topology by starting each VM manually.
When each node is up, configure the network interfaces and routing, then restart the VMs or their services, as described earlier. After this is done, the nodes are able to communicate with each other.
To start Cumulus VX-spine1:
To start Cumulus VX-spine2:
To start Cumulus VX-leaf1:
To start Cumulus VX-leaf2: