I. Research & Engineering Projects

1. VisualVNC

Back

Dec 2012 - Mar 2013

BUAA, Key Laboratory of Beijing Network Technology

Project Description: The project mainly researched on the connectivity problem between virtual cloud platforms like VMware vSphere, Xen and virtual device simulation tools like GNS3, inlcuding designing the tunnel protocol and routing algorithm for data packets between virtual network and physical network. We implement a prototype system based on principles of VPN and NAT.

Responsibility: I focus on the design work of protocol encapsulation and routing algorithm, the rule deployment scheme of virtualized network configuration and implementaion of routing driver in Windows written by NDIS programing.

Introduction: VisualVNC stands for VISUAL Virtual Network Connection system. Its functionality is to map the real machines into the virtual hosts in GNS3 or eNSP. GNS3 and eNSP are softwares that can simulate various devices such as routers, firewalls and switches which construct a virtual network. VisualVNC is composed of two parts, an application-level MFC controller side and an NDIS intermediate driver. All machines installing VisualVNC are divided into two categories: Center Machine and Margin Machine. Center Machine is the machine which runs GNS3 or eNSP. Margin Machine is the machine which is mapped to the node in the virtual network. The controller parses a rule file to decide which role the machine plays and sends instructions to the NDIS driver. The driver encapsulates and forwards the packets received or sent by the machine. We developed a protocol named VEP to encapsulate the orginal ethernet frame and sent the VEP packet through the real network. At the other side the packet is decapsulated and received by the machine.

Languages used by VisualVNC are:
C/C++

Techniques used by VisualVNC are:
MFC for UI
BCGControlBar for UI
Winsock API for communications between Center Machine and Margin Machine
IPHelper API for network adapter information retrieval

Languages used by VNCPassthru are:
C

Techniques used by VNCPassthru are:
WDM Framework
NDIS Framework
Passthru example

Usage:
1) Install VisualVNC in at least two machines, one for Center Machine and at least one for Margin Machine.
2) Edit the file "Rules.txt" in the "data" directory of each VisualVNC copy. CIP means Center IP, set the outgoing IP of Center Machine to it. VIP means the IP of Margin Machine in the virtualized network, you modify it according to your virtualized network design. PIP means the IP of Margin Machine in the phisical network, set the outgoing IP of Margin Machine to it. IMAC means the internal adapters of Center Machine binded with GNS3 or eNSP. You bind a IMAC adapter with a Margin Machine, so according to your bindings, you will know which one is the corresponding IMAC adapter. NIP means the ignored IP address, VisualVNC will not redirect a packet with the NIP.
3) Copy VisualVNC.exe from the "Debug" directory to the "dlls" directory, then execute it.
4) For Center Machine: Click the "Load Driver" button, the VNCPassthru driver will be loaded, you can check alive using the "Check Driver" button. Button "Read Rules" can display the content of "Rule.txt", which dosen't matter much. You must configure your IP to CIP in advance, and use "Confirm Status" to confirm your Center Machine state by watching the "Run Status" edit box. Then clicking "Write Rules and Start Driver" will write rules to VNCPassthru driver and start forwarding. you can view the debug information by using WinDbg. Detailed information for each packet is displayed. To stop the VisualVNC function, you first click "Stop Driver and Clear Rules", then click "Unload Driver", this will help you undo all previous steps.
5) For Margin Machine: The operation difference with Center Machine's is that you must configure your IP to PIP in advance, after clicking "Write Rules and Start Driver", VisualVNC will automatically help you change your IP from PIP to VIP. Clicking "Stop Driver and Clear Rules" will revert to its original state.
6) There're also some other tabs. Margin tab helps the Margin Machine manage its VIP and PIP, change MTU (because our protocol add 36 bytes to orginal packet, so the whole ethernet frame could have exceeds the link MTU, use the "Change MTU" button to change MTU to a smaller number automatically.) and retrieve information of adapters. Network tab can change IP and execute ARP query. Connection tab is a TCP function, I planed to distribute the "Rules.txt" file using this TCP function, but haven't finished yet. Debug tab is a test-case function, you can use it to send an arbitrary packet, using VEP protocol (our tunnel protocol) or not.

Useful links:
Download source from GitHub
https://github.com/hsluoyz/VisualVNC
BCGControlBar official website
http://www.bcgsoft.com
Microsoft Windows Driver Kit 7.1.0 download page
http://www.microsoft.com/en-us/download/details.aspx?id=11800

Pictures:



Fig.1. The topology of virtualized network.





Fig.2. The archtecture of the TCP/IP network, our tunnel protocol uses only data link layer and IP layer.





Fig.3. The rule file used by VisualVNC, There are two kinds of rules: core rules and mapping rules.





Fig.4. The UI of driver configuration.





Fig.5. The UI of MTU and adapter configuration.





Fig.6. The UI of IP configuration.





Fig.7. The UI of rule, server and client configuration.





Fig.8. The UI of VisualVNC.





Fig.9. The virtualized network of GNS3.





Fig.10. The virtualized network of eNSP.





Fig.11. The packet stream captured and forwarded by VisualVNC
Back