Compartilhar via


QoS Traffic Generator Example Usage

Update: This tool is no longer available on Microsoft Connect and there is no replacement download site.

 In my last post, I announced the availability of QoS Traffic Generator on Microsoft Connect. In order to help you understand the usage of this tool, I have provided some examples of what it can do.

One of the most common tasks is to send traffic from one computer to another. The following example sends UDP traffic at 5 Mbps for 10 seconds.

Source

 C:\qos>qostraffic.exe -source -udp -dest 192.168.1.100 -throttle 5000000 
                      -duration 10
Parsing command line...
WSAStartup successful.
Time between each packet (microsec): 2400
Size of each packet: 1472
Statistics sampling interval (msec): 1000
Sending traffic at 5.00 Mbps to 192.168.1.100:9999
Date, Time, Packets received, Bytes received (headers included), Elapsed time (msec), Throughput (Kbps), Bottleneck BW, Available BW, RTT, BBSet, ABSet, RTTSet, ErrorCode
05/07/2009, 23:06:54, 421, 631500, 1014, 4982.249,,,,,,,
05/07/2009, 23:06:55, 422, 633000, 1014, 4994.083,,,,,,,
05/07/2009, 23:06:56, 423, 634500, 1014, 5005.917,,,,,,,
05/07/2009, 23:06:57, 422, 633000, 1014, 4994.083,,,,,,,
05/07/2009, 23:06:58, 423, 634500, 1014, 5005.917,,,,,,,
05/07/2009, 23:06:59, 422, 633000, 1014, 4994.083,,,,,,,
05/07/2009, 23:07:00, 423, 634500, 1014, 5005.917,,,,,,,
05/07/2009, 23:07:01, 422, 633000, 1014, 4994.083,,,,,,,
05/07/2009, 23:07:02, 423, 634500, 1014, 5005.917,,,,,,,
Time has elapsed, or CTRL+C has been pressed.
Stopping Source traffic, waiting 5 sec.
SenderThread is exiting...
SenderThread exited successfully.
WSACleanup successful.

Sink

 C:\qos>qostraffic.exe -sink -udp
Parsing command line...
Listening on all IP addresses.
WSAStartup successful.
Waiting for UDP traffic on port 9999, hit CTRL+C to exit...
WSARecvFrom completed.
Date, Time, Packets received, Bytes received (headers included), Elapsed time (msec), Throughput (Kbps), Message
05/07/2009, 23:06:54, 421, 631500, 1014, 4982.249,
05/07/2009, 23:06:55, 422, 633000, 1014, 4994.083,
05/07/2009, 23:06:56, 423, 634500, 1014, 5005.917,
05/07/2009, 23:06:57, 422, 633000, 1014, 4994.083,
05/07/2009, 23:06:58, 423, 634500, 1014, 5005.917,
05/07/2009, 23:06:59, 422, 633000, 1014, 4994.083,
05/07/2009, 23:07:00, 423, 634500, 1014, 5005.917,
05/07/2009, 23:07:01, 422, 633000, 1014, 4994.083,
05/07/2009, 23:07:02, 423, 634500, 1014, 5005.917,

You can see the throughput in Kbps from the last column, along with other information such as timestamp and bytes received. The QoS Traffic Generator can also support multiple TCP connections from one sink. The next example shows two TCP flows, one using qWave and one using TC (used to throttle traffic) sending to the same destination.

Source 1

 C:\qos>qostraffic.exe -source -tcp -dest 192.168.1.100 -throttle 1000000 -qwave
