Last year I wrote an article about EVE-NG and how it could be leveraged to create virtual networks. It’s rich feature-set and device support closely matches that offered by GNS3 and Virl, making it a strong contender for the go to simulator for creating virtual networks.
A couple of weeks ago curiosity got the better of me while preparing my plan for the CCIE Security exam so I decided to revisit EVE-NG and see what it could offer me that GNS3 couldn’t. Here are a few things that I found:
EVE-NG gives you the ability to upgrade without having to re-install everything again, unfortunately GNS3 isn’t that clever
When devices are configured in EVE-NG you can save the configurations, power-off the devices and later return to them with the same configurations. This is a real plus and unlike GNS3, it doesn’t require that you save your configurations externally
EVE-NG gives you the ability to connect to a web UI rather than having to open an application like GNS3
Judging by the article so far one would think that i’m favouring EVE-NG but this isn’t the case. I’ve been a GNS3 user for approximately 5 years and within that time i’ve invested a lot of time into creating networks and re-usable environments. With that in mind, it’s no wonder why I couldn’t just abandon GNS3 and move over to EVE-NG to start again, so what better way than to just use both of them?
Well…let me answer that before showing you why I’ve decided to use both GNS3 and EVE-NG as my go-to virtual simulators.
I will have the ability to maintain my current GNS3 networks without having to start over
I can maintain two separate virtual simulators
I can join both EVE-NG and GNS3 topologies together
So one might ask, “what is the point of this article?” If you’ve not already guessed by the title, I’m going to show you how you can integrate GNS3 with EVE-NG and physical equipment if you have some to hand.
I personally think this is pretty cool and very useful if you want to create complex labs. As well as creating this article I will be doing a video demonstration because this type of set-up does have a lot of moving parts as you’ll soon realise in this article.
So without further-a-do, I would like to share how to integrate GNS3 with EVE-NG and physical equipment.
Separate Internal Network
Physical Equipment (Optional)
So let me start by putting a potential use case out in the wild and hopefully this will give you even more clarity as to why I’m doing this.
You’ve been using GNS3 for a while now and have an environment set up and configured. You recently came across EVE-NG and you’ve decided that you want to start using that but don’t want to have to start from scratch with your current environment. You also have physical equipment that you want to integrate with your virtual environment so that you can test features that just aren’t available on virtual equipment.
As mentioned earlier, I do plan on producing a video that represents this article and with that, I will give you a quick overview of the steps required before looking at them in more detail below.
Establish what pnet maps to what virtual adapter
Assigned the relevant role to virtual adapters
Add virtual adapters to EVE-NG
Configure a routing device within EVE-NG (This will be used to pass traffic between your virtual and physical environment)
Open GNS3 and configure a routable device before adding it to the internal virtual adapter
Configure static and/or dynamic routing between virtual and physical environment
Add static routes to your main PC/Laptop to route to your virtual environment
Connect to virtual devices using your physical PC/Laptop
Step 1. Download EVE-NG
If you’ve not already done so, you will need to head over to the EVE-NG website and download the latest version of EVE-NG. If it’s your first time using EVE-NG then I would suggest that you download the community edition which is 100% free. I would also read the documentation on their website as this will help you get to grips with EVE-NG and help you get started with adding images to use in your topologies.
Once your confident that EVE-NG is set up, navigate to the GUI and log into EVE with the default username and password:
Username: root Password: eve
EVE-NG GUI Login
Step 2. Establish pnet to virtual adapter mappings
This is an important step and gives you a good understanding on how the virtual adapters map to one another within your topologies. With the assumption that the reader is using VMware, right-click on the EVE-NG VM and navigate to settings where you will find your virtual adapters. The first adapter should be connected and using NAT, this is the interface you are using to connect to EVE-NG, leave this as is, we just need to focus on the other interfaces. So that we can connect to our internal network we need to focus on Network adapter 2. By default, the settings may show the adapter as not being connected so we need to change the status to connected.
VMware Interface Connected
Sticking with network adapter 2, we now need to set this adapter to bridged mode, this will give us access to the physical LAN. To do this, select ‘Bridged’ under the network connection pane.
VMware Interface Bridged Mode
If you’ve followed the steps above, you should now have the ability to add a cloud network within EVE-NG that will connect to your physical LAN. To map this in EVE-NG we do the following.
In EVE-NG open a new topology and click on the ‘+’ symbol and then ‘Network’. A pop-up box called ‘Add A New Network’ opens. To keep things simple we will keep everything the same apart from the ‘Name/Prefix’ and ‘Type’. Enter the following settings: Name/Prefix: LAN Type: Cloud1 (Note: This should be pnet1 and should map to your bridged adapter) There are a few ways we can verify this;
Connect a router to the cloud and configure DHCP on the interface that connects to the cloud. If your interface is configured correctly and you have DHCP services running on your LAN you should be able to pick up an IP address.
On the EVE-NG Web UI click on the ‘Networks’ tab on the left and a new pop-up should open that tells you the pnet that is connected.
If all else fails you can delve into the backend of EVE-NG and marry-up the interface by comparing the MAC Addresses. To do this you will need to log into EVE-NG on VMware and issue the following command: ifconfig The interfaces that are of interest for this particular demonstration will be eth0, eth1 and eth2. Note down the MAC addresses of each one and then right click on the EVE-NG VM and click ‘settings’ again. Eth0 should be the NAT interface that is used for EVE-NG, confirm this by clicking on ‘Advanced’ on the adapter network connection settings on VMware and confirming the MAC address with the addresses you’ve just pulled from the EVE-NG CLI.
VMware MAC Address Confirmation
Follow the same principle for Network Adapter 2 which is set to bridged. Eth1 should map to Network Adapter 2 and within EVE-NG this is pnet1.
Once your satisfied that you have connectivity between your LAN and EVE-NG we need to configure another adapter that will be used to route internally between EVE-NG and GNS3.
On VMware we need to follow the same procedure above by connecting the adapter but this time instead of selecting the ‘Bridged’ connection we will assign a ‘Custom: Specific virtual network’. I have assigned VMnet2 (Host-only) but you can assign any that you have available.
VMware Custom Adapter
This adapter should map to EVE-NG eth2 and should be classed as pnet2. Additional configuration may be required at this stage to get the virtual network up and running the way you want it but for the purpose of this article, the default settings should be enough to get going. Advanced adapter settings will be covered in the video that accompanies this article for those that are interested. Once your happy that the VMware adapter settings are configured, head back over to EVE-NG and add another cloud, this time with the following settings: Name/Prefix: VMNetx (‘x’ is your network number) Type: Cloud2 (Note: This should be pnet2 and should map to your VMnet adapter)
Step 3: Configure Routing Between EVE-NG and GNS3
Once the cloud is added to EVE-NG, connect a router to the cloud and configure basic IP settings based on the subnet for the VMnet your using.
Now open GNS3 and assuming you already have the application installed and devices virtual devices available, start a new project and place a cloud appliance in the workspace. To do this do the following:
Click ‘Browse all devices’
Find a ‘Cloud’ and drag it into the workspace
Right click on the ‘Cloud’ once in the workspace and select ‘Configure’
On the tab ‘Ethernet Interfaces’ check the radio tab towards the bottom ‘Show special Ethernet interfaces’. This should bring up all the virtual network adapter you have available. Find ‘VMnetx’ and click ‘Add’
The VMnet should now show in the box as shown in the image below
GNS3 Cloud Settings
Click ‘Apply’ and then ‘Ok’ to finish the configuration of the cloud
Add an ethernet switch to the topology and connect this to the Cloud you’ve just configured. The ethernet switch is required by GNS3 in order to connect to other devices within the topology. Once the switch is added we can go ahead and add a routing device to the topology. Connect this routed device to the ethernet switch and configure an IP address that is within the same subnet as the VMnet network but different from the IP address you configured on the EVE-NG node.
GNS3 Connected to VMnet
Test connectivity from GNS3 to EVE-NG by pinging the EVE-NG node that is within the same subnet. You should have successfully been able to ping to EVE-NG.
NOTE: Once complete you should have established basic connectivity between EVE-NG and GNS3, additional routing will be required for more advanced networks, please watch the video for a breakdown of how I am performing routing in my lab.
Static and/or Dynamic Routing Considerations Between Virtual and Physical Environments
If your looking at routing between EVE-NG and GNS3 out to your LAN and Internet you will need to configure additional routing. As EVE-NG will be acting as your main gateway to the LAN you want to point all traffic without a route out to the LAN. You can do this with static routes or even dynamic routing but it all depends on how your environment is set up and for this reason, I only plan to cover the basics in the video. There is also a potential for adding static routes to the physical host in order to route to virtual devices, this section won’t be covered in the video but I will explain it below as you may encounter the same issue.
On your physical host, it may not update your routes to the virtual network so you will need to configure static routes on your host. In my case, for me to get to the ISE node within GNS3 I had to point my physical host to the ASA’s OUTSIDE interface IP address (See video). Once I had done this, I could connect to the ISE node within GNS3 as shown below.
Adding Static Route to Physical Host
EVE-NG ASAv Permitting ICMP from Physical Host
Physical Host Connecting to ISE Node within GNS3
The intention of this article is to give you a somewhat detailed overview of how it’s possible to use EVE-NG alongside GNS3 and physical equipment.