Skip to content


Repository files navigation


No-hop DHT utilizes the programable data plane to speed up the key value look up proccess for distributed hash tables. For more detail please refer to the paper or the presentation on No-hop.

Initialize Network

No-hop has two versions, Forward, and Rewrite. Forward needs all switches to be programable while Rewrite only one.

Pre-built Expirements

In initialize_system/No_hop_forward_0 and initialize_system/No_hop_rewrite_0 there are two already built experirments.

To see the structure of the network look in either the topology.jsonfile or in the network.pdf file.


In rewrite systems only one switch needs to run No_hop. This switch is in rewrite systems' network.pdfdark blue. In forward all switches need to run No_hop and are light blue in network.pdf. The sizes are in relationship to the responisble id spaces.

Generate Initial Build Files

For additional experiments:

To generate a new rewrite experiment run:

$ cd initialize_system/
$ python rewrite

To generate a new forward experiment run:

$ cd initialize_system/
$ python forward

If rewrite_build_folders=1in The experiment folder will be in No_hop_<forward, rewrite>_0, else if rewrite_build_folders=0 a new folder will be created with the next free index so, No_hop_<forward, rewrite>_<free_index>

For more on generating build files please refer to Init Docs.

Running Experiments

To run an experiment:

$ cd initialize_system/<Build folder name>
$ make

This will start the network and mininet cli.

In the mininet CLI to open a terminal for a host:

mininet> xterm host_name

To see network:

mininet> net

In a host xterm to run the No_hop_host program.

To run a client:

# python ../../ c

Sending messages:

Format: type, id, message


Value Message_type
0 First_contact
1 Look_up
2 Fail
3 Join

To run a server without an ID (Will not run stabilize proccess until ID is assigned):

# python ../../

To assign an ID to a host, send with the client a message of type=1, ID=some id that sends to that host, message= join:ID that you want to assign.

To run a test:

# python ../../ t=<Number of times each ID should be sent>

To run hosts that immediatly start to stabilize pass them their ID at start:

# python ../../ ID


To catch failures and adjust the tables, in another window the controller has to be run.

# python ../../

To leave mininet:

mininet> exit


$ sudo mn -c


Running No-hop expirements needs the P4 compiler, simple switch and grpc, so its easiest to use the P4 tutorial VM.

Additonally to generate the experiments one needs Networkx, and matplotlib. Matplotlib only to generate network.pdf diagram.


No-hop DHT utilizes the programable data plane to speed up the key value look up proccess for distributed hash tables.








No releases published


No packages published