Feature request #1

Dynamips Management Server

Added by Benjamin GNS3 almost 3 years ago. Updated almost 2 years ago.

Status:Assigned Start date:05/24/2011
Priority:Moderate Due date:
Assignee:jeremy menetrier % Done:

0%

Category:- Spent time: -
Target version:0.8.4

Description

Developing a server for managing Dynamips instances on a remote machine with GNS3 as a client console. The server must be scalable and optimized in order to serve a maximum of clients with a maximum of Dynamips instances.

Each server can run an instance of Dynamips with locally available Cisco IOS images.
Each client can configure a list of DMS, it must attempt to retrieve the list of remotely available CISCO IOS images. If more than one server can serve a given image, the client must choose the best server in terms of: memory, bandwidth, priority and load. These settings can be tuned for each DMS.

Requirements:

- They changed, look at the updates

This must replace the old implementation using an external Dynamips Hypervisor.

Screen_Shot_2012-02-26_at_12.40.20_PM.png (21.7 KB) jeremy menetrier, 02/26/2012 01:40 pm

History

#1 Updated by Benjamin GNS3 almost 3 years ago

  • Assignee changed from Mickael GNS3 to Alexandre GNS3

#2 Updated by Benjamin GNS3 almost 3 years ago

  • Status changed from New to Assigned

#3 Updated by Benjamin GNS3 almost 3 years ago

  • Assignee changed from Alexandre GNS3 to Hassen GNS3

#4 Updated by Benjamin GNS3 over 2 years ago

  • Assignee deleted (Hassen GNS3)

#5 Updated by Benjamin GNS3 over 2 years ago

  • Status changed from Assigned to New

#6 Updated by Jeremy GNS3 about 2 years ago

Something interesting related to this task: http://forum.gns3.net/topic4062.html

#7 Updated by Benjamin GNS3 about 2 years ago

  • Assignee set to jeremy menetrier

Please keep this task up to date.

#8 Updated by Benjamin GNS3 about 2 years ago

  • Target version deleted (1)

#9 Updated by Benjamin GNS3 about 2 years ago

  • Target version set to 0.8.4

#10 Updated by jeremy menetrier about 2 years ago

Project requirements

Network

  • TCP/IP protocol with IPV4/IPV6 dual stack sockets
  • Obviously, multiplateform.

Server Discovery

  • Multicast utilization to discover available image servers on the network. (not a priority)
  • XML information retrieving : the server send an image list along with their MD5 checksums for example.

House Keeping

  • Auto configuration handling : the administrator provide a network port + an os image folder but a configuration will override this.
  • Add an heuristic to define a way to evaluate the healthness of the server : gather CPU, RAM, Disk and Swap usage to create an healhness percentage. Hence, if the server is 0.1 the server is healthy but if he's like 0.9, the server is busy and should be used in a last resort.
  • Emulation : will follow the method already done by the client : Create a new process of Dynamips with correct parameters.

Protocol

  • Ascii protocol.

Misc

  • Usage of syslog as log mechanism

Communication entre les routeurs, serveur et client GNS3

The server will ony have one TCP incoming/outgoing port.

On the other hand, this one will also have an UDP port binded on localhost for each emulated routers.

Therefore, each UDP packet transmitted from a router will have to go through the associated UDP port to the server UDP port and will be retransmitted to the client via the server TCP port.

Schema (due to formatting problem here, i've put a screenshot) :

(See attached file)

Each packet transmitted to the client will therefore have a different token specifying the router emitting.

Example :

The client request the list of emulated instances by the server. The server send back something like :

 1<list>
 2    <instance>
 3        <id>0</id>
 4        <idle>0.8</idle>
 5    </instance>
 6    .
 7    .
 8    .
 9</list>

And then for each received paquet, the client will fetch the instance token in the received packet and will find the associated informations.

Normally, i would use C++ with basic platform instruction (Unix sockets, etc ...).

CMake will be used to configure the project and generate the makefile.

#11 Updated by Benjamin GNS3 about 2 years ago

This could be a wiki page (then just link to it here).

Comments:

Dual stack: OK
TCP: OK
UDP Multicast on the GUI: OK
Master/Slave: NOT OK, only the GUI should know what servers are available and receive the performance indications and decide what to do
XML information retrieving: OK
Auto configuration handling: OK, but a config file should override this and provide more settings (what perf indice to send for security, some limits, list of images dirs, etc)
Auto check of dependencies Qemu + VirtualBox: What??
Evaluate the healthness of the server: OK
Ascii protocol: OK
Create a new process of Virtualbox or Quemu with correct parameters: We're talking about Dynamips right? But yes, kind of the same. So that it works :)
Usage of log mechanism: See each system's logging facilities, use syslog on unix, it already provides some levels of logging and more flexibility (can send the logs on a remote log server).

Communication entre les routeurs, serveur et client GNS3

Communication between routers, servers and GNS3 clients

  • host the images on the redmine (Section Files)
  • you forgot the control port for dynamips right? access to the console? UDP is only for the data coming out of the guest's NIC.
  • again, we're working with dynamips only, though it can be interesting to stay modular for the future, don't waste too much time thinking about qemu and vbox

Globally it's good, fix the little details and make it a wiki page. You will still need to find out the technical details, what language to use, what modules/libraries, etc. Keep it simple, portable and with no extra dependencies. Marc will finish his sqlite DB for the IDLE PC soon (See #32), you will need it I think, see with him where this should belong. After that I'll review everything again and ask for JeremyG's OK.

cheers

#13 Updated by Benjamin GNS3 about 2 years ago

Jeremy edited his protocol description. Looks OK (better).

What language/lib do you think is best to use and why?

#14 Updated by jeremy menetrier about 2 years ago

The project will finally be in python.

Also, i do not think there will be dependencies on external libraries. Sockets are portable via python as is the support for syslog.

The design will come ASAP but if you have remarks, do not hesitate to update this issue.

#15 Updated by Jeremy GNS3 about 2 years ago

I think the project requirements mostly make sense and this is ok but I have a remark that could change the overall communication design. What if our IOS routers, running on the server want to communicate with other IOS/Qemu/VirtualBox VMs on the local client? Those clients require UDP tunnels to communicate with other VMs.

If we want to allow this and maintaining our unique TCP port, it would mean that we have to "collect" the UDP connections and aggregate them to transit, using TCP, to the server. Sounds a little complicated isn't? We could also let the clients connect freely between them, this just could be problematic if there is a firewall.

This is at this point that I've stepped back to think again about the whole task and goal. I am now wondering if we are trying to do something too complicated or if we have been over-thinking it. Think about it, our main priority is to allow teachers to use GNS3 for their classes/labs without distributing IOS images to their students, which would be illegal. Our second priority is to ease the set up of GNS3 in teaching environments.

Here we want to run emulation on one or more server, this is a centralized model. This is the opposite of a distributed model, where the emulation runs on the clients. Nowadays, most PCs are powerful enough to decently run many VMs. This is something to consider even if the current tendency is to run apps in the "Cloud" and have thin clients (tablets etc.). This might start to be philosophical, so here is what I have in mind:

What if we leverage a remote file system technology (NFS but better ...) and make a server, discovered by the clients, that distribute XML files giving them the location of IOS/VMs files on the remote file system, parameters such as IDLE PC (from the DB), RAM etc. Everything to automatically set up the teaching environment, managing limits (we can have more than one remote file system). This would put some stress on the network as images are remotely accessed but I think most of LANs can handle that.

This also brings some advantages like we could also serve remote Qemu or VirtualBox virtual hard drives that contain copyrighted material and that cannot be distributed either.

The server should still be multi platform, but if we can't for whatever reason, it should run in priority on Linux/Unix. It would be nice to support more that one remote file server techno too. I am currently running IOS images residing on a Windows remote file system and this work well.

I am aware that I break a lot of thinking and plans here, but this is best to discuss this now rather than at the end of development, after someone has banged his head against a wall.

Please let me know if this is me who is saying bullshit as it is 1:30am here and I am very tired ;) I'm willing to talk more and maybe develop the idea before heading to the right path.

#16 Updated by Benjamin GNS3 about 2 years ago

What if our IOS routers, running on the 
server want to communicate with other 
IOS/Qemu/VirtualBox VMs on the local client?

As you guessed, the server will maintain the UDP connections. This schema shows what it will manage: http://redmine.gns3.net/attachments/25/Screen_Shot_2012-02-26_at_12.40.20_PM.png

Sounds a little complicated isn't? We could 
also let the clients connect freely between 
them, this just could be problematic if there 
is a firewall.

It doesn't have to be implemented in a complicated way, imagine a sendToGns3(instance, data) function + 1 more socket per instance and your basically done. Being firewall friendly is crucial for us (I will explain later).

Nowadays, most PCs are powerful enough to 
decently run many VMs.
[...]
What if we leverage a remote file system 
technology (NFS but better ...) and make 
a server, discovered by the clients, that 
distribute XML files giving them the location 
of IOS/VMs files on the remote file system, 
parameters such as IDLE PC (from the DB), RAM etc. 

If you mount a NFS on your host, you distribute the files. Ok it's automated, but I am not sure it makes the whole process legal.

I am aware that I break a lot of thinking 
and plans here, but this is best to discuss 
this now rather than at the end of development, 
after someone has banged his head against a wall.

