GNS3 Notes
GNS3 Notes
GNS3 Notes
Introducing GNS3
GNS3 is capable of:
Emulated hardware
Simulated OS
Scalability with GNS3 server
Simulated: mimics all the characterristics of an actual device, like an ethernet switch which does
not run an OS, or an IOU
Emulated: like a cisco IOS router. It emulates hardware
Installing GNS3
Main ideas of this section
GNS3 Appliances
https://gns3.com/marketplace/appliances
Configuration
c2691-adventerprisek9-mz.124-5a
c3660-jk9o3s-mz.124-17.bin
c3725
c37xx
c7200-advipservicesk9-mz.122-33
They are c3725, c3745, c7200
Crash often
c3640-a3jk9s-mz.124-16a.bin
Screen layout
GNS3 toolbar
Devices toolbar
Console
Topology summary
Workspace
Text edit:
r.click the text label / text edit -> get much bigger editing area
start/stop/suspense
Suspense:
o simulate a failure without having to go through the process of saving your configuration,
stopping the router, and restarting it
o the router also resumes more quickly (like hibernate function in windows)
o In fact, repeatedly stopping and restarting GNS3 routers can cause Dynamips to crash
with some IOS versions
GNS3 styles
Create a project
About the GNS3 file ios_base_startup-config.txt (1,38)
You can add commands to this file so that they get applied straight away after you start up a
router
VPCS
by typing the command "save"
commands:
Save: save configuration of VPCS devices
Show ip
VirtualBox
Setup wizard / local GNS3 VM / select VirtualBox
Note that the number of CPU cores were selected for us which may not be right. Get back to the running
VirtualBox, and note down the number of CPU cores being allocated to the virtual machine image, then
enter that number into the “setup wizard”
GNS3 VM
https://docs.gns3.com/1wdfvS-OlFfOf7HWZoSXMbG58C4pMSy7vKJFiKKVResc/index.html (title: GNS3
Setup wizard with the GNS3 VM)
Cisco IOU
IOU functions similarly to Dynamips but uses far fewer resources
IOU images
IOU filename breakdown (1,153)
Other features
GNS3 Console
Commands:
help
show device
Useful practices
About the GNS3 file ios_base_startup-config.txt
you can add commands to this file so that they get applied straight away after you start up a
router
Snapshot
Change symbol
After dragging a router, a switch, or anything into the workspace, we can change that symbol into
another one by r.clicking on the symbol, choose change symbol (the appearance may change; however
it’s still a router if initially it’s a router)
Putty
SecureCRT
TeraTerm
Windows Firewall
- This illustrates how to configure Windows Vista firewall to not filter loopback adapter on the local PC:
- Open firewall / change settings / advanced / uncheck loopback under network connections
- After this, we will be able to ping from the PC to a router or the reverse
- The first topology was created using GNS3, the 2nd topology illustrates real world connections between
real devices
- HPLaptop will use Loopback card to connect to R1 in GNS3, and use its Ethernet card to connect to the
Internet.
- For R1 to connect to the Internet, HPLaptop will be a NAT Server for R1. We can do this by sharing
HPLaptop “Local Area Connection”:
(config)# ip domain-lookup
http://tools.cisco.com/ITDIT/CFN/jsp/index.jsp
# format flash:
If there is error formatting the flash (no device available), we have to erase flash first:
# erase flash:
# format flash:
VPCS
http://www.gns3.net/documentation/gns3/adding-hosts-to-your-topologies/
vpcs can get an IP address from a DHCP server when the program starts up
Idle-PC value
This is from a tutorial on gns3 website:
“Potentially, better Idle-PC values are the ones with the highest values between the brackets. Choose
one of the values with an asterisk” -> try the highest values in the brackets and the values with asterisk
Adjust memory
- R.click the router / memories and disks
+ RAM size
+ NVRAM size
- People said that the max configurable value of flash memory is 99 only (can’t adjust above)
File system
Besides pcmcia disk 0 which is flash memory, we can utilize pcmcia disk 1 as another file system storage
Change terminal type
- edit/preferences...
- general/terminal settings
# write
5. done
Emulating Switch
- To emulate switch, there are 2 ways:
+ Use 36xx series or 37xx series, then add module NM-16ESW into one of the slots
I don’t know why on my GNS3 program, only 3640 router with module NM-16ESW can issue the
command “switchport …”. Others don’t have this command.
I think the main reason is because we didn’t go into one of the ports residing on the switch
module.
Basic configuration
# vlan database
+ Edit *.net with Notepad and replace nio_gen_eth:\device\npf_{…..} by the one just been
found above, then save the file
- If we run it only using python "/opt/GNS3/gns3" , we may get any of the Dynamips error message
below (depending on the operating system you use):
- Getting started:
+ Step 1 – Dynamips
+ Step 2 – General
* PathsProject directory : /opt/GNS3/Project
+ If you have many devices, while starting all at same time , it will choke you CPU.
-> Delay between each device start when starting all devices:
5 seconds
Use in GNS3
- Get the source files available:
+ asa842-initrd.gz
+ asa842-vmlinuz
+ RAM: 1024 MB
+ Number of NICs: 6
+ Initrd: C:\ASA\asa842-initrd.gz
+ Kernel: C:\ASA\asa842-vmlinuz
# write
CPU Usage
- There is no idle PC, use 3rd party software instead. The name is “BES – Battle Encoder Shirase”
http://mion.faireal.net/BES/
# int g0
# no shut
# nameif inside
+ security-level 100
- Install it
References
http://www.gns3.net/documentation/gns3/pix-firewall-emulation/
VoIP Topology
Make sure your router has at least 256 MB RAM -> use 7200
Case 1
Even though there is no switch in between, the softphone still registers with the router and everything
works fine
Case 2
Before we process with an explanation of how to build a VoIP topology with GNS3, we need to
understand one important thing. An IP phone uses an IP address of the host which the phone is running
on (this is # from a hardphone). This means we can only have one softphone configured within one OS. If
there are multiple IP softphones running, they all have the same IP address. As a result, to have more
than one softphones, we need to have a virtual machine running another OS (for ex: running 2 virtual
machines will provide us with 2 more softphones)
The cloud on the right uses a loopback (as an alternative, it can use the real network interface). The one
on the left is using a vmware network adapter in NAT mode (we can’t run in bridged mode because this
mode needs a physical adapter involved). To make life a bit simpler (on the left branch), we can
represent it as:
(192.168.80.202 is the IP address of Windows XP (also of a softphone))
Note that the XP virtual machine receives IP address from DHCP server which is the VmWare. We can
disable VmWare DHCP server so that windows XP (also the softphone running on it) can receive the IP
address from the CME R2 router). To do that, in vmware choose edit / virtual network editor / choose a
vmware adapter / deselect “use local DHCP service to distribute IP address to VMs”
Case 3
According to what we said the case 2 above, in order to make this topology work, we can use either
scenario below:
C2 uses a physical adapter, C3 uses a vmware adapter (nat mode), and vice versa
C2 uses a loopback adapter, C3 uses a vmware adapter (nat mode), and vice versa
Troubleshooting
An IOS crashes
When we start an IOS, if it crashes with the message “Connection refused...”, it’s the problem with the
IOS -> try another IOS
GNS3 Doctor
gns3 installation troubleshooting: help / gns3 doctor
-----------------------------------------
REFERENCES
1. The book of GNS3