On this page I will delve into the Cumulus virtual switch and integrate them into the following:
2.)EVE-ng (formerly UNETLAB)
The Getting Started Guide for Cumulus and GNS3…
Prerequisites: On this page, I will go over setting up your Cumulus VX image from scratch. If you are from the Windows side (and if you use GNS3, there is a 60 percent chance you do)…then this page is for you. Why? Because Cumulus runs ON TOP of LINUX. Therefore, Linux guys are comfortable performing the following tasks:
a. Editing a text file locally or remotely using VIM. There are files within the Cumulus application that requires manual changes.
b. Overall ability to move up and down in parent/child directories in Unix.
c. The ability to find missing programs and load the correct repository to install them VIA a command line (terminal) setting.
So if you are pretty comfortable already…you can just review the official getting started guide from Cumulus here: https://docs.cumulusnetworks.com/display/VX/Cumulus+VX+Getting+Started+Guide.
For the rest of us (either a current Windows Systems Engineer) or a Recovering Windows Addict (like myself), you will find this guide fun and informative. Hopefully with my ability to integrate your past skill sets, this will open a whole new world with networking, Cumulus, GNS3 or Linux.
Section 1: Setting up your Cumulus VX image in GNS3.
In this section we will cover the following:
a. Where to download the Cumulus image.
1.Go to https://cumulusnetworks.com/products/cumulus-vx/download/
2.From there, choose either VMWare or Virtualbox. For the sake of the exercise, I will choose “virtualbox”. See GIF image below:
b. How to configure the image in Virtualbox.
c. How to incorporate that image into GNS3.
1. This is where I diverge from Cumulus since the documentation on their site uses Vagrant. Vagrant is good, but GNS3 is far more graphical and for new network engineers, they need to “see” the connections. To incorporate this Cumulus VM into GNS3 perform the following steps.
A. Getting the Cumulus Image imported into GNS3.
1. You can set this during the previous importing of the virtual machine, but I messed up during recording and decided to show where to change that after you imported your VM. You can make changes either by
a. RIGHT CLICKING on each vm and making the changes there. OR
b. Go back into the Preferences section and click the EDIT button. Whatever you do here changes how GNS3 will handle that VM. In this case, my errors stated I needed to use “link state” to allow GNS3 to create vms using the ‘clone’ feature in virtualbox. The second thing I needed to change was to allow GNS3 to handle the network connections. Both are very important and should not be skipped.
A very brief comment about “linked based vms”: Linked based vms are useful when you don’t want to create multiple clone machines. If all your doing is running a “one off” example, then use the linked based vms. Otherwise, if the intent is to create a project and actually SAVE the configs, then I recommend an intermediary step of creating permanent vms in virtualbox and naming each clone “Cumulus-1”, “Cumulus-2”, “Cumulus-3” and “Cumulus-4” respectively.
In the screenshot above, I’m back in the Preferences -> Virtualbox ->Virtualbox VM Configuration screen. At the very bottom there is an option to click “Use as a linked base VM (experimental)”. Note: Jeremy had to put that experimental word in because some vms work and others don’t. If you find you can’t get these linked based vms to work, you will need to create a separate cloned image WITHIN virtualbox and give each vm their own dedicated “space” to run.
The second screenshot above shows I have an error, I read the message and realized I needed to allow GNS3 to create the connections between the VMs. I right clicked the vm and placed a check mark in “Allow GNS3 to use any configured virtualbox adapter”. Both screenshots are extremely important to getting vms to run on the first try.
B. Allowing GNS3 to call Virtualbox and boot up both Cumulus vms.
Once all these steps are completed, you are now ready to fire up the vms. NOTE: Depending on your host machine, these vms take up 1 logical core and 512 MB of RAM. Use caution when using multiple instances of the same vm. It can impact performance. In my case, I used an ASUS Republic of Gamers laptop that had an i7 with 8 logical processors. I moved on to a Dell Server that has 2 Xeon processors giving me 24 logical processors. For someone using an i5, you can ‘get away’ with 2.
d.Making changes to the Cumulus VX
This is where we get into the ‘nitty gritty’. If you’ve come this far in setting up your GNS3, I would say you’re already in the top 10 percent.The diagram in the cumulus manual shows 4 vms. If you don’t have the resources to support 4, then improvise with 2 but realize some obvious “fault tolerant” tasks will not be feasible.
In this section, we will build 4 Cumulus VMs.
Perform the following:
- Go back into Virtualbox and ‘clone’ the existing vm.
- Label them “Cumulus-1”, “Cumulus-2”, “Cumulus-3”, “Cumulus-4”
- Import them all into GNS3
- Add at least 4 new interfaces into each of them.
- Connect them all together.
TIP: match the interfaces together. I have even ports going Vertical and Horizontal and the odd port numbers going diagonal. Ethernet 0 (e0) on Cumulus-1 connects with Ethernet 0 on Cumulus-2. See diagram below:
e. Connecting them together.
f. Lab skills and essentials.
Although this was pretty exhaustive, I would be remiss if I didn’t explain all the things required to get to this point before delving into Cumulus moving forward.
A. Get comfortable with the GNS3 interface. It’s a bit of a learning curve, but pays dividends when you want to mock up REAL networks. Those skill sets are invaluable and really do transfer to actual work.
B. Get familiar with Virtualbox, creating one from scratch like booting into an .iso image, or adjusting memory allocation and cpu. Sometimes images don’t work very well at the MINIMUM requirements by vendors. So if the image is a little “sluggish” throw at it more memory or cpu in Virtualbox.
C. Basic networking fundamentals is important. But at this point, if you’re new to networking I recommend the CCNA as a ‘base’. Even older documentation in the CCNA is recommended. Remember, I’m not making any money posting this so if I can find a way to learn network fundamentals on hardly any money…I know you can do it too.
D. Use Google…google dorks…google strings and let Google search effectively what you need to read or use to build great labs or ‘sandboxes’.
Section 2: Playing with your Cumulus VX “sandbox”.
Now that we have our four virtual machines…it’s time to follow the script found at Cumulus’ site here: https://docs.cumulusnetworks.com/display/VX/Configuring+the+Network+Interfaces+and+Quagga
One thing to note about scripts. As you go through different methods to setting up your network, you’re going to need to do substitution or translating. With interfaces, you may need to tweak the interfaces to match what GNS3 is using for interfaces. That’s just part of the game. The ability to adjust and make appropriate substitutions is the key to being a good implementor of networks.
According to the script, we need to edit a file in each Cumulus VX vm. That means, you need to be comfortable with using an installed text editor called Vi. If this is the first time you have ever heard of this text editor, it takes some getting used to since the keyboard interface is the only one BY DEFAULT. The quick and dirty way to edit the file is using the letter ‘i’ to toggle between Insert mode and Normal mode. In Insert mode, you can add and delete characters. In Normal mode you actually enter a short-hand list of commands to do things you normally would do with a mouse. You can use either the H,J,K,L keys or the arrow keys to move around the editor. Once you are done manually entering the same values for the interfaces, you can then ESC out of Insert mode and they type “:qw” to Quit and Write to the file.
There’s just one THING about integrating Cumulus. I don’t like the fact that the default connections in GNS3 are labeled “Ethernet” and not “SWP”. Sooo…the following shows how to change that. See GIF below:
After those steps, you now have MATCHING interfaces and you’re pretty much ‘safe’ to copy the configs into the individual vms. I added 5 interfaces because the script from Cumulus started at SWP1. I’m going to use those OTHER interfaces to attach client vms. Ultimately, you will have something that looks like this.
Note: Credit for the image underneath my topology view from Cumulus Networks.
Whether you use the main topology window in GNS3 or the topology view on the side, it’s pretty hard to get confused now that you have the right interfaces. Earlier I mentioned how I like to connect interfaces. We see here after closer examination the SWP1 interface matches on the left leaf and spine. The SWP2 matches on the right side of the leaf spine. Then the swp2 connects to swp1 diagonally.
After these steps are completed, you’re ready to finish the configuration and then PING the interfaces to make sure they see each other via ICMP.
I’m not going to lie…it takes a bit longer to enter all the configuration settings for the four virtual machines. In addition, I prefer to keep the name of my VMS as “Cumulus-1” etc. When I finally completed the configuration settings, I restarted the services for the network interfaces and the quagga.service. The final screenshots prove I can ping between the leaf (Cumulus_4) and spine(Cumulus_2) in this topology.
Conclusion: On this page, we performed the following:
Created a real network leaf-spine configuration in a GNS3 Topology.
Used the vi editor to edit and create text files that control the turning up of different swp interfaces.
Performed an ICMP ping test to verify those interfaces are receiving and replying to these requests which prove GNS3 can be used to build a real Cumulus network. If you were able to complete these tasks with pingable interfaces, CONGRATULATIONS. You have successfully integrated GNS3 with Cumulus Networks!
The next step is to get involved with the Cumulus Networks to build more complex and layered topologies. Or you can hit up Sean Cavanaugh, a good friend of mine who trains network engineers on how to use Cumulus. Drop him a note, mention you have GNS3 running with Cumulus and he can recommend the next steps to getting Certified.
I hope you found this free site informative and fun and I suggest a small donation to keep the lights on.