SCION networking S03

View on GitHub

Measuring SCION Bandwidth

Overview

This example binds ScionBwtestService to SCION hosts, allowing clients to connect to test servers using addresses that include an ISD, AS, IP address, and port. Test parameters independently control the duration, packet size, packet count, and target bandwidth in the client-to-server and server-to-client directions, enabling observations of bidirectional throughput and packet loss. You can first establish a baseline with fixed parameters, then adjust the load or network conditions to conduct controlled comparisons in a reproducible environment for studying SCION application communication and measurement results.

SCION Bandwidth Tester

This example adds SCION bandwidth test servers to the infrastructure. The SCION bandwidth tester is a sample application that measures the bandwidth and packet loss over a link. The size of the packets, the number of packets, the attempted bandwidth and the duration are set by the test client. For more information please visit the SCION documentation (external link).

Create hosts and run bandwidth test servers

The SCION bandwidth tester is available as the service ScionBwtestService which has to be included and instantiated.

from seedemu.services import ScionBwtestService

bwtest = ScionBwtestService()

The server needs a host to run on that is created in the usual way. We set the IP address explicitly to simplify connecting to the server later. Optionally, it is possible to set the UDP port the server is binding to.

as150.createHost('bwtest').joinNetwork('net0', address='10.150.0.30')
bwtest.install('bwtest150').setPort(40002) # Setting the port is optional (40002 is the default)
emu.addBinding(Binding('bwtest150', filter=Filter(nodeName='bwtest', asn=150)))

Finally the SCION bandwidth tester service has to be added as a layer for rendering.

emu.addLayer(bwtest_server)

The server persists over the whole time the SEED infrastructure is running and every SCION bandwidth-test client application from the SEED infrastructure can connect to it.

Run bandwidth tests

The bandwidth test server and client commands are installed on all SCION hosts. To run a bandwidth test against the server in AS 153 we can run the following client command on any host:

scion-bwtestclient -s 1-153,10.153.0.30:40002

The server address has the form ISD-AS,IP:port. Test parameters can be set independently in the client-to-server amd server-to-client direction with the -cs and -sc arguments, respectively. The parameters have the format <duration (seconds)>,<packet size (bytes)>,<number of packets>,<attempted bandwidth>. They default to 3,1000,30,80kbps.

scion-bwtestclient -s 1-153,10.153.0.30:40002 -cs "5,500,?,1Mbps" -sc "5,1000,?,1Mbps"

If at least one test parameter tuple (cs or sc) is specified, the other one use the same values. The question mark ? can be used as a wildcard. If only one parameter is omitted, it will be calculated from the remaining ones, if more than one parameter is omitted, the default values are used.

Source: SEED Emulator · S03 README

Explore more scion networking examples