You are on page 1of 67

GNS3 For Large Scale Simulation

George Liu

[1]
Agenda

• GNS3 Basics
• GNS3 Environment
• GNS3 with Vmworkstation Networking
• Demo Lab
• Other GNS3 Labs

• Internal Use -
Confidential [2]
GNS3 Basics

• Internal Use -
Confidential [3]
GNS3 Basics

• GNS3 is a software simulator used to simulate complex networks


• Was originally used to emulate Cisco routers but the number
appliances supported expanded over the years
• Most of your testing can be done on GNS3 alone by adding the
required GNS3 appliances. Example GNS3 appliances
– Linux devices – many flavors to choose from
– Cisco devices
– OS10 and OS9 Switches
– Docker host
– Firewalls…etc

• https://www.gns3.com/marketplace/appliances

• Internal Use -
Confidential [4]
GNS3 Basics - VMWorkstation

• So why would you need to network VM Workstation VM with GNS3?


– Its needed when there is a simulation required where appliance isn’t supported
– Example, testing SmartFabric Director
› SFD VM runs on ESXi. There is no ESXi GNS3 Appliance
› SFD requires vCenter. I run vCenter as an appliance inside ESXi host
› SFD requires DNS/NTP – I run this on Windows server in Vmworkstation though there is
support for running windows server as an appliance in GNS3
– Can run DNS/NTP on linux host also if you wish
› I run nested topology where I install ESXi on my VMworkstation
› In order for SFD configure the switches, I run OS10 switches in GNS3 hence the ESXi and
Windows server VM needs to be able to communicate with the switches inside GNS3
› See sample lab SFD topology next slide

• Internal Use -
Confidential [5]
GNS3 Basics - VMWorkstation

• Internal Use -
Confidential [6]
GNS3 Basics - VMWorkstation

• VMWorkstation can be downloaded from Software Center


• SFD can be downloaded from force10 website
• ESXi, Vcenter, Windows server – ask your local TS support for these
images if you don’t already have it ☺
– Can download windows server with 180 eval license from
https://www.microsoft.com/en-us/evalcenter/

• GNS3 and appliances can be downloaded from GNS3 website for free
• First step after Vmworkstation installed and you are using your work
laptop to run GNS3 VM, start the virtual network editor to configure
your logical networks on your work laptop
– If you are connecting to remote server, you only need to ensure VMnet0 enabled
so that you can access the GNS3 VM hosted remotely. This will likely just be a
bridge interface to your local LAN

• Internal Use -
Confidential [7]
GNS3 Basics – Work Laptop - VMWorkstation

• Internal Use -
Confidential [8]
GNS3 Basics - VMWorkstation

• VMnet0 is by default the bridge interface to local LAN. You will only
see it when you click on change settings
• VMnet8 by default is NAT interface to local LAN. I never used this
option as I rather just used bridge to access local LAN/Internet. Of
course, if you run out of IP on your local LAN, then you can use this
option as traffic will be NATed by the local host interface
– Using this option traffic from local LAN cannot access devices off VMnet8

• I have 4 private logical networks in my example. Vmnet 1 to 4


excluding vmnet 0 and 8
• If you enable host connection like I have for vmnet1, this will create a
logical interface on your windows OS and you can enable DHCP for the
devices connected to this vmnet. Similarly for vmnet8.

• Internal Use -
Confidential [9]
GNS3 Basics - VMWorkstation

• Internal Use -
Confidential [ 10 ]
GNS3 Basics - VMWorkstation

• Internal Use -
Confidential [ 11 ]
GNS3 Basics - VMWorkstation

• In my setup, any devices connected to VMnet1 can ping 10.1.1.1 and


get IP from DHCP
• Example, if I have switch mgmt interface connected to vmnet1, the
port will get IP off DHCP server running on VMnet1 and I can use this
network to upgrade switch OS using 10.1.1.1
• If you have host that only need to communicate with each other on
the vmnet and don’t need access to your laptop, then you don’t need
to enable the connected or dhcp option

• Internal Use -
Confidential [ 12 ]
GNS3 Enviroment

• Internal Use -
Confidential [ 13 ]
GNS3 Environment

