Emulating a topology with NES

Currently we use Containernet to create topologies together with our own Docker executable image.

Our own repository with examples can be found here: https://github.com/nebulastream/nebulastream-emulator . For the rest of this page, if a link looks like a relative path, it's referring to this repository.

Install Containernet

To install Containernet, follow the instructions on their README or just do:

sudo apt-get install ansible git aptitude
git clone https://github.com/containernet/containernet.git
cd containernet/ansible
sudo ansible-playbook -i "localhost," -c local install.yml
cd .. && sudo make develop

Topology how-to

Topologies have to be built by hand, since Containernet doesn't support topology declaration, unlike Mininet (the underlying project).

Example topologies can be found in the scripts dir of the repo, here. Please take the time to have a look.

Currently, a way to build a tree topology is included in our examples, once issue #1508 is resolved and branch 1508_emulation_limits is merged. The example can be found in branch-1508/scripts/tree_topology_in_main.py. This link will be updated once it's merged.

In order to create a tree topology with Containernet, do the following:

sudo python3 tree_topology_in_main.py --depth=D --fanout=X --mount=/path --sleep=Z

The above will create a tree topology with depth D, fanout X, mount /path in the container, and finally will sleep for Z seconds after issuing the starting command. Depth has a default of 2 if not set. Fanout has a default of 10 if not set. Sleep has a default of 60 if not set. Mount does not have a default.

These cover the most common cases of execution we have had so far in NES.

Can I use Topology objects from Mininet?

At the time of writing, no. However, we have an open pull-request on Containernet (here) that allows to use topology objects in the constructor of Containernet, instead of doing it manually.

If the PR passes, then creating a Tree-like structure will be 2 lines of code. As an example:

from mininet.cli import CLI
from mininet.log import setLogLevel
from mininet.node import OVSSwitch
from mininet.topolib import TreeContainerNet
 
if __name__ == '__main__':
    setLogLevel( 'info' )
    network = TreeContainerNet( depth=2, fanout=10, dimage="ubuntu:trusty", switch=OVSSwitch )
    network.run( CLI, network )

Limitations

We have found the following limitations:

  • addDocker/dcmd can't start immediatelly, hence our workers need a node.cmd(), like in scripts/one_coordinator_three_workers.py
  • regular default switches can't have more than 52 nodes per switch
  • user-space switches can't have more than 255 nodes per switch
  • user-space switches are slower than the default ones (no kernel passthrough)

If for some reason, you can't ping or resolve hosts between networks, then check if you exceed these limits somewhere.

These issues will be discussed further with the team and relegate any additional information back to Mininet or Containernet (the owner is open to changes).

It is very likely that the changes suggested by Mininet (increasing limits) have to be applied to the host. We will look further into it.

 
how_to_emulate_a_topology.txt · Last modified: 2021/04/06 14:32 by 134.96.191.189
 
Recent changes RSS feed Creative Commons License Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki