Skip to content

Commit c5112d5

Browse files
author
Len Ciavattone
committed
Pull request #44: Lc9892/feature/OBUDPST-56 Interface Stats
Merge in OBUDPST/udpst from lc9892/feature/OBUDPST-56-Interface-Stats to develop * commit '3410ecc9b5429ab2ebe089288ca455ca4facbd8e': OBUDPST-56: Interface Stats, OBUDPST-57: Multi-key, OBUDPST-58: Header Checksum OBUDPST-56: Interface Stats, OBUDPST-57: Multi-key, OBUDPST-58: Header Checksum OBUDPST-56: Interface Stats, OBUDPST-57: Multi-key, OBUDPST-58: Header Checksum OBUDPST-56: Interface Stats, OBUDPST-57: Multi-key, OBUDPST-58: Header Checksum OBUDPST-56: Interface Stats, OBUDPST-57: Multi-key, OBUDPST-58: Header Checksum OBUDPST-56: Interface Stats, OBUDPST-57: Multi-key, OBUDPST-58: Header Checksum OBUDPST-56: Interface Stats, OBUDPST-57: Multi-key OBUDPST-57: Header Checksum OBUDPST-56: Interface Stats, OBUDPST-57: Multi-key OBUDPST-56: Interface Stats OBUDPST-56: Interface Stats OBUDPST-56: Interface Stats OBUDPST-56: Interface Stats OBUDPST-56: Interface Stats OBUDPST-56: Interface Stats
2 parents 4008b96 + 3410ecc commit c5112d5

File tree

12 files changed

+867
-163
lines changed

12 files changed

+867
-163
lines changed

CHANGELOG.MD

Lines changed: 39 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,36 @@
33
*The udpst utility conforms to TR-471 (Issue 4). The latest TR-471 specification can be found at
44
https://www.broadband-forum.org/technical/download/TR-471.pdf*
55

6-
# 2023-11-17: [UDPST 8.1.0] (https://github.com/BroadbandForum/OB-UDPST/releases/tag/v8.1.0)
6+
# 2024-07-11: [UDPST 8.2.0] (https://github.com/BroadbandForum/OBUDPST/releases/tag/v8.2.0)
7+
8+
This release addresses the need to always handle interface byte counters as 64-bit values,
9+
regardless of the machine architecture (OBUDPST-56). Also, for improved management of large-scale
10+
deployments multi-key support has been added (OBUDPST-57). This capability allows for up to 256
11+
authentication keys to be specified via a key file. The legacy authentication key from the
12+
command-line is still supported and will act as a backup validation option to the key file if
13+
provided.
14+
15+
Integrity checks for PDUs were enhanced via a compilation flag to insert an optional PDU header
16+
checksum into control and data PDUs (OBUDPST-58). This functionality is needed when the standard UDP
17+
checksum is not being utilized by either the sender or receiver system. Changes for OBUDPST-57 and
18+
OBUDPST-58 resulted in the supported protocol version range on the server going from 10-10 to 10-11
19+
(i.e., the server will continue to support existing version 10 clients, see README for details).
20+
In addition,...
21+
22+
* Several minor compiler warnings were corrected
23+
* Enhanced integrity checks will generate alerts for invalid control PDUs and warnings for invalid
24+
data PDUs (both can be suppressed via compilation flags, causing them to be silently ignored)
25+
* The maximum requestable bandwidth on the client, when using the "-B mbps" option, was increased from
26+
10000 to 32767
27+
* The 64-bit ntohll/htonll macros were modified to accommodate big-endian architectures
28+
* An additional column for lost status feedback messages was added to the metadata export
29+
* The maximum authentication key size was increase from 32 to 64
30+
* A new ErrorStatus error value for multi-key and warning value for invalid data PDUs was added
31+
* An additional column for interface Mbps (from "-E intf") was added to the metadata export
32+
* A fix was added for scenarios where a timeout occurs, due to a lost test activation request, and
33+
the allocated upstream bandwidth on the server is never deallocated
34+
35+
# 2023-11-17: [UDPST 8.1.0] (https://github.com/BroadbandForum/OBUDPST/releases/tag/v8.1.0)
736