• Download and install GNS3 application on your laptop


• Download GNS3 VM
• GNS3 server can run in “local” or “remote”
• Remote is recommended and is the recommended option supported
for OS10 appliances
– Local needs to be enabled when connecting to multiple GNS3 VM

• Advantage connecting using remote option is you can host GNS3 VM


on a server that has large CPU/Memory footprint
– Refer to slides on scaling your setup

• Internal Use -
Confidential [ 14 ]
GNS3 Environment

• Configure memory/CPU for the GNS3VM


• My setup, laptop has 16G memory. I have allocated 10G memory to the GNS3 VM.
Allocating more memory to GNS3 VM means you can add more appliances running in
GNS3 but base on my testing, even with just 10 gig allocated to GNS3 VM, my laptop
physical memory already running close to maximum. This doesn’t include any
possible VM that you maybe hosting on Vmworkstation
• GNS3 appliances uses most memory/cpu when booting up. If you are close to
maximums, then don’t power up all appliances at same time. Just power up one at a
time and wait until device fully loaded
• Monitor both your PC CPU/memory and GNS3 CPU/memory separately
• Example, each OS10 appliance requires 2G memory. As such, your GNS3 topology
would be limited to around 5 switches if running based on my setup. Again, this
doesn’t account for any VM running on Vmworkstation or apps running in your PC.
• If your close to limits, close of as much apps as you can
• Running beyond limit you may notice appliances rebooting or slow to respond from
console

• Internal Use -
Confidential [ 15 ]
GNS3 Environment – BGP eVPN Lab

• Internal Use -
Confidential [ 16 ]
GNS3 Environment

• Internal Use -
Confidential [ 17 ]
GNS3 Environment

• The storage memory allocated to GNS3 VM will limit how many


projects you can save on the GNS3 VM
• Example, BGP eVPN lab takes around 30G storage capacity
• Recommend you export projects off GNS3 VM in case GNS3 VM
doesn’t work for some reason. This way you can reinstall the GNS3
VM and reimport your projects
• In my case, I also clone copy of my GNS3 VM for double backup.
Cloning will include all projects last saved on GNS3 VM
• GNS3 also supports snapshots of your projects. This is nice if your
doing updates on say Linux host and for some reason, things don’t
work out. You can revert to older snapshot prior to the update

• Internal Use -
Confidential [ 18 ]
GNS3 Environment

• If you have a spare server in local lab or PC at home with better


CPU/Memory, you can also run GNS3 VM on that PC/server for larger
deployments
– Example, Sydney local lab we have GNS3 VM running on ESXi with large amounts
of memory allocated to it

• You can also connect to multiple GNS3 VM’s to spread the load across
multiple GNS3 VM’s. More on this later slide

• Internal Use -
Confidential [ 19 ]
GNS3 Environment
• After GNS3 VM boots up for first time, configure the IP address that
your laptop GNS3 client will connect on “remote option”.
• In my setup, I have 6 vmnet network adapters configured on GNS3
VM running in VMworkstation.
– This may be slightly different for example if GNS3 VM hosted on ESXi as there is
no concept of Vmnet when running GNS3 VM in ESXi

• Internal Use -
Confidential [ 20 ]
GNS3 Environment

• Internal Use -
Confidential [ 21 ]
GNS3 Environment

• Network Adapter will be eth0


• Network Adapter 2 would be eth1..etc

• Internal Use -
Confidential [ 22 ]
GNS3 Environment

• Here I have configured first Network Adapter to use Vmnet0 which is


the Vmnet bridge to my local LAN. So my laptop would connect to
GNS3 VM on IP 192.168.1.128
• The GNS3 VM is just a Debian host but don’t configure IP address by
editing the /etc/netplan/interface from shell. Instead just use the
GNS3 Shell under network option

• Internal Use -
Confidential [ 23 ]
GNS3 Environment

• Internal Use -
Confidential [ 24 ]
GNS3 Environment

• By default, GNS3 VM will automatically be enabled with 2 network


adapters

• Change the adapter to correct logical network you want them to be


connected to

• Internal Use -
Confidential [ 25 ]
GNS3 Environment

• Below is sample output from work laptop

