You are on page 1of 24

Mediciones Extremo a Extremo

Carlos Vicente
Servicios de Red
Universidad de Oregon
Introduccin

Las mediciones extremo a extremo (end-to-end)


proporcionan ms informacin gracias a la
colaboracin entre cliente y servidor a la hora
de crear los reportes

Problemas end-to-end:
Naturaleza de Internet: mltiples redes entre
dos puntos, con distintas capacidades,
hardware y polticas de trfico
En los extremos, protocolos relativamente
antiguos como TCP proveen rendimientos
sub-ptimos con sus parmetros por defecto
Conceptos

Factor bandwidth-delay (ancho de banda


por retardo)
bw * rtt

Cantidad de bytes en la red en un


momento dado

Da una idea del tamao de ventana TCP


Por ejemplo, para un un enlace de 100 Mbps y un retardo promedio de 8
ms.
ptimo
(100 x 10^6) ( 8 x 10^-3) = 800 x 10^3 = 800 K
ttcp

Herramienta clsica para medir


throughput o rendimiento extremo a
extremo de conexiones TCP y UDP

Originalmente para mover archivos

Necesita dos estaciones, un cliente y un


servidor

Mltiples parmetros para controlar la


conexin

Pueden utilizarse estaciones en cadena


Parmetros ms relevantes
-t Transmit mode.

-r Receive mode.

-u Use UDP instead of TCP.

-s If transmitting, source a data pattern to network; if receiving, sink (discard) the data. Without the
-s option, the default is to transmit data from stdin or print the received data to stdout.

-l length Length of buffers in bytes (default 8192). For UDP, this value is the number of data bytes in each
packet. The system limits the maximum UDP packet length. This limit can be changed with the -b option.

-b size Set size of socket buffer. The default varies from system to system. This parameter affects the maxi-
mum UDP packet length. It may not be possible to set this parameter on some systems (for example,
4.2BSD).

-n numbufs
Number of source buffers transmitted (default 2048).

-D If transmitting using TCP, do not buffer data when sending (sets the TCP_NODELAY socket option). It
may not be possible to set this parameter on some systems (for example, 4.2BSD).

-f format Specify, using one of the following characters, the format of the throughput rates as kilobits/sec
('k'), kilobytes/sec ('K'), megabits/sec ('m'), megabytes/sec ('M'), gigabits/sec ('g'), or giga-
bytes/sec ('G'). The default is 'K'.

-v Verbose: print more statistics.


Ejemplos
# ttcp -r -s -f m (servidor)

# ttcp -t -s -f m host -v (cliente)

ttcp-r: buflen=8192, nbuf=2048, align=16384/0, port=5001 tcp


ttcp-r: socket
ttcp-r: accept from X.X.51.40
ttcp-r: 16777216 bytes in 48.06 real seconds = 2.66 Mbit/sec +++
ttcp-r: 12116 I/O calls, msec/call = 4.06, calls/sec = 252.08
ttcp-r: 0.0user 0.0sys 0:48real 0% 0i+0d 0maxrss 0+2pf 12252+0csw
Ejercicio

Probar rendimiento en una cadena de 3


mquinas

Comparar con resultados sin las


(host3)
# mquinas
ttcp -r -s -f mintermedias

(host2)
# ttcp -r | ttcp -t host3

(host1)
# ttcp -t -s -f m host2 -v
iperf

Parecido a ttcp, con algunas mejoras y


ms funciones

Excelente para determinar los


parmetros ptimos de TCP
Permite modificar el tamao de ventana TCP

Con UDP, genera reportes de jitter y


prdida de paquetes

Permite generar mltiples sesiones en


paralelo, usando threads

Parmetros Iperf
Usage: iperf [-s|-c host] [options]
iperf [-h|--help] [-v|--version]

Client/Server:
-f, --format [kmKM] format to report: Kbits, Mbits, KBytes, MBytes
-i, --interval # seconds between periodic bandwidth reports
-l, --len #[KM] length of buffer to read or write (default 8 KB)
-m, --print_mss print TCP maximum segment size (MTU - TCP/IP header)
-p, --port # server port to listen on/connect to
-u, --udp use UDP rather than TCP
-w, --window #[KM] TCP window size (socket buffer size)
-B, --bind <host> bind to <host>, an interface or multicast address
-C, --compatibility for use with older versions does not sent extra msgs
-M, --mss # set TCP maximum segment size (MTU - 40 bytes)
-N, --nodelay set TCP no delay, disabling Nagle's Algorithm
-V, --IPv6Version Set the domain to IPv6

