QoS analysis with Qos Traffic Generator

PiPo e2H – Soluciones TIC Avanzadas Jose Luis Gomez Ferrer de Couto – CCA, VCP410, ACE, VTSP, VSP

8dic/092

Generando paquetes para comprobar el funcionamiento correcto de QoS en nuestra red

Cuando implementamos reglas de tráfico en nuestros dispositivos de red nos queda la duda si estamos realizando un filtrado correcto. Para ello podemos utilizar la herramienta Qos Traffic Generator, la cual genera tráfico TCP/UDP con la opción de cliente/servidor y la marca DiffServ que deseemos.

qostrafficEn el artículo vamos a mostrar como generar paquetes con una marca y lo monitorizaremos con Wireshark, por lo tanto necesitamos tener instalado Wireshark en un equipo. Para realizar la instalación de esta herramienta podemos seguir el artículo Análisis de red con Wireshark.

Los pasos que vamos a realizar durante el artículo serán los siguientes:

  1. Descarga de la herramienta Qos Traffic Generator.
  2. Aspectos básicos de la herramienta.
  3. Monitorización de un paquete generado por Qos Traffic Generator.

Descarga de la herramienta Qos Traffic Generator

La descarga de la herramienta la podemos realizar desde el sitio oficial de Microsoft Connect. Una vez nos encontremos en la página elegimos la herramienta Qos Traffic Generator y en la parte inferior hacemos clic en el botón Descargar.

qos2

Una vez descargada descomprimimos el fichero donde deseemos. Decir que no dispone de un instalador, por lo que tendremos tres directorios, uno con el código para compilar la aplicación, otro con la aplicación compilada en 32 bits y otro con la aplicación compilada en 64 bits.

qos3

Aspectos básicos de la herramienta

Una vez que tenemos nuestra herramienta disponible, abrimos una consola del sistema y nos situamos en el directorio de la versión deseada. Para ver las diferentes opciones que permite la herramienta basta con ejecutarla, para ello tecleamos qostraffic.

qos4

A continuación mostramos una lista detallada de todas las opciones disponibles que permite la herramienta para la generación de tráfico.

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%

Disponemos de dos modos de ejecución en nuestra herramienta, el modo servidor (-source) el cual nosotros somos el origen del tráfico tan sólo UDP y el modo cliente/servidor (-sink), donde dejamos corriendo un proceso de qostraffic en modo escucha, para poder generar tráfico de tipo TCP.

En nuestro caso no vamos a usar cliente alguno, sólo ejecutaremos en modo servidor, generando nosotros el tráfico UDP sin esperar respuesta alguna. Para ello ejecutamos la herramienta con los siguientes valores que detallaremos:

qostraffic.exe -source -udp -dest 192.168.1.1 -throttle 1000 -duration 2 -tc 40,4

  • qostraffic.exe -> Ejecutable.
  • -source -> Modo servidor, somos los generadores del tráfico.
  • -udp -> Generamos tráfico de tipo UDP.
  • -dest -> Introducimos la dirección IP hacia la que deseamos enviar el tráfico.
  • -throttle -> Tamaño del tráfico enviado bits/sec.
  • -duration -> Duración del envío de tráfico sec.
  • -tc -> Marca DSCP/802.1p en el tráfico que generamos.

qos5

qos6

Monitorización de un paquete generado por Qos Traffic Generator

El siguiente paso será comprobar que correctamente se está marcando el tráfico, para ello lanzaremos qostraffic y realizaremos una captura con Wireshark.

QoS

aaTraffic 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>,<adaptive>,<lltd>
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 QOSStartTracki
ng/QOSStopTracking
Note: conflicts with -tc flag.
-tc             OPTIONAL
Uses TC with the specified options (all optional)
<dscp>,<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>,<num>,<interval>
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_<timestamp>.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%

  • Share/Bookmark

¿Te gustó este artículo?

¡Suscríbete a nuestro feed RSS!

Acerca de José Luis Gómez Ferrer de Couto

Administrador TIC en Soltel Soluciones Informáticas
Comentarios (2) Trackbacks (0)
  1. Amigo.
    Todos tus post son excelentes.
    Gracias por compartir tus conocimientos.

  2. Hola Armando,

    Es todo un alago tu comentario. Gracias a ti por ser uno de esos lectores que se pasan por el blog y leen los artículos. Eso hace que las ganas por transmitir lo que uno aprende sean mayores.

    Un saludo y una vez má gracias.


Deja un comentario


Aún no hay trackbacks.