Having set up an Ubuntu Linux server running on a free micro-instance in Amazon’s Web Services EC2 service, I’d like to see how some of the open-source network simulation tools I’ve been using work in the cloud.
First, I will install the CORE Network Emulator on my Amazon AWS EC2 virtual private server. Please read the rest of this post to see how it works.
I expect that the CORE Network Emulator will install and run on an Amazon EC2 instance because it uses Linux Containers (LXC) as its virtualization technology. I have already observed that LXC containers work when run inside a virtual machine on my Laptop computer. It should work the same when running in a virtual machine in Amazon’s EC2 cloud computing service.
I’ve already described how to install the CORE network emulator in previous posts so I will list the installation steps below without any explanation. For details, please see my post on how to install the CORE Network Emulator from source code.
Execute the following commands on the remote Amazon EC2 server:
Install prerequisite software
$ sudo apt-get update $ sudo apt-get install bash bridge-utils ebtables \ iproute libev-dev python tcl8.5 tk8.5 libtk-img \ autoconf automake gcc libev-dev make python-dev \ libreadline-dev pkg-config imagemagick help2man $ sudo apt-get install quagga xorp \ openssh-client openssh-server isc-dhcp-server \ isc-dhcp-client vsftpd apache2 tcpdump radvd \ at ucarp openvpn ipsec-tools racoon traceroute \ mgen wireshark tshark
Install the CORE network emulator
$ cd ~/Downloads $ wget http://downloads.pf.itd.nrl.navy.mil/core/source/core-4.7.tar.gz $ tar xzf core-4.7.tar.gz $ cd core-4.7 $ ./bootstrap.sh $ ./configure $ make $ sudo make install
Start CORE daemon
$ sudo /etc/init.d/core-daemon start
Native desktop environment versus X forwarding
We have two choices for displaying GUI applications when running them on a remote server: VNC or X forwarding. I show how to use both methods, below.
Native desktop with VNC
To run the CORE network emulator in the remote server’s Linux desktop environment, follow the following procedure:
- Log into the remote server using SSH Port Forwarding. Run a command similar to the one below, with the correct IP address and key-pair for your instance:
Laptop:$ ssh -L 5901:localhost:5901 -i ~/Documents/Ubuntu-2-keypair.pem firstname.lastname@example.org
- On the remote server, start the VNC server:
- On a terminal window on your computer, start the VNC viewer application:
Laptop:$ xvncviewer localhost:1
- You should now see a window that displays the Linux desktop of the remote AWS server.Next, start the CORE GUI:
An alternative way to run a GUI application like CORE without starting a full Linux desktop environment on the remote server is to use X forwarding. We can forward the X windows displayed by CORE to our home computer — in this case, my laptop.
To set up X forwarding and start the CORE GUI, following the steps below:
- Log into the remote server using SSH Display Forwarding. Run a command similar to the one below, with the correct IP address and key-pair for your instance:
Laptop:$ ssh -X -i ~/Documents/Ubuntu-2-keypair.pem email@example.com
- Now start the CORE GUI on the remote server, from the same SSH session:
- The CORE GUI X window will appear on your local computer’s desktop.
I found that the CORE network emulator, when running on the EC2 micro-instance, performed as expected without any errors or other problems. Simulation performance, as measured by how long it takes four routers running OSPF to converge, was similar to running the CORE network emulator on my laptop computer, a 5-year old Lenovo T400 which has a 2.4 GHz CORE-2 Duo processor.
The method of accessing the GUI did not seem to be have an observable impact. Simulator performance on the remote server did not change when accessing the simulator’s GUI using either VNC or X Forwarding. However, the user experience was different.
I found that running a native desktop environment on the remote server via VNC offered the best user experience. The GUI viewed through VNC was more responsive than the application’s X window viewed via X forwarding.
The CORE Network Emulator can be successfully installed on a remote server in a cloud computing environment. Performance is acceptable for small simulation scenarios. We did not test large scenarios. When accessing the remote server from a local host, VNC offers a better user experience.