Server specific:
-s, --server run in server mode
-U, --single_udp run in single threaded UDP mode
-D, --daemon run the server as a daemon

Client specific:
-b, --bandwidth #[KM] for UDP, bandwidth to send at in bits/sec
(default 1 Mbit/sec, implies -u)
-c, --client <host> run in client mode, connecting to <host>
-d, --dualtest Do a bidirectional test simultaneously
-n, --num #[KM] number of bytes to transmit (instead of -t)
-r, --tradeoff Do a bidirectional test individually
-t, --time # time in seconds to transmit for (default 10 secs)
-F, --fileinput <name> input the data to be transmitted from a file
-I, --stdin input the data to be transmitted from stdin
-L, --listenport # port to recieve bidirectional tests back on
-P, --parallel # number of parallel client threads to run
-T, --ttl # time-to-live, for multicast (default 1)
iperf - TCP
$ iperf -s
------------------------------------------------------------
Server listening on TCP port 5001
TCP window size: 4.77 MByte (default)
------------------------------------------------------------
[ 4] local x.x.250.135 port 5001 connected with x.x.60.27 port 53259
[ 4] 0.0-10.2 sec 115 MBytes 94.1 Mbits/sec

# iperf -c host1
------------------------------------------------------------
Client connecting to nsdb, TCP port 5001
TCP window size: 64.0 KByte (default)
------------------------------------------------------------
[ 3] local x.x.60.27 port 53259 connected with x.x.250.135 port 5001
[ 3] 0.0-10.1 sec 115 MBytes 95.7 Mbits/sec
Iperf - UDP
# iperf -c host1 -u -b100M
------------------------------------------------------------
Client connecting to nsdb, UDP port 5001
Sending 1470 byte datagrams
UDP buffer size: 106 KByte (default)
------------------------------------------------------------
[ 3] local 128.223.60.27 port 39606 connected with 128.223.250.135 port 5001
[ 3] 0.0-10.0 sec 114 MBytes 95.7 Mbits/sec
[ 3] Sent 81377 datagrams
[ 3] Server Report:
[ 3] 0.0-10.0 sec 114 MBytes 95.7 Mbits/sec 0.184 ms 1/81378 (0.0012%)

$ iperf -s -u -i 1
------------------------------------------------------------
Server listening on UDP port 5001
Receiving 1470 byte datagrams
UDP buffer size: 108 KByte (default)
------------------------------------------------------------
[ 3] local 128.223.250.135 port 5001 connected with 128.223.60.27 port 39606
[ 3] 0.0- 1.0 sec 11.4 MBytes 95.4 Mbits/sec 0.184 ms 0/ 8112 (0%)
[ 3] 1.0- 2.0 sec 11.4 MBytes 95.7 Mbits/sec 0.177 ms 0/ 8141 (0%)
[ 3] 2.0- 3.0 sec 11.4 MBytes 95.6 Mbits/sec 0.182 ms 0/ 8133 (0%)
[ 3] 3.0- 4.0 sec 11.4 MBytes 95.7 Mbits/sec 0.179 ms 0/ 8140 (0%)
[ 3] 4.0- 5.0 sec 11.4 MBytes 95.7 Mbits/sec 0.180 ms 0/ 8136 (0%)
[ 3] 5.0- 6.0 sec 11.4 MBytes 95.7 Mbits/sec 0.143 ms 0/ 8140 (0%)
[ 3] 6.0- 7.0 sec 11.4 MBytes 95.7 Mbits/sec 0.179 ms 0/ 8137 (0%)
[ 3] 7.0- 8.0 sec 11.4 MBytes 95.7 Mbits/sec 0.184 ms 0/ 8138 (0%)
[ 3] 8.0- 9.0 sec 11.4 MBytes 95.7 Mbits/sec 0.177 ms 0/ 8139 (0%)
[ 3] 9.0-10.0 sec 11.4 MBytes 95.7 Mbits/sec 0.180 ms 0/ 8137 (0%)
[ 3] 0.0-10.0 sec 114 MBytes 95.7 Mbits/sec 0.184 ms 1/81378 (0.0012%)
Ejercicio Iperf

Probar TCP con varios tamaos de ventana (-w)

Verificar el TCP MSS (-m). Cmo afecta esto el


rendimiento? Qu es Path MTU discovery?

Probar con dos threads en paralelo (-P) y


comparar los totales. Hay alguna diferencia?
Por qu?

Probar con diferentes tamaos de paquete y la


opcin TCP_NODELAY (-N)

Probar con Ipv6 (-V). Alguna diferencia?

Probar haciendo un duplex mismatch entre el


