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.
En 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:
- Descarga de la herramienta Qos Traffic Generator.
- Aspectos básicos de la herramienta.
- 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.
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.
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.
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.
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 trafficdefault: listens on all addresses, port 9999-tcp_a Connects to source and then begins receiving trafficSource must also specify -tcp_a flagNote: start the source first, then the sink-dest OPTIONALDestination address to connect to for -tcp_aIgnored for -tcp/-udp cases-local OPTIONALListens on specific local address/portdefault port: 9999Note: Can specify different port to listen on with ,localPort only.-qwave OPTIONALStarts up qWave service.Used for adaptive flows from the source.-noconsole OPTIONALSuppresses console outputdefault is not suppressedSource flags:-tcp/-udp Listens for TCP/UDP traffic-tcp_a Accepts connection from sink then sends trafficSink must also specify -tcp_a flagNote: start the source first, then the sink-dest Send traffic to destination address/portdefault port: 9999Note: ignored for -tcp_a case-throttle Throttles traffic at specified rate (bits/sec)-pull OPTIONALOperates the source in pull mode.Note: supported for TCP traffic only.-local OPTIONALSend traffic from specified local address/portdefault port: 9999Note: for -tcp_a case, this is the local address to listen on-duration OPTIONALSend traffic for specified time (sec)default: infinite-stats OPTIONALPrints out statistics for specified time (msec)default: 1000 msecminimum: 200 msec-qwave OPTIONALUses qWave with the specified options (all optional)<trafficType>,<adaptive>,<lltd>trafficType: traffic type defined by QoS subsystemBE - best effort (default)BCK - backgroundEE - excellent effortAV - audio/videoVO - voiceCTRL - controladaptive: force use adaptive flowdefault is nonadaptivelltd: force use LLTD packetsdefault lets system choose LLTD or notflowfund: prints out QueryFlowFundamentalsprints bandwidth estimations every 25 msonly supported when using adaptive flowsEXAMPLE: -qwave AV,LLTD-server Optional, when used with qWave will prevent doing QOSStartTracking/QOSStopTrackingNote: conflicts with -tc flag.-tc OPTIONALUses TC with the specified options (all optional)<dscp>,<1p>dscp: DSCP value ranging from 0 to 63default lets system choose1p: 802.1p tag ranging from 0 to 7default lets system chooseSpecifying -1 for either value is equivalent to default.EXAMPLE: -tc 40,4Note: conflicts with -qwave flag. Must be run as admin.-packet OPTIONALPerforms packet experiments with given options (all required)<size>,<num>,<interval>size - size of each packet in bytesnum - number of packets to sendinterval - time between each send in msEXAMPLE: -packet 59,50,100This will send a 59 byte packet every 100 ms, 50 times total.Note: packets can be tagged by using -tc options.-log OPTIONALLogs to the specified filedefault filename: is "daytona_<timestamp>.txt"-noconsole OPTIONALSuppresses console outputdefault is not suppressed-localstats OPTIONALPrints statistics from sourcedefault is sink side statsNote: conflicts with packet option, results will be undefined-tolerance OPTIONALSpecify toleranceIf no tolerance will assume 2%
¿Te gustó este artículo?
Aún no hay trackbacks.







17 abril, 2010 - 06:29
Amigo.
Todos tus post son excelentes.
Gracias por compartir tus conocimientos.
17 abril, 2010 - 07:28
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.