The User Datagram Protocol (UDP) is one of the core members of the Internet protocol suite, and serves as a connectionless form of communication. This is opposed to the Transmission Control Protocol, which provides reliable, ordered, and error-checked delivery of data between sockets.
The BWCTL tool invokes the iperf and nuttcp testing tools - which offer both TCP and UDP methods for measuring throughput between hosts. By default, the perfSONAR Toolkit disables the use of public UDP testing. This was done for several reasons:
- UDP bandwidth testing does not "back off", meaning that it can be destructive to legitimate traffic on a network
- Since UDP is connectionless, it can be used for DoS-like attacks
- Historically, results from some UDP test tools were limited by the processor/memory of the host doing the testing, and less reliable than a TCP test
It is possible to enable UDP testing on a perfSONAR node by following the guidelines below
Enabling UDP Testing
BWCTL contains a policy file called /etc/bwctl-server/bwctld-server.limits. Versions prior to 3.5.1 may find the file named /etc/bwctld/bwctld.limits. There are two ways to enable UDP testing, and both involve modifications to this file. The first way is to simply assign the external address of your host to the root classification, as well as that of a collaborator:
assign net MY_ADDRESS/32 root assign net MY_FRIENDS_ADDRESS/MASK root
If you wish to reduce the amount of bandwidth that someone could request in a test, that change can be made as well:
limit root with \ bandwidth=100m, \ duration=60, \ allow_udp=on, \ allow_tcp=on, \ allow_open_mode=on, \ max_time_error=20
The second method is to create a new class, and then assign the external address of your host to the root classification, as well as that of a collaborator:
limit udptest with parent=root, \ bandwidth=100m assign net MY_ADDRESS/32 udptest assign net MY_FRIENDS_ADDRESS/MASK udptest
After making changes to either file, be sure to restart the daemon with /etc/init.d/bwctl-server restart or in versions prior to 3.5.1 use /etc/init.d/bwctld restart.