Professional Documents
Culture Documents
Tutorial: Building GNS3 Multiuser Environment: VNC VNC VNC
Tutorial: Building GNS3 Multiuser Environment: VNC VNC VNC
This tutorial show you how to build GNS3 multiuser environment. Following GNS3 features are
tested in this setup:
• Users can create, save and open their own labs regardless other users
• Projects can be used
• Packet Capture can be used with WireShark
GNS3 Server
VNC VNC
VNC
In this tutorial we don't use remote hypervisor functionality because of it's limitations. Projects
cannot be used with remote hypervisors. This is too big problem so I decided to implement this
other way.
Basic idea is to run GNS3 locally on server. Users connect to server via Remote Desktop
connection (VNC).
1 Installing Linux
First you have to install some operating system. Here we use Ubuntu 8.10
desktop. Well, install operating system ;) In this distro default username is
”user”. If you wan't to use some other username you have to replace
”user” in all commands with username you are using.
• Enable root account:
• System -> Administration -> Users and Groups
sudo vi /etc/X11/gdm/gdm.conf
# The greeter for xdmcp logins, usually you want a less graphically intensive
# greeter here so it's better to leave this with gdmlogin
# RemoteGreeter=/usr/lib/gdm/gdmlogin
• Add this:
service Xvnc {
type = UNLISTED
disable = no
socket_type = stream
protocol = tcp
wait = yes
user = nobody
server = /usr/bin/Xvnc
server_args = -inetd :1 -query localhost -geometry 1024x768 -depth 16 -once -
fp /usr/share/fonts/X11/misc -DisconnectClients=0 -NeverShared passwordF
ile=/root/.vncpasswd -extension XFIXES -SecurityTypes none
port = 5901
}
• Restart xinetd
sudo /etc/init.d/xinetd stop
sudo killall Xvnc
sudo /etc/init.d/xinetd start
3 Installing GNS3
Install GNS3 to the server by following tutorial GNS3-0.5-tutorial.pdf.
Tutorial can be found at GNS3 website. Follow steps 1 and 2 in chapter
GNS3 Quick Start Guide for Linux Users.
After that steps 1 and 2, copy whole GNS3 directory to the /usr/local and
chage it's owner.
sudo cp /home/user/Desktop/GNS3-0.6-src/ /usr/local/ -R
sudo chown root /usr/local/GNS3-0.6-src/ -R
You can remove GNS3 directory and downloaded package from user's desktop.
Create laucher on users desktop:
4 Install wireshark
• Open Package Manager (System -> Administration -> Synaptic
package manager)
• Search using keyword wireshark
• Select wireshark
• Mark for installation
• Press mark and Install with apply button
5 Adding Users
Because of multiple dynamips processes running on the same server at the
same time you have to modify some GNS3 settings. You have to ensure
that following things are not overlapping between users:
• Hypervisor ports
• UPD ports
• Ports for Console connections
# This script adds new GNS3 user to the system. User specific settings and directorys are
created.
read UserName
read HV_port
read HV_base_UDP
read HV_base_console
useradd $UserName
passwd $UserName
mkdir /home/$UserName/
mkdir /home/$UserName/GNS3_labs/
mkdir /home/$UserName/GNS3_labs/.dynamips_wd
mkdir /home/$UserName/.gns3
touch /home/$UserName/.gns3/gns3.ini
mkdir /home/$UserName/GNS3_labs/.capture_files
mkdir /home/$UserName/Desktop
cp /home/user/Desktop/GNS3.desktop /home/$UserName/Desktop/GNS3.desktop
###
HV_port=$1 HV_base_UDP=$2 HV_base_console=$3 UserName=$4
echo "[Dynamips]"
echo "hypervisor_path=/usr/local/GNS3-0.6-src/dynamips-0.2.8-RC2-
x86.bin"
echo "hypervisor_port=$HV_port"
echo "hypervisor_baseUDP=$HV_base_UDP"
echo "hypervisor_baseConsole=$HV_base_console"
echo "hypervisor_udp_incrementation=100"
echo "hypervisor_working_directory=/home/
$UserName/GNS3_labs/.dynamips_wd"
echo "[IOS.images]"
echo "4\filename=/usr/local/GNS3-0.6-src/images/c7200-a3jk9s-mz.124-
21a.bin"
echo "4\chassis=7200"
echo "4\platform=c7200"
echo "4\hypervisors="
echo "4\default_ram=256"
echo "4\idlepc=0x60659264"
echo "4\default=true"
echo "[Capture]"
echo "working_directory=/home/$UserName/GNS3_labs/.capture_files"
One IOS is added here. You should replace this with your IOS image and place your image to
this folder.
• Change permissions of script files to executable
• You have to manually make text file where port numbers are allocated.