• By default, any additional adapters beyond the 3 network adapter you add
will show up on the ifconfig output in the GNS3 VM but the ports will be in
down state

• Internal Use -
Confidential [ 26 ]
GNS3 Environment

vmnet3

vmnet4

• Internal Use -
Confidential [ 27 ]
GNS3 Environment

• The ports 3 and 4 currently down. If you use vmnet3 or 4 to connect


Vmworkstation VM to appliance in GNS3, the communication will not
work
• To fix this problem, edit the following file under
/etc/netplan/80_gns3vm_default_netcfg.yaml

• Internal Use -
Confidential [ 28 ]
GNS3 Environment

• Edit the file to add in eth3 and eth4

• Internal Use -
Confidential [ 29 ]
GNS3 Environment

• Save file and reboot. The ports should now show UP status

vmnet3

vmnet4

• If you don’t plan to integrate VM to your GNS3 topology, you really


only need 2 vmnet ie vmnet0 to bridge to your local LAN and possibly
vmnet1 so you can ssh to your switch without accessing the local LAN
or run test like switch talking to radius server on a private logical
network.

• Internal Use -
Confidential [ 30 ]
GNS3 Environment - Appliances

• Download the required appliances required for your project


• GNS3 appliances can be download from GNS3 website
• OS10 example you download OS10 appliance from force10 website
• Import the appliance into GNS3 VM
– There is a GNS3 OS9 appliance based off FTOS 9.8 on GNS3 website. It works but
is super slow. As such, if you need to connect FTOS device to say OS10 in GNS3,
suggest you run FTOS device on Vmworkstation which also allows you to also run
a later release of OS9 simulator namely 9.13 and is a lot faster to boot

• Latest OS10 virtual image is based off 10.5.1.0 time of the


presentation. Once appliance imported into your project, the switch
can be upgraded to latest image using standard OS10 install
procedure

• Internal Use -
Confidential [ 31 ]
GNS3 Environment - Appliances

• However, as the appliance template is hardcode to run off 10.5.1.0,


each time you add the appliance, it would be version 10.5.1.0
• In order save time having to upgrade each time, you can create
project with several OS10 switches and upgrade them all and save
project like “project 10.5.1.1”
• If you have new project, instead of adding appliance based off
10.5.1.0 template, you can duplicate project “project 10.5.1.1”. This
project would have OS10 switches with the release you upgraded it to
so that when you run it, it would already have say 10.5.1.1 image on it
• You will also notice each time you add a new appliance say OS10, it
has to go thru full install process which takes time. Whereas if you
duplicate the project which already had switches upgraded and run
once, the switches will be available to use in much shorter time
without requiring to go thru full install process

• Internal Use -
Confidential [ 32 ]
GNS3 Environment - Appliances

• If you want to be creative and want to learn some onie commands, the old
onie NOS-VM-Template can also be imported into GNS3 so that device only
loads ONIE
• From there, you can play around with ONIE and even load OS10 images
• The NOS-VM-Template is imported as a QEMU VM

• Internal Use -
Confidential [ 33 ]
GNS3 Environment - Appliances

• OS10 Virtual appliance is available to public. The NOS template isn’t.


Please don’t share this with the public

• Internal Use -
Confidential [ 34 ]
GNS3 Environment - Appliances
• When working with appliances, you may need to configure the
appliance settings to match your network requirements
• Consider my case where I have 5 Vmnet, by default, when you import
say cloud appliance, it will by default only have 3 interfaces available.
VMnet4 and 5 is missing which correspond to eth3 and 4

• Internal Use -
Confidential [ 35 ]
GNS3 Environment - Appliances
• Select the appliance, configure option and select interface and click add so that you can
connect the appliance to the correct vmnet
• You can also do it on the appliance template so that whenever you add the appliance to
the project, it will already have the interfaces added
• Here I have added eth3 and 4 to the cloud appliance

• Internal Use -
Confidential [ 36 ]
GNS3 Environment - Appliances

• You may also need to do same for other appliances example


CPU/Memory.
• Example to run Kubernetes cluster, the master node requires at least
4G RAM and 2 vCPU. By default the Ubuntu appliance doesn’t meet
this requirement. So after importing the appliance say Ubuntu host,
modify the CPU/Memory so that it meets the requirements of your
setup

