-
Notifications
You must be signed in to change notification settings - Fork 0
UserTutorial
Warning: This tutorial is somewhat outdated and shows some UI elements that do not exist anymore.
In this tutorial you will learn how to create and use topologies.
First you have to navigate to the website, click on "Topologies" and login using your normal German-Lab credentials.
In the following page you will see a list of your topologies. If you click on the name you will see a page showing the details of this topology. We want to create a new topology and so we click on the "create new topology" link on the left.
A java-applet that shows an editor should open. Depending on your browser you might have to accept some security dialog. The editor has three major parts:
- The palette on left shows all components that can be used to build virtual topologies.
- In the middle you see the working area with your topology, which is currently empty.
- On the right side properties panel allows you to change properties on selected elements.
If you click on the working area the properties panel shows the properties area of the topology where you can change the name of the topology. When you enter a space in the name you will notice the text color changing to red. This way the editor tells you if the format is correct or not. Let's name the topology test1.
Back to the topology. Our first topology should consist of two virtual machines that could ping each others. So we need two machines, lets select one to be OpenVZ and one KVM and we need a switch to connect them. You can add these components to your topology be dragging them from the palette into the working area.
Now we need to connect the devices to the switch. To connect a device to a connector, first select the device by clicking on it, then select the connector (i.e. the switch) by clinking on it and pressing the control key at the same time. A connection is shown a a line going from the connector to the device. In its middle the connection has a small square. THis is the connection handle that allows you to access the connection as an element. At the device a small circle represents the host interface of the connection. Each connection has its own host interface.
If you click on the devices you will see their properties in the properties panel. For OpenVZ devices you can set more properties than for KVM devices. The reason for this is that the KVM virtualization technology does not offer a generic way to access to virtual machine. The defaults for the devices are ok for us so we do not neet to change anything there.
The next thing to configure are the interfaces. If you click on the interface icon you can see all the properties in the properties panel. On the interface of the OpenVZ device we can configure an IP address and netmask or a dhcp client.
We select the IP address and netmask to be 10.1.1.1/24 and leave the dhcp client set to false since there is not dhcp server in our topology.
On the kvm machine we cannot configure anything, so we will have to do that later when we access the device.
The last thing to configure in this example are the connections. On the connections you can select to add a certain latency, packet loss and bandwidth limitation. All these attributes are additional to the attributes of the underlying network. In this example we want to add a delay of 50 milliseconds between the hosts so we add this delay to one of the connections.
No we are done, we can click "create experiment" on the bottom of the properties panel. This will save the topology and lead us to the detail page of the new topology.
New topologies are initially only stored in the database. All devices and connectors can have one of three states:
- Created: The device/connector is stored in the database.
- Prepared: The device/connector is prepared on the host device and can be started.
- Started: The device/connector is running and can be used. To run the experiment we could either manually prepare the devices and the switch and then start each of them separately or we can let the manager do that for us. To use the manager we need to click the "start" button on the lower left. This will first prepare all devices and connectors of the topology and then start it. You can see the commands that are executed and the progress of the task.
When the task is finished, the page will refresh, showing you some new options. Now the topology is started.
You can access the local consoles of the devices by clicking on the black console icon behind the device. We will now open the console of the kvm device to configure its interface and test the connection with pings. If you click on the console icon a new window will pop up containing a java applet. Depending on your browser you might again have to accept a security dialog.
In the new window you can see the local console of the kvm device. As you can see it just finished booting a debian system and now shows the login prompt. Since we are using kvm we could not configure the root password in the topology editor so it is still the template default.
You can login using the username root and the password glab-root. If this device was exposed to the internet the first thing to do after login would be change the password. We only have configured a private network that is not connected to the internet so this is not necessary.
Now you have console access to a real virtual machine and can do anything you could normally do with a virtual machine.
One thing to do would be to configure the network interface. To do that enter the command
ifconfig eth0 10.1.1.2 netmask 255.255.255.0 up
Now the interface is configured we can try to ping the openvz device. As we remember we set its IP to 10.1.1.1 so we could use the command ping 10.1.1.1 to check the connection.
As we see the openvz machine is responding. The delay of the connection is about 100ms since we configured 50ms on one connection and ping adds up the delay of the request packet and the reply packet.
Now lets change the latency to 20ms. So we select "edit" on the detail view of the topology and see the editor again.
While the console with the ping is still running we change the delay value from 50ms to 20ms and click on "modifiy experiment". This will bring us back to the detail view. Lets switch back to the console to see if the new delay works.
(
(
(
(
(
(
(
(
(
(
(
(
(
(
(
(
(