837
The main feature in this release is the option of exporting received load traffic metadata (sequence
938
numbers, timestamps,...) in CSV format. See README for feature details.
@@ -14,7 +43,7 @@ at 1 (one) - although only a handful are currently used. Error values start at 5
1443
maximum of 255 (see udpst.h for details). Additionally, an ErrorMessage2 text field was also added to
1544
better communicate the cause-and-effect relationship between typical message pairs.
1645

17-
# 2023-04-07: [UDPST 8.0.0] (https://github.com/BroadbandForum/OB-UDPST/releases/tag/v8.0.0)
46+
# 2023-04-07: [UDPST 8.0.0] (https://github.com/BroadbandForum/OBUDPST/releases/tag/v8.0.0)
1847

1948
The primary new feature in this release is support for multiple connections (UDP flows) between
2049
the client and one or more server instances (i.e., distributed servers). Additionally,...
@@ -35,15 +64,15 @@ both the current and minimum protocol version needed to be bumped to 10.*
3564
*The udpst utility conforms to TR-471 (Issue 3). The latest TR-471 specification can be found at
3665
https://www.broadband-forum.org/technical/download/TR-471.pdf*
3766

38-
# 2022-11-18: [UDPST 7.5.1] (https://github.com/BroadbandForum/OB-UDPST/releases/tag/v7.5.1)
67+
# 2022-11-18: [UDPST 7.5.1] (https://github.com/BroadbandForum/OBUDPST/releases/tag/v7.5.1)
3968

4069
This release has one new feature, which is a response to testing/experience on mobile access:
4170

4271
* The team made the decision to change a default setting: UDPST will now Ignore Reordering (and duplication) in the Load Adjustment search algorithm. The Reordered and Duplicate packets are legitimate contributions to IP-Layer Capacity. The utility measures these metrics under all conditions, this only affects search processing in Type B and Type C algorithms.
4372

4473
Also, this release makes several updates to documentation (reflecting the latest features implemented in the utility).
4574

46-
# 2022-05-05: [UDPST 7.5.0] (https://github.com/BroadbandForum/OB-UDPST/releases/tag/v7.5.0)
75+
# 2022-05-05: [UDPST 7.5.0] (https://github.com/BroadbandForum/OBUDPST/releases/tag/v7.5.0)
4776

4877
This release has one major new feature, which was anticipated by the version 9 protocol:
4978

@@ -53,7 +82,7 @@ This release has one major new feature, which was anticipated by the version 9 p
5382
* This algorithm supports a search over the full range of rates, even if the subscribed rate is >1Gbps
5483
* The Type B algorithm remains the default, for testing that does not benefit from "Multiply and Retry" aspects
5584

56-
# 2022-02-24: [UDPST 7.4.0] (https://github.com/BroadbandForum/OB-UDPST/releases/tag/v7.4.0)
85+
# 2022-02-24: [UDPST 7.4.0] (https://github.com/BroadbandForum/OBUDPST/releases/tag/v7.4.0)
5786

5887
This release has many new features, supported by the version 9 protocol:
5988

@@ -69,7 +98,7 @@ This release has many new features, supported by the version 9 protocol:
6998
* Backward compatibility: Servers can test with both protocol version 8 and version 9.
7099
* Additional JSON fields: example files have been updated (additions only)
71100

72-
# 2021-11-17: [UDPST 7.3.0](https://github.com/BroadbandForum/OB-UDPST/releases/tag/v7.3.0)
101+
# 2021-11-17: [UDPST 7.3.0](https://github.com/BroadbandForum/OBUDPST/releases/tag/v7.3.0)
73102

74103
This release has a greatly expanded (optional) JSON-formatted version of the command-line output.
75104

@@ -80,7 +109,7 @@ where names differ in small ways, or where additional names are provided in the
80109
We also include measurement of Ethernet Interface traffic during a test, to help identify when customer traffic was
81110
present that might cause the IP-Layer Capacity measurement to under-estimate the maximum capacity.
82111

83-
## 2021-08-20: [UDPST 7.2.1](https://github.com/BroadbandForum/OB-UDPST/releases/tag/v7.2.1)
112+
## 2021-08-20: [UDPST 7.2.1](https://github.com/BroadbandForum/OBUDPST/releases/tag/v7.2.1)
84113

