Escolar Documentos
Profissional Documentos
Cultura Documentos
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).
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
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
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:
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
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
Following settings have to be equal for all users: IOS image directory dynamips directory ...
Configuring first user's settings Create new textfiles to users home directory. Paste following Scripts into files:
new_GNS3_user.sh
# This script adds new GNS3 user to the system. User specific settings and directorys are created. ##### Asking New username and other user specific info: echo 'Please type new username:' read UserName echo 'Please type hypervisor base port:' read HV_port echo 'Please type hypervisor base UDP port:' read HV_base_UDP echo 'Please type hypervisor base Console:' read HV_base_console
# Creating directory for GNS3 Configuration file mkdir /home/$UserName/.gns3 chown $UserName /home/$UserName/.gns3 touch /home/$UserName/.gns3/gns3.ini
# Copying Laucher to the Desktop mkdir /home/$UserName/Desktop chown $UserName /home/$UserName/Desktop cp /home/user/Desktop/GNS3.desktop /home/$UserName/Desktop/GNS3.desktop chown $UserName /home/$UserName/Desktop/GNS3.desktop
###### Creating gns3.ini file ####### ./new_GNS3_ini.sh $HV_port $HV_base_UDP $HV_base_console $UserName >> /home/ $UserName/.gns3/gns3.ini
new_GNS3_ini.sh
###### Creating gns3.ini file ####### echo "[GNS3]" echo "project_directory=/home/$UserName/GNS3_labs" echo "ios_directory=/usr/local/GNS3-0.6-src/images"
echo "[Dynamips]" echo "hypervisor_path=/usr/local/GNS3-0.6-src/dynamips-0.2.8-RC2x86.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.12421a.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"
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.
User ------test1 test2 test3 Hypervisor base port -------------------7210 7220 7230 UDP NIO base port ---------------11000 12000 13000 BaseConsole ----------2000 2100 2200
When you want to add new user run new_gns3_user.sh as root Try to login and greate lab! (Connect VNC session to port 5901) You may have to change session settings when logging in VNC first time. Select gnome session from settings menu in standard ubuntun login screen.