Está en la página 1de 6

GNS3 Bridge to ESXi Environment using Remote GNS3

Server Configuration.
Document Owner: Gian-Luca Casella (gcasella)
Email: gcasella@casellanetworks.ca
Website: http://www.casellanetworks.ca (Under Construction)
Version: 1.0

This little blog post will show how to connect your VMware ESXi Virtual Machines to your GNS3
environment. There are different ways of doing this -- usually with other applications like VMware
workstation, or VirtualBox, but since I don't want to use those and want to use my existing ESXi
infrastructure and my NIC on my desktop supports Trunking I decided to do it this way. Note that
because of my setup of GNS3 is a little different this will be done on my GNS3 server running on
CentOS 7 on a separate remote system
Before begin make sure the bridge-utils package is installed on your CentOS system by using;
yum install -y bridge-utils
First I will need to create a bridged interface on my CentOS 7.X GNS3 Server. This bridged interface
will connect into a dedicated VLAN I have set up on all my virtual machines strictly for GNS3
integration. I like to keep my seperate Virtual Machines isolated. This documentation will use VLAN
2504 with an IP Subnet of 10.2.91.0/24
To do this we will create the following file with the following details; vi /etc/sysconfig/networkscripts/ifcfg-GNS3_Bridge0
DEVICE=GNS3_Bridge0
TYPE=Bridge
ONBOOT=yes
BOOTPROTO=none
NM_CONTROLLED=no
DELAY=0
PROMISC=yes
STP=yes
I have a seperate Network Adapter attached to my GNS3 server assigned to VLAN 2504 as shown in
my screenshot below;
Network Adapter #1 is assigned to my VLAN 2504 GNS3 Bridge -- this adapter creates an interface in
CentOS labelled ens32. Next we will need to modify this interface and assign it to this bridge. Do this
by modifying/creating the file /etc/sysconfig/network-scripts/ifcfg-ens32 (note make sure you
capture the MAC address with the command ifconfig ens32);

DEVICE=ens32
TYPE=Ethernet
HWADDR=00:50:56:a3:4c:22
BOOTPROTO=none
ONBOOT=yes
NM_CONTROLLED=no
BRIDGE=GNS3_Bridge0

You will not be able to assign any links in the GNS3 client because of permission issues crossing from
the Windows Client to the Unix Server. This is because of dynamips and iouyap not being set with the
proper permissions. To allow non-root users to use dynamips and iouyap to create NIO interfaces, you
can use the following command as root on the CentOS 7.X GNS3 Server;
setcap cap_net_raw,cap_net_admin+eip /usr/local/bin/dynamips
setcap cap_net_raw,cap_net_admin+eip /usr/local/bin/iouyap

Once you run that command and make all the changes and additions in the previous steps I would
advise to reboot the entire GNS3 server so that all settings take place. If you followed my previous
blog here and created a gns3server.service to start automatically you will not have to worry about
starting your gns3server. If you did not follow it make sure you start your gns3server on your CentOS
7.X system.
Once all configuration has been completed, issue a restart on the CentOS 7.X GNS3 Server and once
the system comes online make sure all interfaces have come up as seen in the next set of
screenshots;

Once your gns3server is running, move over to your GNS3 Client running on Windows 7/8.X. Create a
new project, for the purpose of this doc, I created a project called GNS3_Remote_Bridge.gns3. Once
open, drag the cloud over to the topology and start the configuration.

Use the Generic Ethernet NIO adapter to assign your bridged Linux interface into your topology click
Add, Apply and then OK;

Next well add the following devices into the topology, this will include a VPCS host, an IOU L3 Router
image and an IOU L2 Switch Image;

Start up your topology and start assign IP addresses. The IP addresses Ive assigned are found below;
R1 -> 10.2.91.1/24
GNS3 Server -> 10.2.91.11/24
PC1 -> 10.2.91.32/24
ESXi VM -> 10.2.91.19/14 (Outside of Topology)

Things will get a little tricky here because I am using an IOU L2 Switch. A little bit of configuration
modifications will need to be made on Eth0/0 on SW1. For example;

From the following screenshots you will see successful pings from PC1 to R1, and my ESXi VM at
10.2.91.19/24;

The purpose of this was because at this point GNS3 does not have an integration method with VMware
ESXi Hosts and VMs to add them to the topologies. At least this way if resources are needed on this
segregated I can connect them into GNS3 and test things such as web servers, F5 Load Balancing,
FTP, TFTP, and much more.
Another tutorial/blog will be posted for accomplishing this with Windows 8.X GNS3 Client/Server
combination. Depending on the Network Card that is available with your laptop / desktop, you will be
able to assign different VLANs to your NIC and configuring it in a trunk mode from your switch.

Revisions

También podría gustarte