Sunteți pe pagina 1din 22

Server Sandbox

A tool for teaching computer networking and parallel


processing to high school and college students

Kolton Yager 2015


Senior Project Edition

Table of Contents
I. Introduction
II. Goal

III. Sandbox Basis


1.
2.
3.
4.
5.

Basic Tools and Equipment


Design Overview
Master Computer
Sandbox Computers
Connecting

IV. Computer Networking


1.
2.
3.
4.
5.
6.

General
FTP server
Web Server
Database
Game Server
Data management

V. Parallel Computing
1.
2.
3.
4.
5.

Summary
Python Examples
Lower-Level Languages
Logical Theories
References

VI. Suggested Setups


1.
2.
3.
4.

Basic Networking
Parallel Computing+
Render Farm
Extreme

VII. Management & Use


1.
2.
3.
4.

Master Computer
Dedicated Manager
Sign-up Schedule
Class Integration

VIII. Conclusion

IX. Future Editions


1.
2.
3.
4.
5.

Detailed Outline of Server Configurations and Starting Points


Fully written and tested management scripts and programming
Custom lightweight Linux Ubuntu OS for Management
Pre-prepared server images and example code
Greater Resources for Learning about Encryption and Security

Terms & Definitions


Computer Networking: A blanket term defining the communication of data between one or more electronic
device. In this paper it is assumed communication is accomplished using modern methods, protocols, and
tools.
Operating System (OS): The software that acts as a platform for all of a systems software, accessed through the
computer BIOS. Examples: Windows, Linux, OSX
Server: A computer system which communicates with other systems, acting as an information hub. It sends and
sometimes receives data from multiple other systems and serves a wide range of purposes.
Client: A computer system which communicates with a server in order to carry out some task and/or retrieve
some information.
Parallel Processing: The use of multiple processing cores, devices, or multiple computers to solve smaller parts
of a large problem simultaneously.

Introduction
Computer Networking is a fundamental part of almost all modern technology. It is
absolutely critical to the function of home computers, mobile phones, business and scientific
applications, and much more. Modern technology is largely defined by the power and use of
computer networking. The internet is a massive computer network, and is used by nearly all
consumer and business devices to communicate worldwide. Computer networking enables web
browsing, cloud file storage, email, video streaming, gaming, and so much more. It's impossible to
overstate the importance of computer networking to modern technology, yet the number of
educational resources on the topic of computer networking are severely limited in many high
schools. Part of the problem is due to the difficulty and risk involved with setting up computers in
a way in which students can gain hands on experience with the topic. Most computer networks
use a selection of specialized equipment and computers which can be expensive, difficult to setup,
and are not in a condition in which they can be experimented with. Allowing experimentation on
networks already in use would generally be considered a huge security risk. As a result, very few
people get to experiment with many aspects of computer networking outside of an internship.
While many people will eventually get the opportunity to interact with computer networking in
college or as part of their career, this lack of education in secondary education limits students
opportunities to understand one of them most important aspects of computer engineering and
computer science.

Goal
The goal of this paper is to outline a detailed plan for creating a Server Sandbox, which is
a collection of computers that can be easily setup in various network configurations and used to
provide hands on computer networking and parallel computing experience. The goal of the
Sandbox is to provide greater educational opportunities for learning about computer technology
to a wide variety of students and institutions. The overarching Sandbox design is flexible
requiring only a few mandatory materials and allowing for a wide variety of configurations that
will fit various budgets and interests. This paper will outline the basics of constructing and using
a sandbox, as well as describe various possible configurations starting with the least expensive
and most basic configurations, then moving on to more expensive and more specialized versions.

Sandbox Basis
The fundamental idea behind the Sandbox is to have a set of computers linked together by
either cables or wireless connections. All of these computers are ultimately connected to one
master computer which manages all the other computers and does not participate in any network
experimentation. At the beginning of any experiment or activity with the Sandbox, the master
computer is used to configure the others. When activities are completed, the user can either
choose to reset the systems, losing any changes, or save the updated instance of the network to
the master computer.

