Wiki

Clone wiki

gnrs / Topology Generation

Software Requirements

The following software, in addition to the software listed in Building GNRS on Ubuntu is needed to complete the instructions below:

For Ubuntu 10.10

sudo apt-get install octave

Topology File and Delay Matrix

The topology generation steps below allow the generation of an network topology and its mapping onto a set of orbit nodes. To generate a topology file (including topology file and prefix file) using matlab and the Matlab scripts provided in src/tools/topology_generator.

The TopoGenerator needs two inputs: method and asNum. method determines which mechanism is used to generate the topology:

  • Method 0: Top ASes from DIMES based on degree
  • Method 1: Top ASes from DIMES based on prefix size
  • Method 2: Synthetic Jellyfish-modeled topology
  • Method 3: Synthetic model based on geographic aggregation of ASes (by nation)

Go to the folder src/tools/topology_generator and run the following command to start the script:

./topoGen.sh <TOPOLOGY> <NUM NODES>

The result of this script is two files:

  • topology.data - A space-separated value file containing the "costs" between connected ASes.
  • prefix.data - The IP prefix for each AS (format: <IP prefix> <AS ID>).
  • link.data - used as the input for halfviz for visualization of the topology generated.

The resulting data files will be located in the current folder.

Example Files

In the example jellyfish_topo.data below, the first two columns are AS numbers (identifiers), and the third column is the "cost" value of the connection between the two ASes. For this example, a simple "star" topology is generated with AS1 at the center and AS2, AS3, and AS4 at the edges. This topology was manually extracted from the output of the topo_generator.m script.

1 2 46
1 3 48
1 4 14

Next we will generate a list of the AS numbers used in the topology above. For this example, the listing is trivial, but for larger topologies, this can be a time-saver. Using the Perl script, script/as-unique.pl, pass the topology file above as the first parameter and an output file jellyfish_topo.aslist as output.

script/as-unique.pl jellyfish_topo.data jellyfish_topo.aslist

The file jellyfish_topo.aslist should contain a list of the AS numbers, each on a separate line:

1
2
3
4

Generating a Delay Matrix

A delay matrix, a file containing the full end-to-end inter-AS delay values, can be generated using the binary compiled from the source in src/tools/shortest_path_generator. See the README for detailed instructions.

cd src/tools/shortest_path_generator
make
./run_now jellyfish_topo.data

This will produce the file AS_arr.data in the local directory (which can be deleted), and the file jellyfish_topo.data.route in the same directory as jellyfish_topo.data. Here is what jellyfish_topo.data.route looks for for the example topology:

4
0 46855 48044 14599 
46855 0 94899 61454 
48044 94899 0 62643 
14599 61454 62643 0

The first line is the number of ASes, and the following lines are a space-separated matrix of delay values, with the first row and column as the AS identifiers. The current tools assume undirected graphs (symmetric costs), so the matrix will be symmetric along its diagonal.

OMF Node Setup

Once you have reserved nodes on the Orbit Grid, load the nodes with your pre-built Ubuntu-based GNRS image and turn them on. Details for loading and saving images, and for managing nodes can be found at the Orbit Lab and OMF websites.

Building the Node Lists

The output of the imaging process should include a LOG statement like the following:

INFO exp:  Imaging Process Done 
INFO exp:  2 nodes successfully imaged - Topology saved in '/tmp/pxe_slice-2012-12-14t08.53.08-05.00-topo-success.rb'

The contents of this file (for sandbox 8) may look something like this:

# Topology name: pxe_slice-2012-12-14t08.53.08-05.00-topo-success
# 
# This creates a Topology with the resources which have successfully been imaged.
#
defTopology('pxe_slice-2012-12-14t08.53.08-05.00-topo-success', 'node1-2.sb8.orbit-lab.org,node1-1.sb8.orbit-lab.org')

You need to copy the last array in the script above ('node1-2.sb8.orbit-lab.org,node1-1. . .') into a new file, which will be called jellyfish_topo.nodes. Be sure to omit the quotation marks. The file would look like this:

node1-2.sb8.orbit-lab.org,node1-1.sb8.orbit-lab.org

Next we will generate a couple of files that provide the node list in different formats. The Perl script script/node_list_converter.pl will take the file above (jellyfish_topo.nodes) and produce two output files: one with each node name on a line, and the other with the node's 'number' on a line.

script/node_list_converter.pl jellyfish_topo.nodes jellyfish_topo.nodelist jellyfish_topo.idlist

The contents of the two files should be as follows:

jellyfish_topo.nodelist

node1-2.sb8.orbit-lab.org
node1-1.sb8.orbit-lab.org

jellyfish_topo.idlist

1-2
1-1

Binding Nodes to ASes

Once the topology has been generated and the node list prepared, it's time to bind a node to an AS. A script is provided that automatically creates a mapping between each node in the nodelist and an IP address in the 192.168.1.2-254 range (leaving the .1 address open for other purposes).

script/as-binding.pl jellyfish_topo.aslist jellyfish_topo.bind

The output file, jellyfish_topo.bind should look like this:

1 192.168.1.2 5001
2 192.168.1.3 5001
3 192.168.1.4 5001
4 192.168.1.5 5001

Configuring Node Networking

Assuming that nodes will be assigned to ASes in the same order they are contained in the files, we will configure the /dev/eth0 devices of all available nodes (in this case 2) to bind to the IP addresses listed for the ASes. This can be done manually with the following commands run from the console host (assuming 1 server, 1 client):

ssh -T root@node1-2 "/sbin/ifconfig eth0 up 192.168.1.102 netmask 255.255.255.0"
ssh -T root@node1-1 "/sbin/ifconfig eth0 up 192.168.1.2 netmask 255.255.255.0"

And that's it, you've got everything prepared and ready to start the GNRS testing. Let's review the files we have:

  • jellyfish_topo.data - The raw topology file, listing costs between pairs of AS numbers.
  • jellyfish_topo.data.route - The global delay matrix for all ASes.
  • jellyfish_topo.nodes - The "pasted" list of nodes output from OMF.
  • jellyfish_topo.nodelist - The 1-per-line list of nodes from OMF.
  • jellyfish_topo.idlist - The "numbers" of the Orbit nodes (e.g., 1-1, 1-2)
  • jellyfish_topo.aslist - The 1-per-line list of AS numbers.

Related Pages

Updated