85114
This supplemental release incorporates results from recent testing, where two changes
86115
in default parameters to protect the fast ramp-up seem prudent, and the status of default
@@ -92,23 +121,23 @@ test orgs. should consider changes to the default values. In other words, the d
92121
provided as a starting point; any test campaign should consider whether one or more default
93122
values need to be changed for their specific circumstances!
94123

95-
## 2021-07-16: [UDPST 7.2.0](https://github.com/BroadbandForum/OB-UDPST/releases/tag/v7.2.0)
124+
## 2021-07-16: [UDPST 7.2.0](https://github.com/BroadbandForum/OBUDPST/releases/tag/v7.2.0)
96125

97126
This release will have the first features for compute environment adaptation:
98127
* OS limitations (detect sendmsg()-only or sendmmsg()-available)
99128
* clock precision limitations and/or CPU power limitations (a pre-compile option)
100129

101130
Also, an optional JSON-formatted version of the command-line output.
102131

103-
## 2021-03-05: [UDPST 7.1.0](https://github.com/BroadbandForum/OB-UDPST/releases/tag/v7.1.0)
132+
## 2021-03-05: [UDPST 7.1.0](https://github.com/BroadbandForum/OBUDPST/releases/tag/v7.1.0)
104133

105134
This release addressed the following issues and new features:
106135
* Add guards to avoid errors in inclusion files
107136
* The test protocol is described in detail in file ./protocol.md
108137

109138
# CHANGELOG.MD for udpst 7.0.0 Release
110139

111-
## 2020-12-11: [UDPST 7.0.0](https://github.com/BroadbandForum/OB-UDPST/releases/tag/v7.0.0)
140+
## 2020-12-11: [UDPST 7.0.0](https://github.com/BroadbandForum/OBUDPST/releases/tag/v7.0.0)
112141

113142
This release addressed the following issues and new features:
114143
* Increase accuracy of trial and sub-interval rate calculations

CMakeLists.txt

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ if(${CMAKE_VERSION} VERSION_GREATER "3.3.0")
3333
endif()
3434
set(CMAKE_INCLUDE_CURRENT_DIR ON)
3535
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
36-
set(SOFTWARE_VER "8.1.0")
36+
set(SOFTWARE_VER "8.2.0")
3737

3838
INCLUDE (CheckIncludeFiles)
3939
INCLUDE (CheckFunctionExists)
@@ -73,11 +73,15 @@ CHECK_FUNCTION_EXISTS (mkfifo HAVE_MKFIFO)
7373
CHECK_FUNCTION_EXISTS (getifaddrs HAVE_GETIFADDRS)
7474
CHECK_FUNCTION_EXISTS (fork HAVE_WORKING_FORK)
7575

76-
OPTION(DISABLE_INT_TIMER "Disable the timer for systems which don't provide the required timer resolution. Increases CPU utilization." OFF)
76+
OPTION(DISABLE_INT_TIMER "Disable interval timer on systems without required timer resolution (increases CPU util.)" OFF)
7777
OPTION(HAVE_SENDMMSG "Enable/Disable use of SendMMsg()" ON)
7878
OPTION(HAVE_RECVMMSG "Enable/Disable use of RecvMMsg()" ON)
7979
OPTION(HAVE_GSO "Enable/Disable use of Generic Segmentation Offload (GSO)" ON)
8080
OPTION(RATE_LIMITING "Enable/Disable rate limiting via bandwidth management" OFF)
81+
OPTION(AUTH_IS_OPTIONAL "Make authentication optional (considered low security and should be temporary)" OFF)
82+
OPTION(SUPP_INVPDU_ALERT "Suppress alert when invalid control PDU is received (silently ignore)" OFF)
83+
OPTION(SUPP_INVPDU_WARN "Suppress warning when invalid data PDU is received (silently ignore)" OFF)
84+
OPTION(ADD_HEADER_CSUM "Add checksum to PDU headers (needed when the UDP checksum is not being utilized)" OFF)
8185