Basic Tools and Equipment

Server Sandboxes are designed to be as inexpensive as possible but certain equipment will
be necessary in any case. The following lists all of the necessary and many of the optional items
for creating a server Sandbox. Information about how each item is used will come later in this
section.
+: Or more, *: Special Condition, dep: Dependent on number of computers in Sandbox

Name

Necessary?

3+

Desktop PC with standard components*(see bottom of page)

Yes

500 GB or greater hard drive with best Read/Write Speed Affordable

Yes

dep+

Ethernet Cables

Yes

1+

Unmanaged Network switch with 3+ Ethernet Ports *Choose between this


and a managed switch/router. This is generally cheapest.

Yes*

1+

Managed Network switch or router with 3+ Ethernet Ports *Choose


between this and a managed switch/router.

Yes*

Computer Monitor for Master Computer

Yes

dep+

Computer Monitors for Sandbox Computers

Recommended

dep+

Keyboards

Yes

1+*

Mouse *Some sandbox computers may be accessible using the keyboard


only.

Yes

1+*

USB memory stick with 4GB capacity or greater *Having one for each
computer is convenient but not imperative.

Yes

dep+

Graphics card

No

Internet modem or other internet connection

No

Expected components: Motherboard, Hard Drive, USB Ports, Processor, RAM, Power supply, Ethernet ports, Power cable, Case

Design Overview
The master is setup with a computer monitor, keyboard, and mouse. The master is then
connected to either a switch or a router. The sandbox computers should be setup with a keyboard
and monitor and connected to the same switch/router. Each sandbox computer then boots into a
lightweight Linux based imaging mode where it can receive a new configuration from the master
computer, and upload any changes the user wishes to save. The master computer should always
be booted into it's own Linux based OS that contains the scripts necessary for sending
configurations to the sandbox systems. It's large hard drive is used to store basis configuration
archives, full hard drive images from sandbox systems, and other backup files for hard drive
images. More on all of these details in the following section. Before using the sandbox, users will
use the master computer to configure sandbox systems appropriately. Once configuration is
completed, the user will reboot all sandbox systems into their configured state. Now the user can
experiment with the sandbox systems as they wish. Once done with the systems, users reboot the
system back into imaging mode and either reset the systems completely, or upload their changes
to the master computer.

Master Computer
The master computer is a critical part of the Sandbox design and requires a great deal of
setup in order to function properly. The purpose of the master computer is to manage all of the
sandbox computers and act as storage for the entire setup. As a result, the master computer
should have a hard drive of the greatest capacity and read/write speeds affordable. It should have
only a single Linux OS installed which will be setup for optimal management of the sandbox.
Managing sandbox computers relies on a few fundamental tools which are built into the
operating system. The first is the ability to image hard drives over the network. Using the simple
terminal commands of dd and netcat full copies of hard drives can be created as single archive
files and stored. These same commands can also be used to re-copy the images back onto
sandbox systems. This functionality allows the master computer to store a wide variety of images,
and store a history of each revision to the computer's configuration. The second key tool is Secure
Shell access (ssh). This command allows remote control of sandbox computers as long as they are
running a Linux OS. This functionality, combined with some scripting allows the remote
shutdown, restart, and management of all sandbox computers. However, if the sandbox
computers are not running a Linux OS, these operations will likely need to be done manually on
each sandbox system, though alternatives may exist.

Recommended File Structure


Any person in charge of managing the master computer can decide on whatever file structure and
system they find to be the most convenient for them. However, it is recommended that images
and scripts be stored in the following way. All files relating to the sandbox should be kept in a
single folder named Sandbox. This folder can be placed almost anywhere, but should be on the
largest hard drive available. Inside should be three folders: management, images, and baseconfigs.
The management folder should contain any executable files used for managing the sandbox. If the
manager of the sandbox has acquired or created GUI tools for sandbox management they should
exist within this folder, with any scripts located in a subfolder entitled as such. If scripts alone are
being used, they should simply be within the management folder. These scripts and programs
should be added to the systems environment variables so that they can be accessed easily. Within
the images folder, should be a folder for each different server configurations. For example, if you
have one configuration for the sandbox that behaves as an FTP server, you would have a folder
called FTP. Inside this folder you would have an image file named current.img, and a folder named
history. The current.img is the image for the most recent version of the configuration. The history