• Internal Use -
Confidential [ 37 ]
GNS3 with
VMworkstation
Networking

• Internal Use -
Confidential [ 38 ]
GNS3 VMworkstation Networking

• Notes on FTOS VM
– Network Adapter VMnet0 is always connected to management port
– Network Adapter 2 VMnet1 will be 1st physical user port and so on
– No Keepalive needs to be enabled on all ports you want to use

Connected to mgmt.
port

• Internal Use -
Confidential [ 39 ]
GNS3 VMworkstation Networking
• This example is where I run GNS3 VM on my local work laptop
• Recall my GNS3 VM has been configure with 5 interfaces
• Specifically these interfaces are used for connecting the GNS3
appliances to the cloud appliance which then allows you connect
GNS3 appliances to your Vmworkstation VM, local LAN..etc

• Internal Use -
Confidential [ 40 ]
GNS3 VMworkstation Networking

• When connecting Vmworkstation VM to GNS3, do not mix vmnet


networks across multiple logical connections
• Example, I have FTOS switch running inside Vmworkstation. I usually
have management interface on VMnet1 so I can SSH to it from putty.
To connect a switch physical interface to GNS3 environment, don’t
reuse VMnet1 as its already been assign to management port. Use
another Vmnet example Vmnet2

• Internal Use -
Confidential [ 41 ]
GNS3 VMworkstation Networking

• Example how to network Vmworkstation VM to GNS3

• Internal Use -
Confidential [ 42 ]
GNS3 VMworkstation Networking

• Notice how you need to connect GNS3 appliances to the GNS3 cloud
that connected to the FTOS switch running in Vmworkstation
• You need to connect the cloud on the same interface which is running
inside Vmworkstation. In my case, this is a FTOS switch

• Internal Use -
Confidential [ 43 ]
GNS3 VMworkstation Networking

• GNS3 also supports importing an existing VM from Vmworkstation as


an appliance to use on GNS3. As an example, I can import the FTOS
switch into GNS3 so long as your GNS3 local server is enabled
• However, I find this option harder to actually manage as there are a
lot more configuration that needs to be manage
• Assuming you have say FTOS switch installed in Vmworkstation,
import the FTOS switch by adding it to the GNS3 Vmworkstation
template

• Internal Use -
Confidential [ 44 ]
GNS3 VMworkstation Networking

• You also need to configure the GNS3 VM to tell it which Vmnet to use
• In this example, I have allocated VMnet19 to the FTOS VM

• Internal Use -
Confidential [ 45 ]
GNS3 VMworkstation Networking

• You also need to edit the interface in Vmworkstation tell it that


VMnet19 is being used
– Don’t used Vmnet that already been assigned in Vmworkstation virtual network
editor. Here VMnet19 hasn’t been used

• Internal Use -
Confidential [ 46 ]
GNS3 VMworkstation Networking

• Now you should see the FTOS switch available as an appliance in GNS3

• Internal Use -
Confidential [ 47 ]
GNS3 VMworkstation Networking

• So basically now instead of needing to 1st connect Vmworkstation VM


to clould Vmnet before connecting to GNS3 appliance, you simply
connect directly to the device as above

• Internal Use -
Confidential [ 48 ]
GNS3 VMworkstation Networking

• When you start the project, the GNS3 will tell Vmworkstation to also
power up the FTOS VM automatically
– See quick demo

• My preference if needing to connect Vmworkstation VM to GNS3


appliance is to not import the Vmworkstation into GNS3. I find it more
complicated to manage

• Internal Use -
Confidential [ 49 ]
GNS3 Vmworkstation Network - Scaling

• If you have limited resource on work laptop and want to build a large
topology, recommend you install GNS3 VM on a server like ESXi with
lots of memory. Example LAB server
• For some, this may not be an option. The workaround if you have
another spare PC at home is to run GNS3 VM on both your work
laptop and home PC
• Here appliances in GNS3 VM home PC can communicate with
appliance on work PC so long as the GNS3 VM can communicate with
each other. Hence the VMnet0 should be used as this will bridge all
traffic from GNS3 VM to local LAN
• Your not limited to just 2 GNS3 VM if you have couple spare PC’s