Parsing command line...
qWave traffic type: Best effort
qWave flow type: non-adaptive.
qWave LLTD option: system choice.
qWave flow fundamentals: do not display
WSAStartup successful.
qWave started up successfully.
Send interval: not used, packets will be sent as fast as possible
Packets to send per interval: 1
Size of each packet: 1000
Statistics sampling interval (msec): 1000
Sending traffic at 1.00 Mbps to 192.168.1.100:9999
Date, Time, Packets received, Bytes received, Elapsed time (msec), Throughput (Kbps), Bottleneck BW, Available BW, RTT, BBSet, ABSet, RTTSet, ErrorCode
05/07/2009, 23:02:04, 129, 125000, 1014, 986.193,,,,,,,
05/07/2009, 23:02:05, 126, 126000, 1014, 994.083,,,,,,,
05/07/2009, 23:02:06, 125, 125000, 1014, 986.193,,,,,,,
05/07/2009, 23:02:07, 126, 126000, 1014, 994.083,,,,,,,
05/07/2009, 23:02:08, 124, 124000, 1014, 978.304,,,,,,,
05/07/2009, 23:02:09, 127, 127000, 1015, 1000.985,,,,,,,
05/07/2009, 23:02:10, 125, 125000, 1014, 986.193,,,,,,,
05/07/2009, 23:02:11, 126, 126000, 1014, 994.083,,,,,,,
05/07/2009, 23:02:12, 125, 125000, 1014, 986.193,,,,,,,
05/07/2009, 23:02:14, 124, 124000, 1014, 978.304,,,,,,,
05/07/2009, 23:02:15, 126, 126000, 1014, 994.083,,,,,,,
05/07/2009, 23:02:16, 127, 127000, 1014, 1001.972,,,,,,,
05/07/2009, 23:02:17, 125, 125000, 1014, 986.193,,,,,,,
05/07/2009, 23:02:18, 124, 124000, 1014, 978.304,,,,,,,
ERROR: 64 in GetQueuedCompletionStatus: The specified network name is no longer 
available.
SenderThread is exiting...
SenderThread exited successfully.
Stopping Source traffic, waiting 5 sec.
SenderThread exited successfully.
WSACleanup successful.

Source 2

 C:\qos>qostraffic.exe -source -tcp -dest 192.168.1.100 -throttle 2000000 -tc 40,4
Parsing command line...
WSAStartup successful.
Send interval: not used, packets will be sent as fast as possible
Packets to send per interval: 1
Size of each packet: 1000
Statistics sampling interval (msec): 1000
Sending traffic at 2.00 Mbps to 192.168.1.100:9999
Date, Time, Packets received, Bytes received, Elapsed time (msec), Throughput (Kbps), Bottleneck BW, Available BW, RTT, BBSet, ABSet, RTTSet, ErrorCode
05/07/2009, 23:01:59, 498, 498000, 1014, 3928.994,,,,,,,
05/07/2009, 23:02:00, 248, 248000, 1014, 1956.607,,,,,,,
05/07/2009, 23:02:01, 251, 251000, 1014, 1980.276,,,,,,,
05/07/2009, 23:02:02, 251, 251000, 1014, 1980.276,,,,,,,
05/07/2009, 23:02:03, 252, 252000, 1014, 1988.166,,,,,,,
05/07/2009, 23:02:04, 247, 247000, 1014, 1948.718,,,,,,,
05/07/2009, 23:02:05, 251, 251000, 1014, 1980.276,,,,,,,
05/07/2009, 23:02:07, 251, 251000, 1014, 1980.276,,,,,,,
05/07/2009, 23:02:08, 251, 251000, 1014, 1980.276,,,,,,,
05/07/2009, 23:02:09, 247, 247000, 1014, 1948.718,,,,,,,
05/07/2009, 23:02:10, 251, 251000, 1014, 1980.276,,,,,,,
05/07/2009, 23:02:11, 251, 251000, 1014, 1980.276,,,,,,,
05/07/2009, 23:02:12, 251, 251000, 1014, 1980.276,,,,,,,
05/07/2009, 23:02:13, 252, 252000, 1014, 1988.166,,,,,,,
05/07/2009, 23:02:14, 250, 250000, 1014, 1972.387,,,,,,,
05/07/2009, 23:02:15, 252, 252000, 1014, 1988.166,,,,,,,
05/07/2009, 23:02:16, 251, 251000, 1014, 1980.276,,,,,,,
05/07/2009, 23:02:17, 251, 251000, 1014, 1980.276,,,,,,,
05/07/2009, 23:02:18, 247, 247000, 1014, 1948.718,,,,,,,
ERROR: 64 in GetQueuedCompletionStatus: The specified network name is no longer 
available.
SenderThread is exiting...
SenderThread exited successfully.
Stopping Source traffic, waiting 5 sec.
SenderThread exited successfully.
WSACleanup successful.

Sink

 C:\qos>qostraffic.exe -sink -tcp