folder should hold previous versions of the configuration in the format of (config name)(Date).img. For example, a previous version of the FTP server from Febuary 29 th 2015 would be
named FTP-02-29-15.img. Finally, the base configs folder should hold a set of folders similar to
that of the images folder. Within each subfolder should be whatever files are needed to prepare a
computer for a certain server configuration. Using the FTP server as an example again, within the
folder labeled FTP would be all the software and scripts necessary to setup a Linux FTP server.
This does not include any system files. These base configs are used to prepare a system for use.
Once the system is setup with these files, it can be imaged so that no setup has to be done the
next time the configuration is used. For summary, the overall file structure is as shown below.

Dependencies
The master computer should have a number of software dependencies satisfied before
use. It should have the software required for dd, netcat, and ssh, which should come installed on
the Linux OS. With these tools all necessary management should be possible. However, it is also
recommended that a wide variety of compilers, libraries, development kits, and IDE be installed
as well. This will make it possible to write new code and scripts for the sandbox easily.

Sandbox Computers
The sandbox computers can contain a wide variety of hardware in order to optimize the
functionality of the sandbox. For example, if a sandbox is expected to work on graphics
computations in parallel, it is likely each sandbox computer will contain a graphics card, however,
another sandbox only focusing on networking would not. Due to the wide variety of purposes and
hardware these computers have, they have very few requirements to function as a part of the
sandbox. In order to function properly the basic sandbox computer simply need the expected
components listed previously. Besides these components, the only necessary element of the
sandbox computers is the imaging mode OS. There are a few ways to keep this mode accessible to
sandbox computers, however, the recommended method is to keep a small USB drive with the
imaging mode OS installed plugged into each computer at all times, either internally through an
expansion card, or externally at the back of the case. This USB should be bootable and selected as
the default boot device for the system. Instructions on how to create these bootable USB drives
can be found many places online.

Imaging OS
The imaging OS requires very few tools, and most should be satisfied by any Ubuntu based
OS. Similar to the master computer OS, the imaging OS will need dependencies for the dd and
netcat commands. It is also recommended that a partition editor such as Gparted be included for
managing hard drives.

Connecting
Connecting the Sandbox and Master computers can get complicated and the setup must
change depending on the tools and hardware being used. The simplest setup uses an unmanaged
switch (Ethernet Bridge). In this setup The master & sandbox computers are all connected to the
switch and the master computer should have a static IP set. This makes it possible to image to all
sandbox computers by creating multiple dd & netcat instances on the master and configuring the
command to accept any connections. Then use each of the sandbox computers to accept the
image using dd & netcat and targeting the master's static IP. The same method can be done using
a wireless bridge, however, this requires the additional hardware of a wireless bridge and
wireless cards or dongles for each sandbox computer. In both of these cases, it is also possible to
use ssh to execute the netcat and dd commands on the sandboxes remotely as long as their IP
addresses are known. It is also possible to set up the master computer to act as a DHPC server,
making it easier to control the IP addresses of the sandbox computers.
A managed switch or wireless router can be used as well and provide so advantages.
Routers allow you to manage your ports and DHPC, making the task of sending image data to the
right places a lot easier. With this setup, the router is used to assign static addresses to every
device, including the master computer. As a result, imaging can be automated easily as there will
be no confusion as to what IP addresses need to have images sent. This makes a great degree of
automation possible for imaging. This also makes setup of the sandbox computers in a server
client configuration easier as well, but more on that later.

Computer Networking
With all of the systems prepared for imaging and connecting through a switch, almost any
networking configuration can be created using the sandbox computers. This section provides
examples of how some common networking configurations can be setup using the sandbox.
However, this section does not provide full tutorials or instructions on who to create these
configurations as they can be created using a variety of techniques and software.