8286
add_definitions(-DSYSCONFDIR=\"${CMAKE_INSTALL_PREFIX}/etc\")
8387
add_definitions(-DLOCALSTATEDIR=\"${CMAKE_INSTALL_PREFIX}/var/lib\")

README.md

Lines changed: 92 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
Open Broadband-UDP Speed Test (OB-UDPST) is a client/server software utility to
33
demonstrate one approach of doing IP capacity measurements as described by:
44

5-
- Broadband Forum TR-471 Issue 3 (12/2022): _Maximum IP-Layer Capacity Metric,
5+
- Broadband Forum TR-471 Issue 4 (2024): _Maximum IP-Layer Capacity Metric,
66
Related Metrics, and Measurements_, BBF TR-471,
77
https://www.broadband-forum.org/technical/download/TR-471.pdf
88

@@ -151,7 +151,7 @@ load adjustment when conducting a search for the Maximum IP-Layer Capacity.
151151
The Type C algorithm (a.k.a. Multiply and Retry) will provide a fast rate
152152
increase until congestion, reaching 1 Gbps in ~1 second. The "fast" ramp-up
153153
will be re-tried when conditions warrant, to ensure that the Maximum IP-Layer
154-
Capacity has been reached. This option is activated using `-A c` (with the
154+
Capacity has been reached. This option is activated using `-A C` (with the
155155
more linear Type B algorithm remaining the default).
156156

157157
One change to the default settings was included in Release 7.5.1. All Load
@@ -352,10 +352,10 @@ the connection which closes the socket and deallocates it.
352352

353353
**More Info**
354354

355-
For much more detail on the test protocol, see the ./protocol.md file. Also, an
356-
Internet-Draft,
355+
An Internet-Draft,
357356
https://datatracker.ietf.org/doc/draft-ietf-ippm-capacity-protocol/ describes
358-
Protocol Version 9 in even more detail.
357+
what will eventually be the official protocol version. Although fundamentally
358+
the same as described here, it includes accommodations for additional security.
359359

360360
## JSON Output
361361
For examples of the JSON output fields see the included sample files named
@@ -713,6 +713,7 @@ character:
713713
- #D - Direction of test ('U' = Upstream, 'D' = Downstream)
714714
- #H - Server host name (or IP) specified on command-line
715715
- #p - Control port used for test setup
716+
- #E - Interface name specified with `-E intf` option (only valid on client)
716717

717718
In addition to the above, all conversion specifications supported by strftime()
718719
(and introduced by a '%' character) can also be utilized - see strftime() man
@@ -733,6 +734,7 @@ receiver's clock).
733734
- OWD : The one-way delay of the datagram if the sender's and receiver's clocks
734735
are sufficiently synchronized, else it merely reflects the difference in the
735736
clocks (and could be negative). This value is in milliseconds.
737+
- IntfMbps : The client interface Mbps when the `-E intf` option is used.
736738
- RTTTxTime : The transmit timestamp used for RTT (Round-Trip Time)
737739
measurements and carried from the load receiver to the load sender in the
738740
periodic status feedback messages.
@@ -745,9 +747,94 @@ turn-around time in the load sender). This value is in milliseconds.
745747
- RTT : The resulting "network" RTT when the RTT response delay is subtracted
746748
from the difference between the RTT transmit and receive times. This value is
747749
in milliseconds.
750+
- StatusLoss : The count of lost status feedback messages sent from the load
751+
receiver to the load sender.
748752

749753
*Because RTT measurements are only periodically sampled (as part of each status
750754
feedback message), those columns will be empty most of the time. Also, all
751755
timestamps are based on the local system time zone and utilize microsecond
752756
resolution.*
753757

758+
## Multi-Key Authentication
759+
For better support of large-scale deployments with various service offerings
760+
and device types, multiple authentication keys are now supported. As of version
761+
8.2.0, and in addition to the legacy authentication key still available on the
762+
command-line, a key file can now be specified via `-K file` to allow up to 256
763+
unique authentication keys (see `udpst.keys` example file). The CSV formatted
764+
file expects a numeric key ID (0-255) followed by the key string (64 characters
765+
max). Commas, spaces, tabs, and comments (anything beginning with a '#') are
766+
all ignored.
767+
768+
*Because a key ID field is now needed in the Setup Request PDU, the protocol
769+
version had to be bumped from 10 to 11. However, the server is backward
770+
compatible and will support multi-key authentication for clients using either
771+
version. A default key ID of zero is assumed when one is not specified or is
772+
unavailable (as is the case with protocol version 10).*
773+
774+
The authentication process begins with the client using a shared key to create
775+
a 32-byte HMAC-SHA256 hash for the Setup Request PDU. This hash and a key ID are
776+
inserted in the PDU prior to transmission to the server. The key used to create
777+
the hash can come from the command-line via the `-a key` option OR from a key
778+
file specified via the `-K file` option. The key ID is specified via the
779+
`-y keyid` option. When a key file is being utilized, the key ID option is also
780+
used to determine which key in the key file will be used to create the hash.
781+
If the key file only contains a single entry, and a key ID was not explicitly
782+
specified on the command-line, that key ID and key will automatically be used.
783+
Otherwise, when a key ID is not explicitly specified on the command-line, or the
784+
Setup Request is coming from a client using the previous protocol version (10),
785+
a default key ID of zero is assumed.
786+
787+
When the server receives the Setup Request, and if it is utilizing a key file,
788+
the included key ID will be used to select the key used to create a
789+
corresponding hash (for comparison and validation). An entry in the key file
790+
with a key ID of zero can be used for older clients using the previous protocol
791+
version (10). In addition to the key file, a command-line key specified via
792+
`-a key` can also be used for secondary/backup authentication of the client.
793+
That is, if the authentication via a key file key fails for any reason (key ID
794+
not found, hash comparison mismatch, etc.) authentication is automatically
795+
attempted a second time using the command-line key. This flexibility allows for
796+
an easier transition from the previous protocol version, clients using an older
797+
command-line key, or clients moving from a zero (default) key ID to a non-zero
798+
ID.
799+
800+
Lastly, for clients transitioning from no authentication to authentication, a
801+
new compilation flag is available on the server that makes authentication
802+
optional.
803+
```
804+
$ cmake -D AUTH_IS_OPTIONAL=ON .
805+
```
806+
*Note: This mode of operation is considered low security and should only be
807+
utilized temporarily for a migration or upgrade of clients.*
808+
809+
## Optional Header Checksum and PDU Integrity Checks
810+
On systems where the standard UDP checksum is not being inserted by the
811+
protocol stack/NIC, or is not being verified upon reception, corrupt datagrams
812+
will be passed up to udpst. As of protocol version 11, an optional header
813+
checksum can be calculated and inserted into all control and data PDU headers
814+
to deal with this. Upon reception, udpst will automatically validate the header
815+
checksum if populated. And although this mechanism can operate in one direction
816+
at a time, it should be enabled on both the client and server for bidirectional
817+
protection. The following compilation flag will enable this functionality on
818+
the sender for all outgoing PDUs:
819+
```
820+
$ cmake -D ADD_HEADER_CSUM=ON .
821+
```
822+
*Note: Because of the small to moderate performance impact (depending on the
823+
device), this flag is normally disabled since it is redundant when the standard
824+
UDP checksum is being utilized.*
825+
826+
Independent of whether the header checksum is enabled as an additional PDU
827+
integrity check (beyond size, format, etc.), new output messaging is displayed
828+
when an invalid PDU is received. A bad PDU during the control phase (whether a
829+
corrupted PDU or a rogue UDP datagram) will generate an ALERT while a bad PDU
830+
during the data phase will generate a WARNING (and result in a warning exit
831+
status and JSON ErrorStatus). In cases where the udpst control port on the
832+
server is exposed to the open Internet, and verbose is enabled, this may result
833+
in excessive alerts due to UDP port scanners and probing. If either of these
834+
new output message types is not desired, the following compilation flags can be
835+
used to suppress them (and the PDU is silently ignored):
836+
```
837+
$ cmake -D SUPP_INVPDU_ALERT=ON .
838+
$ cmake -D SUPP_INVPDU_WARN=ON .
839+
```
840+

config.h.cmake

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,5 +18,9 @@
1818
#cmakedefine HAVE_RECVMMSG
1919
#cmakedefine DISABLE_INT_TIMER
2020
#cmakedefine RATE_LIMITING
21+
#cmakedefine AUTH_IS_OPTIONAL
22+
#cmakedefine SUPP_INVPDU_ALERT
23+
#cmakedefine SUPP_INVPDU_WARN
24+
#cmakedefine ADD_HEADER_CSUM
2125

2226
#endif /* CONFIG_H */

0 commit comments

Comments
 (0)