Now let me convince you that the original plan is not that bad:

  1. Distribute the load on several servers, useful for big universities/schools (like EPITECH) who want to serve a lot of students with potentially complex topologies.
  2. Completely remove all legal issues concerning IOS distribution (outsourcing of licensing issues to the server maintainer and not the end users).
  3. Firewall friendly: EPITECH for example, has many schools in France, so it will go across the WAN and many networks, it will be a nightmare if we allow direct connections from the "countryside" (troll inside) to Paris. Open one port and redirect it on a pool of servers owned by the network lab will make things very very very easy and sexy.
  4. The GNS3 client will be able to auto-configure itself if it's on the same LAN network as the server(s).

Your proposed solution will not bring the same advantages that are crucial for the deployment of GNS3 on a bigger scale than a controlled LAN. I know our solution looks rather complex, but I am sure that JeremyM can do it. We have to take some complexity out of the users, and put it in the code.

In the end, the server will just be a virtual switch between Dynamips and GNS3 while providing some useful side features to users (as multicast discovery, high level load balancing to use the best server, no legal issues, ease of configuration, ...).

our main priority is to allow teachers to use 
GNS3 for their classes/labs without distributing 
IOS images to their students, which would be 
illegal. Our second priority is to ease the 
set up of GNS3 in teaching environments.

This will be done, the only configuration that would be needed in case the server is on another network is just: set up the IP/port of the server. And boom, you can begin to use Dynamips and make complex networks.
Machines are fast enough, but what if they want to simulate complex real-life topologies in order to test a deployment on a very large network? They will have enough servers to make it possible, but I doubt they will have a workstation that powerful and want to make noise on their network (if they have accounting or netflow it will get nasty with many UDP connections).

I really think this all makes sense and can be awesome, so I hope I convinced you!

@JEREMYM: Protocol should be Binary since you encapsulate binary data (UDP packets), it won't be readable.

#17 Updated by Alexey Eromenko about 2 years ago

I don't see the need for this feature at all. This is because GNS3 has already a distributed architecture.

What will Dynamips Server provide, that we don't have already ?

Today you can:
1. Connect to several Dynamips Servers from one GUI
2. You can target all Dynamips Servers to use same IOS image from central storage (NFS/SMB Windows File Share)

-Technologov

#18 Updated by Jeremy GNS3 about 2 years ago

What will Dynamips Server provide, that we don't have already ?

It is not easy to do manually, first you have to manually start Dynamips hypervisors on a remote server and you will need more than one if you want to emulate many routers etc. Secondly, think teaching environment context, we cannot let students connect to any available hypervisor, we want to share the resources, grade student labs etc. We do not want it to be a total mess.

You can target all Dynamips Servers to use same IOS image from central storage (NFS/SMB Windows File Share)

Yes we can, but here we want to ease the set up of GNS3 in a teaching environment, student shouldn't lose time setting up images, idlepc etc. and teachers don't want to spend time troubleshooting student's configuration issues.

#19 Updated by Jeremy GNS3 about 2 years ago

I really think this all makes sense and can be awesome, so I hope I convinced you!

Yep you did. I agree my idea has many flaws. I also wanted to make sure you really thought about it before starting any development, I see you did ;) I was just afraid that we head in the wrong direction and if we had been over-thinking the whole task. I hope you will be able to complete the task before the end of the EIP, I mean have a killer solution that will be a reference ;)

#20 Updated by Benjamin GNS3 about 2 years ago

@Jeremy: Thanks! I really think this can be done in 2 months (at least, the basic implementation), a lot of code can be copied and shared and python is powerful.

@Technologov: This is a 'Management' server, so it will work on top of Dynamips. It will make things simple for users and make GNS3 more suitable to use in some teaching environments. I know it's hard to see exactly what's going on on this task, we talked a lot about it before (we started in July last year).

What will Dynamips MANAGEMENT Server provide, that we don't have already ?
  • One single TCP port aggregates all connections related to Dynamips (data and control ports) -> firewall friendly for remote users
  • UDP multicast for server discovery -> auto-configuration of GNS3 to use Dynamips and get the image list
  • High level load balancing (based on different configurable restrictions, either detected or written in the conf file) -> choose which DMS to use, enables automated scalability
  • Will integrate the new IDLE PC database and will set it properly
  • Will help manage the available images on the server and on the GUI -> No user interaction on the server side and easy set up on the client side (show unique names for the images and choose which server to use for each instance)

Once this task is completed, we will be able to set up GNS3 in one of the biggest computer science teaching institute in France. Which is part of our project. I believe it can benefit to many other teaching environment and even professionals who need to easily simulate a big network and check their configurations.

From PoC to real life, we may need to enable authentication, but first we should concentrate on making it work simply. It's easy to add later.

#21 Updated by Benjamin GNS3 almost 2 years ago

  • Status changed from New to Assigned

Also available in: Atom PDF