FTP Server
FTP servers are a good place to start when using a server sandbox due to their relative
simplicity. As a result of the protocols use in both personal and professional contexts, many
different FTP servers and clients exist. A simple FTP server can quickly and easily be setup on a
Linux installation using apt & vsftpd and many FTP clients are available for use by the other
sandbox computers. There are also a huge number of Windows FTP server packages available as
well, many of which are free.

Web Server
Web servers are recommended for use with server sandboxes but will likely have a large
learning curve as they are often far more complicated than FTP, and other servers. This being
said, there are a huge number software packages available for web server hosting, and the
knowledge derived from the experience is highly valuable in modern computer technology.
Running a web server alone requires a fair amount of setup, and using various aspects of modern
web design requires even more work and setup. You might start with a simple http & html server,
but eventually may wish to start writing more complicated scripts and page generators.

Game Server
Hosting various game servers might not sound like a good idea in educational contexts,
however, it is a good way to get students initially interested in computer networking. While some
games have server software that are too simple to teach computer networking concepts, others
will make it

Parallel Computing
Summary

The sandbox design also allows for experimentation with parallel computing by creating
an environment where multiple systems and processors can communicate. Parallel processing is
the act of taking a computational problem, splitting it into smaller pieces, and working on
multiple pieces simultaneously. Properly programming software to effectively utilize multiple
processors quickly solve a big problem is challenge few students are given the chance to tackle.
The server sandbox makes it possible for students to become familiar with simple parallel
processing through threading, as well as more complicated forms involving data being crunched
across multiple systems.

Python
Python is not the most sophisticated or powerful language out there, however, for the
purpose of teaching parallel computing to students it is a good starting point. Python comes
packaged with modules for parallel computing which support a wide range of methods and
configurations. The flexibility of the language in general, and the ease with which data can be
manipulated makes it perfect for demonstrating basic parallel computing concepts.

Logic & Theory


Place Holder Place Holder Place Holder Place Holder Place Holder Place Holder Place
Holder Place Holder Place Holder Place Holder Place Holder Place Holder Place Holder Place
Holder Place Holder Place Holder PlacePlace Holder Place Holder Place Holder Place Holder Place
Holder Place Holder Place Holder Place Holder Place Holder Place Holder Place Holder Place
Holder Place Holder Place Holder Place Holder Place Holder Place Holder Place Holder Place
Holder Place Holder Place Holder Place Holder Place Holder Place Holder Place Holder Place
Holder Place Holder Place Holder Place Holder Place Holder

References
Place Holder Place Holder Place Holder Place Holder Place Holder Place Holder Place
Holder Place Holder Place Holder Place Holder Place Holder Place Holder Place Holder Place
Holder Place Holder Place Holder PlacePlace Holder Place Holder Place Holder Place Holder Place

Holder Place Holder Place Holder Place Holder Place Holder Place Holder Place Holder Place
Holder Place Holder Place Holder Place Holder Place Holder Place Holder Place Holder Place
Holder Place Holder Place Holder Place Holder Place Holder Place Holder Place Holder Place
Holder Place Holder Place Holder Place Holder Place Holder

Suggested Setups
The server sandbox design is very general and can be used to create a wide variety of
setups which best serve various subcategories of computer networking or parallel computing.
The functions a sandbox setup is meant to specialize in changes the hardware and tools required,
often increasing the cost. This section outlines a couple of recommended setups: a low cost
option, a high cost option, and some specialized options.

Basic Networking
This is the lowest cost server sandbox setup. It is designed to be used for simple
networking and simple server/client setups. Activities and experiments must require little more
than a processor, RAM, and a hard drive. This setup can be constructed using cheap and simple
computers. For the sandbox computers, anything with a processor bench marked in the middle to
high range, 4GB of RAM or greater, and a hard drive of 100 GB or greater should be appropriate.
The master computer should be about the same, but with a hard drive of 1 TB or greater. This
setup should be able to support most server/client setups and parallel computations that do not
require an enormous amount of memory or processing power. Three to five sandbox computers is
recommended so that it is possible to have a networked server and at least one client. For
connecting these computers an unmanaged switch is recommended. Any switch should work as
long as it has enough ports for all sandbox computers and the master computer.