Parsing command line...
Listening on all IP addresses.
WSAStartup successful.
Waiting for TCP traffic on port 9999, hit CTRL+C to exit...
AcceptEx has successfully completed.
Overlapped AcceptEx signaled.
Connection received: ::ffff:157.59.28.243:56677 --> ::ffff:192.168.1.100:9999
Date, Time, Packets received, Bytes received, Elapsed time (msec), Throughput (Kbps), Message
05/07/2009, 23:01:59, 498, 498000, 1014, 3928.994,
05/07/2009, 23:02:00, 248, 248000, 1014, 1956.607,
05/07/2009, 23:02:01, 251, 251000, 1014, 1980.276,
05/07/2009, 23:02:02, 251, 251000, 1014, 1980.276,
Overlapped AcceptEx signaled.
Connection received: ::ffff:157.59.28.243:56678 --> ::ffff:192.168.1.100:9999
Date, Time, Packets received, Bytes received, Elapsed time (msec), Throughput (Kbps), Message
AcceptEx has successfully completed.
05/07/2009, 23:02:03, 252, 252000, 1014, 1988.166,
05/07/2009, 23:02:04, 129, 125000, 1014, 986.193,
05/07/2009, 23:02:04, 247, 247000, 1014, 1948.718,
05/07/2009, 23:02:05, 126, 126000, 1014, 994.083,
05/07/2009, 23:02:05, 251, 251000, 1014, 1980.276,
05/07/2009, 23:02:06, 125, 125000, 1014, 986.193,
05/07/2009, 23:02:07, 251, 251000, 1014, 1980.276,
05/07/2009, 23:02:07, 126, 126000, 1014, 994.083,
05/07/2009, 23:02:08, 251, 251000, 1014, 1980.276,
05/07/2009, 23:02:08, 124, 124000, 1014, 978.304,
05/07/2009, 23:02:09, 247, 247000, 1014, 1948.718,
05/07/2009, 23:02:09, 127, 127000, 1015, 1000.985,
05/07/2009, 23:02:10, 251, 251000, 1014, 1980.276,
05/07/2009, 23:02:10, 125, 125000, 1014, 986.193,
05/07/2009, 23:02:11, 251, 251000, 1014, 1980.276,
05/07/2009, 23:02:11, 126, 126000, 1014, 994.083,
05/07/2009, 23:02:12, 251, 251000, 1014, 1980.276,
05/07/2009, 23:02:12, 125, 125000, 1014, 986.193,
05/07/2009, 23:02:13, 252, 252000, 1014, 1988.166,
05/07/2009, 23:02:14, 124, 124000, 1014, 978.304,
05/07/2009, 23:02:14, 250, 250000, 1014, 1972.387,
05/07/2009, 23:02:15, 126, 126000, 1014, 994.083,
05/07/2009, 23:02:15, 252, 252000, 1014, 1988.166,
05/07/2009, 23:02:16, 127, 127000, 1014, 1001.972,
05/07/2009, 23:02:16, 251, 251000, 1014, 1980.276,
05/07/2009, 23:02:17, 125, 125000, 1014, 986.193,
05/07/2009, 23:02:17, 251, 251000, 1014, 1980.276,
05/07/2009, 23:02:18, 124, 124000, 1014, 978.304,
05/07/2009, 23:02:18, 247, 247000, 1014, 1948.718,
Event set, thread exiting.
Receive thread exiting.
ReceiverThread exited successfully.
Control Event or Stop() called. TCP receive thread is exiting.
Main receive thread exited successfully.
WSACleanup successful.

The sink prints out statistics from both sources and was stopped using CTRL+C after about 20 seconds. Both traffic sources then exit gracefully. A full list of options is shown below.

 C:\qos>qostraffic.exe -?
Parsing command line...
Need to specify -source or -sink flag.

QoS Traffic Generator (Daytona), v. 1.0

Usage:

Sink: qostraffic -sink -tcp/-udp/-tcp_a 
                 [-dest destIP,destPort -local localIP,localPort] ...
Source: qostraffic -source -tcp/-udp/-tcp_a -dest destIP,destPort 
                   -throttle rate
                   [-local localIP,localPort -duration sec] ...

Sink flags:
-tcp/-udp       Listens for TCP/UDP traffic
                default: listens on all addresses, port 9999
-tcp_a          Connects to source and then begins receiving traffic
                Source must also specify -tcp_a flag
                Note: start the source first, then the sink
-dest           OPTIONAL
                Destination address to connect to for -tcp_a
                Ignored for -tcp/-udp cases
