Using GNS3 & VirtualBox (UGV)



AVAILABLE:    5

Before running your virtual network in GNS3, ensure that you:

  1. Download and install VirtualBox.
  2. Download the VirtualBox OVA images and import all the VMs you want to run in GNS3 into VirtualBox.
  3. Download and install GNS3.
    GNS3 overrides interface names configured in VirtualBox. If you plan to use VMs in both VirtualBox and GNS3, consider cloning them first.

Steps to Run Your Virtual Network in GNS3

  1. Launch GNS3.
  2. Navigate to GNS3 > Preferences. The Preferences dialog opens. From the left panel, select VirtualBox.
  3. In the Path to VBoxManage field, specify the location of VBoxManage. For example: /usr/bin/VBoxManage.
  4. From the left panel, select VirtualBox VMs, then click New.
    The VM list displays the VirtualBox VMs you’ve already set up.

  5. From the VM list, select the VM you want to run in GNS3, then click Finish.
    The selected VM appears in the central panel. Repeat this step for every VM in the topology you wish to run in GNS3. For the example topology above, the VMs include:

    • Cumulus VX-spine1
    • Cumulus VX-spine2
    • Cumulus VX-leaf1
    • Cumulus VX-leaf2
  6. Enable GNS3 to work with the network interfaces of VirtualBox VMs.

    • Select a VM from the central panel and click Edit.
    • In the VirtualBox VM configuration dialog, go to the Network tab.
    • Increase the number of adapters to 4.
    • Set the Type to Paravirtualized Network.
    • Check Allow GNS3 to use the configured VirtualBox adapters.
    • Click OK to save your settings and close the dialog.

    Note: GNS3 overrides interface names configured in VirtualBox. If you plan to use VMs in VirtualBox, consider cloning them beforehand.

  7. To connect VMs, select the cable icon from the left panel, then choose the VMs to connect directly. For each VM, select the appropriate network interface to connect.


Example VM Connections

  • Cumulus VX-backbone1:

    • 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)

In GNS3, e1 corresponds to swp1 in Cumulus VX, e2 to swp2, and so on.

You can also drag and drop virtual PCs (VPCS) and connect them to the Cumulus VX switches.

Configuring Virtual PCs

To open a console for a virtual PC, right-click on the VPCS icon and select Console.
In the console, configure the IP address and default gateway for the VPCS. For example:

ip 10.4.1.101/25 10.4.1.1

Final Steps

  1. Start all VMs.
  2. You should now be able to ping between VMs and between the virtual PCs.

Post a Comment

Previous Next

نموذج الاتصال