Parallel Computing+
This setup is designed to specialize in parallel processing across multiple computer
processors. This setup has the same hardware requirements as the basic setup but uses high end
processors. Powerful processors with at least four cores should be used. This enables the setup to
handle a greater load, and make better use of threading. This means that users will gain
experience with parallel computing across multiple systems, as well as across multiple processing
cores.

Render Farm
This setup is designed to specialize in the parallel processing of graphical computations.
This setup has the same requirements as the basic setup, but requires each sandbox computer to
contain a graphics card. Graphics cards are available with a wide range of features and range of
computing power. The power of the card and the resulting cost are entirely dependent of the
calculations being done, however, mid range cards should be able to sustain most computer
graphics experimentation.

Extreme Setups
This final setup attempts to describe more extreme versions of the server sandbox idea.
The most extreme iteration of the setup would primary feature sandbox computers with all top
tier components. This would enable any experiment to be run regardless of requirements. A
further extreme would be to use hardware specifically designed for severs and workstations:
server motherboards, cases, CPU, and GPU. This would more or less close the gap between the
sandboxes simulated server environment and a real one in terms of computing power.

Management & Use


Server sandboxes have the potential to be a powerful teaching tool, however, they they will
likely require oversight from an educational institution in order to serve this purpose. It is likely
that the management of each individual sandbox will have to be designed around the structure of
the institution housing it, however, this section will outline the structure recommended for high
schools & similar institutions.

Dedicated Manager
It is recommended that one faculty member or senior student be selected as a dedicated
manager for the sandbox. This person should be responsible for overseeing the sandbox's use and
condition. This person should outline any rules for server use, prepare necessary tools, and
should be the only person with full access to the master computer. This position would generally
be best suited for a schools computer technology teacher or server administrator.

Sign-up
Though server sandboxes make computer networking and parallel computing
experimentation fast and easy, students may need multiple hours working with the servers in
while working on projects. As a result, it is recommended that any use of the sandbox outside of a
class curriculum be managed using a sign-up sheet with which students can sign up for a time to
use the servers.

Class Integration
Integrating a server sandbox into computer technology classes will rely most heavily on
scheduling and student cooperation. It is unrealistic to expect any organization to have more than
one server sandbox. As a result, using it within a class containing many students will likely
require that educators either demonstrate it's use in front of the entire class, or separate students
into groups and schedule times for each group to work with the sandbox.

Future Editions
This revision contains the core design of the server sandbox and should act as sufficient
instructions for someone experienced in computer networking, parallel computing, and server
administration. However, more still can be done to make this available and understandable to a
wider audience. This final section outlines the major additions that are planned for future
revisions.

Detailed Outline of Server Configurations and Starting Points


Setting up various servers and other sandbox configurations can be complicated and
leaving it entirely up to students or the sandbox manager can cut out people with less experience
with computer networking. Future revisions will provide detailed instructions for setting up
specific configurations and will include some generic images which can be used on most server
setups.

Fully written and tested management scripts and programming


It is even more to ask sandbox managers/users to create their own scripts and programs
for imaging without detailed instructions. Future revisions will include pre-written generic
scripts and programs for imaging.

Custom lightweight Linux Ubuntu OS for Management


To make setup even easier, a custom Linux distribution will be created for both the master
and sandbox computers. This OS will come preset with all necessary tools and scripts and will be
designed specifically for use with sandbox setups.

Greater Resources for Learning about Encryption and Security


Cyber security and encryption are extremely hot topics of computer science in the modern
world and it is important to educate students about these topics. Future revisions of this plan will
include more information about encryption and cyber security as well as some proposals on how
to teach students about these topics in an engaging way.

S-ar putea să vă placă și