-local          OPTIONAL
                Listens on specific local address/port
                default port: 9999
                Note: Can specify different port to listen on with,
                      localPort only.
-qwave          OPTIONAL
                Starts up qWave service.
                Used for adaptive flows from the source.
-noconsole      OPTIONAL
                Suppresses console output
                default is not suppressed
Source flags:
-tcp/-udp       Listens for TCP/UDP traffic
-tcp_a          Accepts connection from sink then sends traffic
                Sink must also specify -tcp_a flag
                Note: start the source first, then the sink
-dest           Send traffic to destination address/port
                default port: 9999
                Note: ignored for -tcp_a case
-throttle       Throttles traffic at specified rate (bits/sec)
-pull           OPTIONAL
                Operates the source in pull mode.
                Note: supported for TCP traffic only.
-local          OPTIONAL
                Send traffic from specified local address/port
                default port: 9999
                Note: for -tcp_a case, this is the local address to 
                      listen on
-duration       OPTIONAL
                Send traffic for specified time (sec)
                default: infinite
-stats          OPTIONAL
                Prints out statistics for specified time (msec)
                default: 1000 msec
                minimum: 200 msec
-qwave          OPTIONAL
                Uses qWave with the specified options (all optional)
                ,, trafficType: traffic type defined by QoS subsystem BE - best effort (default) BCK - background EE - excellent effort AV - audio/video VO - voice CTRL - control adaptive: force use adaptive flow default is nonadaptive lltd: force use LLTD packets default lets system choose LLTD or not flowfund: prints out QueryFlowFundamentals prints bandwidth estimations every 25 ms only supported when using adaptive flows EXAMPLE: -qwave AV,LLTD -server Optional, when used with qWave will prevent doing 
 QOSStartTracking/QOSStopTracking Note: conflicts with -tc flag. -tc OPTIONAL Uses TC with the specified options (all optional) ,<1p> dscp: DSCP value ranging from 0 to 63 default lets system choose 1p: 802.1p tag ranging from 0 to 7 default lets system choose Specifying -1 for either value is equivalent to 
 default. EXAMPLE: -tc 40,4 Note: conflicts with -qwave flag. Must be run as 
 admin. -packet OPTIONAL Performs packet experiments with given options (all 
 required) ,, size - size of each packet in bytes num - number of packets to send interval - time between each send in ms EXAMPLE: -packet 59,50,100 This will send a 59 byte packet every 100 ms, 50 
 times total. Note: packets can be tagged by using -tc options. -log OPTIONAL Logs to the specified file default filename: is "daytona_.txt" -noconsole OPTIONAL Suppresses console output default is not suppressed -localstats OPTIONAL Prints statistics from source default is sink side stats Note: conflicts with packet option, results will be 
 undefined -tolerance OPTIONAL Specify tolerance If no tolerance will assume 2%

Hopefully this post has been helpful in understanding what the QoS Traffic Generator can do. Please send us any comments you have!

  -- Jim Liu

Comments

  • Anonymous
    May 21, 2009
    This does not show how the Qos Traffic Generator is marking the packets (DSCP, IP Precedence). It is only showing how to send UDP/ TCP packets.

  • Anonymous
    May 29, 2009
    Thanks for your comment Mayer. Can you elaborate a bit? If you run "qostraffic.exe -source -tcp -dest 192.168.1.100 -throttle 2000000 -tc 40,4", you are using Traffic Control to tag packets with a DSCP value of 40 and an 802.1p value of 4. To see how the API does that, you can look at tc.cpp from the source code.

  • Anonymous
    August 29, 2009
    Hi, i have some question about the CLI application "qostraffic"

  • It is also supported under Windows XP?
  • which NIC is supported (Intel, broadcom, Nvidia)
  • 802.1p means support of 802.1Q. Can i define the VLAN ID also with the application? Thanks for your support. Cheers Norbert
  • Anonymous
    October 04, 2009
    The comment has been removed

  • Anonymous
    January 19, 2010
    The comment has been removed

  • Anonymous
    February 06, 2010
    ... is Windows 7 also handeld by this tool?

  • Anonymous
    June 23, 2010
    hi~ I download qostraffic today. But i can't run qostraffic.exe. When i run "qustraffic.exe", my computer print  out  error message. This program require something. My computer os is windows2003 and windows xp. This "qostraffic.exe " run success in windows xp. But i can't run this program in windows 2003.