switch y la mquina (si es posible)
OWAMP

One Way Active Measurement Protocol


Qu es?

Protocolo de control

Protocolo de prueba

Nombre de la herramienta que los implementa
Enfasis en retardo, no en throughput

Motivacin
La congesitin ocurre en un sentido casi siempre
Rutas IP asimtricas
Intervalos de SNMP enmascaran niveles de colas altos (rfagas)
Existan varias soluciones pero se necesitaba estandarizacin
OWAMP
Meta:

Extender los servidores de pruebas a cada
GigaPOP, cada nodo Internet2, etc.

One particularly compelling vision is of widespread


deployment of open
OWAMP servers that would make measurement of one-way
delay as
commonplace as measurement of round-trip time using an
ICMP-based
http://www.internet2.edu/~shalunov/ippm/draft-ietf-ippm-owdp-14.txt
tool like ping.
OWAMP: Protocolo de Control

Soporta autenticacin y autorizacin

Configuracin de las pruebas


Control de los nmeros de puerto
Horario de envos
Tamaos de paquetes
Recoleccin de los resultados
OWAMP: Protocolo de Pruebas

El trfico puede ser:


Abierto
Autenticado
Cifrado
OWAMP: Arquitectura
owping

El cliente owping solicita pruebas de un


servidor owampd.

El cliente puede ser el que emisor o el


receptor

Permite realizar varias pruebas


simultneas
owampd

Recibe las solicitudes de pruebas

Acepta o deniega el acceso

Ejecuta las pruebas

Las sesiones con paquetes recibidos en el


servidor se pueden guardar para su
verificacin posterior
OWAMP: Asignacin de
Recursos

Cada conexin se clasifica y se le asocia


un grupo de lmites:
Ancho de banda
Espacio en disco (para informacin de
sesiones)
Retencin de datos
Poltica de conexin
OWAMP: Ejemplo local (IPv6)
# owampd -a O -f -v -Z
...

$ owping -c 1000 -A O host1


Approximately 102.9 seconds until results available

--- owping statistics from [x:x:x:101::80df:fa87]:42152 to [host1]:39658


---
SID: 80df3c1bc85ea3b7fd6bca539e3ff769
1000 sent, 0 lost (0.000%), 0 duplicates
one-way delay min/median/max = 1.74/2.3/183 ms, (err=661 ms)
one-way jitter = 0.1 ms (P95-P50)
TTL not reported
no reordering

--- owping statistics from [host1]:39659 to [x:x:x:101::80df:fa87]:42153


---
SID: 80dffa87c85ea3b7fdc3ce20a3739daa
1000 sent, 0 lost (0.000%), 0 duplicates
one-way delay min/median/max = -1.48/-1/193 ms, (err=658 ms)
one-way jitter = 0 ms (P95-P50)
TTL not reported
no reordering
OWAMP: Ejemplo con Abilene-
Denver
# owping -c 1000 -AO 2001:468:10:2:203:47FF:FED5:C585
Approximately 102.8 seconds until results available

--- owping statistics from [x:x:x:3c:2e0:81ff:fe03:a00a]:39694 to


[2001:468:10:2:203:47FF:FED5:C585]:62746 ---
SID: fed5c585c85eb46e82cb6bf96eaab3ed
1000 sent, 0 lost (0.000%), 0 duplicates
one-way delay min/median/max = 17.3/17.4/17.9 ms, (err=684 ms)
one-way jitter = 0.1 ms (P95-P50)
Hops = 5 (consistently)
no reordering

--- owping statistics from [2001:468:10:2:203:47FF:FED5:C585]:62747 to


[x:x:x:3c:2e0:81ff:fe03:a00a]:39695 ---
SID: fe03a00ac85eb46e88a393ee0dd065a2
1000 sent, 0 lost (0.000%), 0 duplicates
one-way delay min/median/max = 20/20.1/34.3 ms, (err=680 ms)
one-way jitter = 0.1 ms (P95-P50)
TTL not reported
Ejercicio OWAMP

Ejecutar un servidor en cada mquina.


owping local (a la direccin IP propia)
owping a la mquina vecina

Pruebas con el nodo Internet2 ms


cercano (?)
Referencias

Manual de usuario de Iperf.


http://dast.ncsa.uiuc.edu/Projects/Iperf/iperfdocs_1.7.0.html

OWAMP Cookbook.
http://e2epi.internet2.edu/npw/binder-docs/owamp-cookbook

IETF draft.
http://www.internet2.edu/~shalunov/ippm/draft-ietf-ippm-owd

You might also like