• Internal Use -
Confidential [ 50 ]
GNS3 Vmworkstation Network - Scaling

• Internal Use -
Confidential [ 51 ]
GNS3 Vmworkstation Network - Scaling

• In this setup, you do need to enable local server feature on the laptop
that is the client interface to the GNS3 VM
– The appliances will still be hosted on the GNS3 VM’s

• As you can see in server summary, I have 3 servers:


– Local server
› Use to save projects, appliance template and GUI to connect to GNS3 VM
– GNS3 VM running Home PC
– GNS3 VM running Work laptop
– The GNS3 VM’s is actually where appliances are running ie not on the local server

• Internal Use -
Confidential [ 52 ]
GNS3 Vmworkstation Network - Scaling

• You can see also the switch on left is appliance running on my home
PC whereas the switch on right is running GNS3 VM inside my laptop
• So basically if you have a large topology, you can split up the resource
between multiple GNS3 appliances

• Internal Use -
Confidential [ 53 ]
GNS3 Vmworkstation Network - Scaling

• One thing to note which I haven’t tried testing is that the traffic
between the 2 switches in this setup is actually now tunneled so this
“may” break some setup example if you run Vxlan.
– The source/destination IP of packet sent between the appliances running in the
GNS3 VM would be GNS VM IP of each GNS3 VM
– You may need to ensure NIC card on where GNS3 VM has jumbo enabled if you
plan to run say Vxlan between appliances in the different GNS3 VM
› Again, not tried it. Maybe someone can test and let me know

• Internal Use -
Confidential [ 54 ]
GNS3 Vmworkstation Network - Scaling

• Setup in GNS3 will alter as follows:


– Local server needs to be enabled. Ensure GNS3 VM option is left disabled
– In the remote server tabs, add the GNS3 VM IP of each remote GNS3 VM you
want to be able to manage from your local GNS3 server
– All previous appliances template/projects that you have imported prior to
configuring this will not be assessible as the local server will now host these
projects/appliances template. Hence, the projects/appliance templates need to
be build from scratch.
› Note in this mode, the appliances aren’t running locally. They are still running in the GNS
VM of each remote server

• Internal Use -
Confidential [ 55 ]
GNS3 Vmworkstation Network - Scaling

• As you can see below when running multiple GNS3 VM, you need to
tell appliances template which GNS3 VM you want to run on your
project

• Internal Use -
Confidential [ 56 ]
Demo LAB

• Internal Use -
Confidential [ 57 ]
Demo Lab
• Below topology hope achieved in this demo. Will build project from
scratch. No guarantees it will work during the presentation ☺

• Internal Use -
Confidential [ 58 ]
Demo LAB

• All devices are hosted inside GNS3 except for FTOS switch running in
Vmworkstation
• I have one OS10 switch hosted in GNS3 VM on my home PC and other
OS10 switch running on my work laptop
• There is one FTOS switch running 9.13 in Vmworkstation. Here I
haven’t added the FTOS VM into GNS3. As mention earlier, I find it
more complex to manage

• Internal Use -
Confidential [ 59 ]
Demo LAB

• There also an appliance called Osinato


– Ostinato is a packet generator appliance
– The APP can be download as an appliance from GNS3 website
– The appliance itself contains the client and the server. The server is called drone
– Client is used to configure the server to send packets
– You can craft any packet you like just like IXIA packet generator although amount
packets you send PPS will be limited to the VM/Host running the appliance on

• Internal Use -
Confidential [ 60 ]
Ostinato Docker on OS10 LAB

• Internal Use -
Confidential [ 61 ]
Other GNS3 LAB

• Internal Use -
Confidential [ 62 ]
Smart Fabric Director LAB

• Internal Use -
Confidential [ 63 ]
BGP eVPN Asymmetric IRB

• Internal Use -
Confidential [ 64 ]
BGP eVPN Symmetric IRB

• Internal Use -
Confidential [ 65 ]
Kubernetes Container with Calico

• Internal Use -
Confidential [ 66 ]
Any Questions??

George Liu

[ 67 ]

You might also like