Documentos de Académico
Documentos de Profesional
Documentos de Cultura
-
Redes inalmbricas Ad Hoc
A. Conceptos generales
B. Encaminamiento
i. DSR
ii. AODV
iii. OLSR
C. Calidad de servicio
D. Control de potencia
Nitin H. Vaidya, Tutorial on Mobile Ad Hoc Networks: Routing, MAC and Transport
agradecimientos/acknowledgments Issues disponible en http://www.crhc.uiuc.edu/wireless/tutorials.html
2
Ubicua/2006-2007
Computacin Ubicua/2006-2007 Porqu las redes ad hoc?
o No se dispone
o Puede haber sido destruida, por ejemplo en entornos de desastres
naturales
Redes Inalmbricas
3
Ubicua/2006-2007
Computacin Ubicua/2006-2007 Un caso ejemplar: Traffic networks
Coches inteligentes y carreteras Por ejemplo: FleetNet Internet on the
inteligentes. Los sistemas de abordo Road. Ad Hoc Radio Network for Inter-
hablan con la carreteras. Vehicle Communications
Inalmbricas yy Computacin
o http://www.fleetnet.de
Ofrece:
Redes Inalmbricas
o La capacidad de proceso
o Capacidad de encaminamiento
o Las tecnologas utilizadas
A
A menos
menos que
que est
est indicado
indicado dede otra
otra
manera,
manera, se
se asume
asume implcitamente
implcitamente el el
entorno
entorno completamente simtrico en el
completamente simtrico en el
que todos los nodos tienen idnticas
que todos los nodos tienen idnticas
capacidades
capacidades yy responsabilidades
responsabilidades
5
Ubicua/2006-2007
Computacin Ubicua/2006-2007 Retos de las redes ad hoc
Cmo encaminar paquetes entre estaciones
Cmo hacerlo de forma eficiente
Otros retos:
Inalmbricas yy Computacin
o Calidad de servicio
o Configuracin
o Descubrimiento de servicios
o Seguridad y privacidad
Redes Inalmbricas
o Prestaciones TCP
o ...
Limitaciones de las redes ad hoc
Redes
aplicaciones
Middleware
Inalmbricas yy Computacin
TCP/UDP
TCP
seguridad
zeroconf
MobileIP
Redes Inalmbricas
IP
Redes
7
Tema 4.-
Redes inalmbricas Ad Hoc
A. Conceptos generales
B. Encaminamiento
i. DSR
ii. AODV
iii. OLSR
C. Calidad de servicio
msg
Redes
9
Ubicua/2006-2007
Computacin Ubicua/2006-2007 Routing Overview
Which path?
o Generally try to optimize one of the following:
Shortest path (fewest hops)
Inalmbricas yy Computacin
1
0
Ubicua/2006-2007
Computacin Ubicua/2006-2007 MANET Routing Properties
No external network setup: self-configuring
Efficient when network topology is dynamic (frequent network
changes links break, nodes come and go)
Inalmbricas yy Computacin
Self Starting
Adapt to network conditions
Qualitative Properties
o Distributed operation
Redes Inalmbricas
o Loop Freedom
o Demand Based Operation
o Security
Redes
Host mobility
o link failure/repair due to mobility may have different characteristics than
those due to other causes
Inalmbricas yy Computacin
o energy consumption
o host position
Dynamic Solution much more difficult to be deployed
Redes
1
2
Ubicua/2006-2007
Computacin Ubicua/2006-2007 Tipos de protocolos de encaminamiento
Protocolos proactivos
o Determinan las rutas independientemente del modelo de trfico
Inalmbricas yy Computacin
1 Que
Que solucin
solucin adoptar
adoptar depende
depende del
del tipo
tipo di
di trafico
trafico yy del
del tipo
tipo de
de movilidad!!
movilidad!!
3
Ubicua/2006-2007
Computacin Ubicua/2006-2007 manet Working Group
scenarios
o MANETs are deployed at the edges of an IP infrastructure
o hybrid mesh infrastructures (e.g., a mixture of fixed and mobile routers)
should also be supported by MANET specifications and management
features.
1
4
Ubicua/2006-2007
Computacin Ubicua/2006-2007 Description of Working Group
1
5
Ubicua/2006-2007
Computacin Ubicua/2006-2007 Goals and Milestones
Done Post as an informational Internet-Drafts a discussion of mobile ad-hoc networking and issues.
Done Agenda bashing, discussion of charter and of mobile ad hoc networking draft.
Done Develop I-D for potential common manet encapsulation protocol approach
Done Submit initial I-D(s) of candidate proposed routing protocols and design frameworks
Done Develop a further focused problem statement and address an approach for a common engineering work effort
Done Reevaluate the WG's potential based on the problem statement consensus
Nov 05 Document initial implementation progress and experience Revise documents based upon implementation experience
Feb 06 Submit RMP specification and supporting documentation to IESG for publications as Proposed Standard
Feb 06 Submit PMP specification and supporting documentation to IESG for publications as Proposed Standard
Feb 06 Submit MANET flooding specification to IESG for publication as Experimental Standard
6
Ubicua/2006-2007
Computacin Ubicua/2006-2007 Protocolos propuestos
D. Johnson, D. Maltz, and Y-C. Hu. The Dynamic Source Routing Protocol for Mobile
Ad Hoc Networks (DSR), draft-ietf-manet-dsr-10.txt. Internet Draft (work in progress),
April 2003. http://www.ietf.org/internet-drafts/draft-ietf-manet-dsr-10.txt
C. Perkins, E. Belding-Royer, and S. Das. Ad hoc On-Demand Distance Vector
Inalmbricas yy Computacin
Y muchos ms:
o http://en.wikipedia.org/wiki/Ad_hoc_protocol_list
1
7
Ubicua/2006-2007
Computacin Ubicua/2006-2007 Protocolos propuestos
D. Johnson, D. Maltz, and Y-C. Hu. The Dynamic Source Routing Protocol for Mobile
Ad Hoc Networks (DSR), draft-ietf-manet-dsr-10.txt. Internet Draft (work in progress),
April 2003. http://www.ietf.org/internet-drafts/draft-ietf-manet-dsr-10.txt
C. Perkins, E. Belding-Royer, and S. Das. Ad hoc On-Demand Distance Vector
Inalmbricas yy Computacin
Y muchos ms:
o http://en.wikipedia.org/wiki/Ad_hoc_protocol_list
1
8
Ubicua/2006-2007
Computacin Ubicua/2006-2007 Uso del flooding para la entrega de datos
Z
controlado envio broadcast de una trama
S L
E
Redes Inalmbricas
B M
F
C J
Redes
D
A G
H K
N
I
destino
1
9
Ubicua/2006-2007
Computacin Ubicua/2006-2007 Uso del flooding para la entrega de datos
Y
nodo que acaba de enviar una trama
Z
envio broadcast de una trama
S L
E
Redes Inalmbricas
B F M
C J
Redes
A G D
H
K
N
I
posible colisin!!
2
0
Ubicua/2006-2007
Computacin Ubicua/2006-2007 Uso del flooding para la entrega de datos
Y
nodo que acaba de enviar una trama
Z
envio broadcast de una trama
S L
E
Redes Inalmbricas
B F M
J
C
Redes
A G D
H K
N
I
Z
envio broadcast de una trama
S L
E M
Redes Inalmbricas
B F
J
C
Redes
A G D
H K
N
I
recibe la trama de J y de K
(entre ellos son hidden)
2 posible colisin
2
Ubicua/2006-2007
Computacin Ubicua/2006-2007 Uso del flooding para la entrega de datos
Y
nodo que acaba de enviar una trama
Z
envio broadcast de una trama
S L
E M
Redes Inalmbricas
B F
J
C
Redes
A G D
H K
N
I
Z
envio broadcast de una trama
S L
E M
Redes Inalmbricas
B F
J
C
Redes
A G D
H K
N
I
El
Elflooding
floodingha
hateminado!
teminado!
2
4
Ubicua/2006-2007
Computacin Ubicua/2006-2007 Uso del flooding para la entrega de datos
Muchos protocolos utilizan el flooding (limitado) de los paquetes del control, en vez de los
paquetes de los datos.
Los paquetes de control se utilizan para descubrir las rutas.
Inalmbricas yy Computacin
Las rutas establecidas se utilizan posteriormente para enviar los paquetes de datos.
La sobrecarga que se debe al flooding de los paquetes de control se amortiza gracias a los
paquetes de los datos transmitidos entre los floodings consecutivos de paquetes del control.
Ventajas
Desventajas
Redes Inalmbricas
Sencillo
Overhead potencialmente muy alto
Es ms eficiente si la tasa de envo es
baja el overhead de los procesos de o en el peor de los casos todos los
bsqueda y mantenimiento de rutas nodos alcanzable por el nodo
explicitas resulte ser ms alto fuente recibirn los datos
Redes
2
7
Ubicua/2006-2007
Computacin Ubicua/2006-2007 Uso del Route Request en DSR
Y
nodo que acaba de enviar una RREQ
S [S]
E
Redes Inalmbricas
B M
F
C J
Redes
D
A G
H K
N
I
destino
2
8
Ubicua/2006-2007
Computacin Ubicua/2006-2007 Uso del Route Request en DSR
Y
nodo que acaba de enviar una RREQ
Z
[X,Y] lista de IDs aadidos al RREQ
L
E [S,E]
S L
Redes Inalmbricas
B F M
C [S,C] J
Redes
A G D
H
K
N
I
posible colisin!!
2
9
Ubicua/2006-2007
Computacin Ubicua/2006-2007 Uso del Route Request en DSR
Y
nodo que acaba de enviar una RREQ
Z
[X,Y] lista de IDs aadidos al RREQ
L
S L
E
Redes Inalmbricas
B F [S,E,F] M
J
C
Redes
A G [S,C,G] D
H K
N
I
Z
[X,Y] lista de IDs aadidos al RREQ
L
S L
E M
Redes Inalmbricas
B F J [S,E,F,J]
C
Redes
A G D
K[S,C,G,K]
H
N
I
recibe la trama de J y de K
(entre ellos son hidden)
3 posible colisin
1
Ubicua/2006-2007
Computacin Ubicua/2006-2007 Uso del Route Request en DSR
Y
nodo que acaba de enviar una RREQ
Z
[X,Y] lista de IDs aadidos al RREQ
L
L
S
E M [S,E,F,J,M]
Redes Inalmbricas
B F
J
C
Redes
A G D
H K
N
I
S RREP [S,E,F,J,D] L
E M
B F
J
C
Redes
A G D
H K
N
I
3
3
Ubicua/2006-2007
Computacin Ubicua/2006-2007 Route Reply en DSR
El uso del estndar IEEE 802.11 para enviar datos implica que los
canales son bi-direccionales (por que se utilizan los ACKs)
3
4
Ubicua/2006-2007
Computacin Ubicua/2006-2007 Dynamic Source Routing (DSR)
3
5
Ubicua/2006-2007
Computacin Ubicua/2006-2007 Data Delivery in DSR
La cabecera de los paquetes Y
va creciendo al aumentar de
la longitud de la ruta
Inalmbricas yy Computacin
Z
DATA [S,E,F,J,D]
S L
E M
B F
Redes Inalmbricas
J
C
A G D
Redes
H K
N
I
3
6
Ubicua/2006-2007
Computacin Ubicua/2006-2007 Optimizaciones de DSR: Route Caching (1/2)
Cada nodo guarda en cache todas las rutas que pueda descubrir
1. Cuando el nodo S descubre la ruta [S,E,F,J,D] hacia el nodo D, el
nodo S descubre tambin la ruta [S,E,F] hacia el nodo F
Inalmbricas yy Computacin
Z
Redes
E L
S
M
B F
J
C
A D
H G K
N
I
3
7
Ubicua/2006-2007
Computacin Ubicua/2006-2007 Optimizaciones de DSR: Route Caching (2/2)
un route discovery
Posible problema del uso de las caches:
o en entornos altamente mviles el uso de las caches puede afectar las
Y
Redes
prestaciones
Z
E L
S
M
B F
J
C
A K D
H G
N
I
3
8
Ubicua/2006-2007
Computacin Ubicua/2006-2007 Route Error (RERR)
J enva un route error a S utilizando la
ruta J-F-E-S cuando su intento de
entregar el paquete de datos a D falla
Inalmbricas yy Computacin
J
C
A G D
H K
N
I
3
9
Ubicua/2006-2007
Computacin Ubicua/2006-2007 Caractersticas adicionales
4
0
Ubicua/2006-2007
Computacin Ubicua/2006-2007 DSR: ventajas y desventajas
Se gestionan solo las rutas entre nodos El tamao de la cabecera crece al crecer
que quieren comunicarse de la ruta debido al uso del source
routing
o se reduce la carga para El flooding de las peticiones de ruta
Inalmbricas yy Computacin
4
1
Tema 4.-
Redes inalmbricas Ad Hoc
A. Conceptos generales
B. Encaminamiento
i. DSR
ii. AODV
iii. OLSR
C. Calidad de servicio
D. Control de potencia
4
3
Ubicua/2006-2007
Computacin Ubicua/2006-2007 Distance Vector
1 2
A B C
Dest. Next Metric Dest. Next Metric Dest. Next Metric
A A 0 A A 1 A B 3
B B 1 B B 0 B B 2
C B 3 C C 2 C C 0
Routing table
is updated (A, 1) (A, 1)
(B, 0) (B, 0)
(C, 1) (C, 1)
Redes
1 1
A B C
Dest. Next Metric Dest. Next Metric Dest. Next Metric
A A 0 A A 1 A B 3 2
B B 1 B B 0 B B 1
C B 3 2 C C 1 C C 0
broadcasts to update
Inalmbricas yy Computacin
tables of C, B, A with
new entry for D
Redes Inalmbricas
(A, 1) (A, 2)
(B, 0) (B, 1)
(C, 1) (C, 0)
(D, 2) (D, 1) (D, 0)
Redes
1 1 1
A B C D
Dest. Next Metric Dest. Next Metric Dest. Next Metric
A A 0 A A 1 A B 2
B B 1 B B 0 B B 1
C B 2 C C 1 C C 0
D B 3 D C 2 D D 1
1 1 1
A B C D
Dest. Next Metric Dest.c Next Metric Dest. Next Metric
D B 3 D C 2 D D
B
1
Redes Inalmbricas
Redes
(D, 2) (D, 2)
1 1 1
A B C D
Dest. Next Metric Dest. Next Metric Dest. Next Metric
D B 3 D C 2 D B 3
(D,5)
(D,4) (D,4)
(D,3)
Redes
(D,2) (D,2)
1 1 1
A B C D
Dest. Next Metric Dest.c Next Metric Dest. Next Metric
D B 3, 5, D C 2, 4, 6 D B 3, 5,
El Route Reply recorre la ruta activada a travs del envo del Route
Request
5
1
Ubicua/2006-2007
Computacin Ubicua/2006-2007 Envio del Route Request
Y
nodo que acaba de enviar una trama
Inalmbricas yy Computacin
S L
E
Redes Inalmbricas
B M
F
C J
Redes
D
A G
H K
N
I
destino
5
2
Ubicua/2006-2007
Computacin Ubicua/2006-2007 Envio del Route Request
Y
nodo que acaba de enviar una trama
Z
envi broadcast de una trama RREQ
Links de la ruta inversa
S L
E
Redes Inalmbricas
B F M
C J
Redes
A G D
H
K
N
I
posible colisin!!
5
3
Ubicua/2006-2007
Computacin Ubicua/2006-2007 Envio del Route Request
Y
nodo que acaba de enviar una trama
Z
envi broadcast de una trama RREQ
Links de la ruta inversa
S L
E
Redes Inalmbricas
B F M
J
C
Redes
A G D
H K
N
I
Z
envi broadcast de una trama RREQ
Links de la ruta inversa
S L
E M
Redes Inalmbricas
B F
J
C
Redes
A G D
H K
N
I
recibe la trama de J y de K
(entre ellos son hidden)
5 posible colisin
5
Ubicua/2006-2007
Computacin Ubicua/2006-2007 Envio del Route Request
Y
nodo que acaba de enviar una trama
Z
envi broadcast de una trama RREQ
Links de la ruta inversa
S L
E M
Redes Inalmbricas
B F
J
C
Redes
A G D
H K
N
I
Z
envi broadcast de una trama RREQ
Links de la ruta inversa
S L
E M
Redes Inalmbricas
B F
J
C
Redes
A G D
H K
N
I
5
7
Ubicua/2006-2007
Computacin Ubicua/2006-2007 Setup del la ruta de envo
Y
Los enlaces de la ruta de envo son
establecido cuando el mensaje de RREP
Inalmbricas yy Computacin
S L
E M
Redes Inalmbricas
F
B
J
C
Redes
A G D
H K
N
I
5
8
Ubicua/2006-2007
Computacin Ubicua/2006-2007 Route Reply in AODV
Detalles sobre el uso del route reply
o Un nodo intermedio (no el destino final) puede tambin enviar un Route
Reply (RREP) si conoce una ruta ms reciente que la que se sabe el
Inalmbricas yy Computacin
sender S
o Para determinar se la ruta conocida por un nodo intermedio es ms
reciente se utilizan los destination sequence numbers
Si Node:dsn >= RREQ:dsn no reenvio
o La probabilidad que un nodo intermedio enve un Route Reply es inferior
Redes Inalmbricas
Timeouts
o Una entry de una tabla de encaminamiento que esta memorizando un
reverse path es cancelada despus de un intervalo de timeout
este intervalo tiene que ser suficientemente largo para que el RREP pueda
volver hacia atrs
o Una entry de una tabla de encaminamiento que esta memorizando un
forward path es cancelada si no utilizada despus de un intervalo
active_route_timeout
5
9
Ubicua/2006-2007
Computacin Ubicua/2006-2007 Notificacin sobre interrupcin de enlaces
6
0
Ubicua/2006-2007
Computacin Ubicua/2006-2007 Link Failure Detection
6
1
Ubicua/2006-2007
Computacin Ubicua/2006-2007 Por que los Sequence Numbers in AODV
A B C D
E
o C efecta un route discovery buscando a D. EL nodo A recibe el RREQ,
Redes
A B C D
E
6
2
Tema 4.-
Redes inalmbricas Ad Hoc
A. Conceptos generales
B. Encaminamiento
i. DSR
ii. AODV
iii. OLSR
C. Calidad de servicio
D. Control de potencia
6
4
Ubicua/2006-2007
Computacin Ubicua/2006-2007 LSR vs. OLSR
La sobrecarga de hacer broadcasting
de la informacin sobre el estado de Son
los enlaces se reduce limitando el necesarias
24
Inalmbricas yy Computacin
To support QoS, the link state information such as delay, bandwidth, cost,
loss rate, and error rate in the network should be available and manageable.
However, getting and managing the link state information in MANETs is very
difficult because the quality of a wireless link is apt to change with the
Redes Inalmbricas
surrounding circumstances.
The resource limitations and the mobility of hosts make things more
complicated.
Hard QoS guarantee is not possible in MANETs
Redes
o Adaptive QoS
o Service Differentiation
See, for example:
o Carlos Miguel Tavares Calafate, M.P. Malumbres, Pietro Manzoni, "Performance
of H.264 compressed video streams over 802.11b based MANETs", IEEE
International Workshop on Wireless Ad Hoc Networking (WWAN 2004), Tokyo,
March 2004.
7
0
Ubicua/2006-2007
Computacin Ubicua/2006-2007 Effects of congestion and mobility: PSNR
Bursty losses
Several consecutive
frames lost (video
freezed)
Redes Inalmbricas
Random losses
More uniform
distortion decay
Congestion jitter:
relatively small
frequent variations
Redes Inalmbricas
Mobility jitter:
Redes
7
2
Ubicua/2006-2007
Computacin Ubicua/2006-2007 Main issues
protocols such as AODV or DSR, video transmission gaps are still too
large to be handled by a video codec
o H.264 codec tuning:
avoid high levels of packetization due to channel access overhead
Redes
Under high levels of packet loss, random updating intra macroblocks is more
effective that using I/P frames combinations
The use of multiple reference frames proved to be a bad choice
7
3
Ubicua/2006-2007
Computacin Ubicua/2006-2007 QoS in MANETs, an integrated vision
QoS Model
o DiffServ
o IntServ
Inalmbricas yy Computacin
QoS Routing
o QoS enabled routing (AODV/OLSR)
o CEDAR(Core-Extraction Distributed Ad-hoc Routing)
o Ticket based Probing (distributed QoS routing)
Redes
QoS MAC
o IEEE 802.11e
QoS
QoS in
o MACA/PR
(Multiple Access Collision Avoidance
with Piggyback Reservation) in
MANETs
o prioritised binary countdown (PBC)
7
... and
o SWAN: integrated proposal
MANETs
4 Mona Ghassemian, Kings College, September 2003
Ubicua/2006-2007
Computacin Ubicua/2006-2007 Integrated Services
Any data flow that desires better than best-effort delivery requests
and reserves resources at routers along the path
o RSVP is the recommended reservation protocol
If insufficient resources are available, the flow is denied admission
Redes Inalmbricas
o Monitors the flow to ensure that it does not consume more than the
reserved resources
Advantages
o Enables fine-grained QoS and resource guarantees
Disadvantages
o Not scalable, harder to administer
7
5
Ubicua/2006-2007
Computacin Ubicua/2006-2007 Differentiated Services
o No per-flow state
o Easier to administer
Disadvantages
o Cannot provide the same per-flow guarantees as IntServ
7
6
Ubicua/2006-2007
Computacin Ubicua/2006-2007 FQMM
FQMM is the first QoS Model proposed in 2000 for MANETs by Xiao
et al.
Inalmbricas yy Computacin
4
ingress
3
1
egress
6 7
5
7
7 Mona Ghassemian, Kings College, September 2003
Ubicua/2006-2007
Computacin Ubicua/2006-2007 QoS in MANETs, an integrated vision
QoS Model
o DiffServ
o IntServ
Inalmbricas yy Computacin
QoS Routing
o CEDAR(Core-Extraction Distributed Ad-hoc Routing)
o QoS enabled routing (AODV/OLSR)
o Ticket based Probing (distributed QoS routing)
Redes
QoS MAC
o IEEE 802.11e
QoS
QoS in
o MACA/PR
(Multiple Access Collision Avoidance
with Piggyback Reservation) in
MANETs
o prioritised binary countdown (PBC)
7
... and
o SWAN: integrated proposal
MANETs
8 Mona Ghassemian, Kings College, September 2003
Ubicua/2006-2007
Computacin Ubicua/2006-2007 QoS Signalling
7
9 Mona Ghassemian, Kings College, September 2003
Ubicua/2006-2007
Computacin Ubicua/2006-2007 INSIGNIA
Option field).
o It keeps flow state for the real time (RT) flows.
o It is Soft State. The argument is that assurance that resources are
Redes
8
0 Mona Ghassemian, Kings College, September 2003
Ubicua/2006-2007
Computacin Ubicua/2006-2007 INSIGNIA Features
Approach
o Adaptive QoS approach
Inalmbricas yy Computacin
o Fast Restoration
o QoS reporting: a feedback mechanism
o Adaptation according to network conditions
Redes
8
1 Seoung-Bum Lee, COMET Group, Netwokring 2000, Paris
Ubicua/2006-2007
Computacin Ubicua/2006-2007 INSIGNIA Principles
Soft-state
Redes Inalmbricas
8
2 Seoung-Bum Lee, COMET Group, Netwokring 2000, Paris
Ubicua/2006-2007
Computacin Ubicua/2006-2007 INSIGNIA IP option
PAYLOAD INDICATOR : base quality (BQ) packet / enhanced quality (EQ) packet
8
3 Seoung-Bum Lee, COMET Group, Netwokring 2000, Paris
Inalmbricas yy Computacin
Redes Inalmbricas Ubicua/2006-2007
Computacin Ubicua/2006-2007 Reservation Set-up
M2
MS
M1 MD
M3
M4
Redes
M2
Redes Inalmbricas
M
M22
MS
M1 MD
M3
Rerouting
Rerouting
M4
Redes
immediate restoration
Legend
RES/BQ packet
RES/EQ packet
BE packet
MAX reserved link
8 MIN reserved link
5 Seoung-Bum Lee, COMET Group, Netwokring 2000, Paris
Ubicua/2006-2007
Computacin Ubicua/2006-2007 Re-routing / Degradation
EQ degradation
Inalmbricas yy Computacin
MS
M1 MD
M3
M5
Rerouting
M4 bottleneck
Rerouting
Redes
node
M5
Packets sent at Source Mobile Node after Scaling Down to MINIMUM service
Inalmbricas yy Computacin
MS
M1 MD
M5
M4 bottleneck
node
Redes
QOS
QOSreport
report: :Scale
ScaleDown
Down
Pkts Received at Destination after Scaling Down to MINIMUM service Legend
Packets sent by Source Mobile Node in MIN service constant resource availability
Inalmbricas yy Computacin
detected
RES BQ MAX Max_BW Min_BW
MS
M1 MD
M5
M4 bottleneck
bottleneck
node
Redes
node
Pkts Received at Destination in MIN service
QOS
RESreport
BQ : Scale
MAX Up Max_BW Min_BW
Legend
RES/BQ packet
RES/EQ packet
BE packet
MAX reserved link
8 MIN reserved link
8 Seoung-Bum Lee, COMET Group, Netwokring 2000, Paris
Ubicua/2006-2007
Computacin Ubicua/2006-2007 QoS in MANETs, an integrated vision
QoS Model
o DiffServ
o IntServ
Inalmbricas yy Computacin
QoS Routing
o CEDAR(Core-Extraction Distributed Ad-hoc Routing)
o QoS enabled routing (AODV/OLSR)
o Ticket based Probing (distributed QoS routing)
Redes
QoS MAC
o IEEE 802.11e
QoS
QoS in
o MACA/PR
(Multiple Access Collision Avoidance
with Piggyback Reservation) in
MANETs
o prioritised binary countdown (PBC)
8
... and
o SWAN: integrated proposal
MANETs
9 Mona Ghassemian, Kings College, September 2003
Ubicua/2006-2007
Computacin Ubicua/2006-2007 QoS Routing
Precursors
AODV new fields. (4 new fields)
1. Maximum Delay,
2. Minimum Available Bandwidth,
3. List of Sources Requesting Delay Guarantees and
4. List of Sources Requesting Bandwidth Guarantees
9 Mona Ghassemian, Kings College, September 2003
1
Ubicua/2006-2007
Computacin Ubicua/2006-2007 QoS-sensitive extensions of AODV
QoS information is added to the RREQ
packet
Inalmbricas yy Computacin
RREP
9
2
Ubicua/2006-2007
Computacin Ubicua/2006-2007
Other Challenges for QoS Routing and Admission Control
Inalmbricas yy Computacin
Simultaneous
Intersecting X
Requests
Redes Inalmbricas
Redes
Simultaneous P Q
Parallel Requests
R S
9
3
Ubicua/2006-2007
Computacin Ubicua/2006-2007 Problem and Motivation in Hybrid Networks
QoS models for different domains (fixed vs. ad hoc) will not
converge in foreseeable future.
Inalmbricas yy Computacin
traffic.
Fixed
Redes
access network
Wireless Ad hoc
Wireless Ad hoc
QoS Routing
o CEDAR(Core-Extraction Distributed Ad-hoc Routing)
o QoS enabled routing (AODV/OLSR)
o Ticket based Probing (distributed QoS routing)
Redes
QoS MAC
o IEEE 802.11e
QoS
QoS in
o MACA/PR
(Multiple Access Collision Avoidance
with Piggyback Reservation) in
MANETs
o prioritised binary countdown (PBC)
9
... and
o SWAN: integrated proposal
MANETs
5 Mona Ghassemian, Kings College, September 2003
Ubicua/2006-2007
Computacin Ubicua/2006-2007 QoS in MANETs, an integrated vision
QoS Model
o DiffServ
o IntServ
Inalmbricas yy Computacin
QoS Routing
o CEDAR(Core-Extraction Distributed Ad-hoc Routing)
o QoS enabled routing (AODV/OLSR)
o Ticket based Probing (distributed QoS routing)
Redes
QoS MAC
o IEEE 802.11e
QoS
QoS in
o MACA/PR
(Multiple Access Collision Avoidance
with Piggyback Reservation) in
MANETs
o prioritised binary countdown (PBC)
9
... and
o SWAN: integrated proposal
MANETs
6 Mona Ghassemian, Kings College, September 2003
7
9
Redes
Redes Inalmbricas
Inalmbricas yy Computacin Ubicua/2006-2007
Computacin Ubicua/2006-2007
SWAN Model
Tema 4.-
Redes inalmbricas Ad Hoc
A. Conceptos generales
B. Encaminamiento
i. DSR
ii. AODV
iii. OLSR
C. Calidad de servicio
D. Control de potencia
Operacin
o Suministro de energa E(p) = i * v * tp
o Tiempo de transmisin del paquete
Tamao del paquete
Redes Inalmbricas
Ancho de banda
Lucent WaveLAN 2.4 GHz, 11Mbps
o Recepcin 240mA
Redes
o Transmisin 280mA
o V = 5 voltios
o tp = (ph/2*106 + pd/11*106)
J. C. Cano and P. Manzoni, A Performance Comparison of Energy Consumption for Mobile Ad Hoc
Networks Routing Protocols,'' Proceedings of the 8th IEEE/ACM MASCOTS 2000, August 2000
Inalmbricas yy Computacin
Escenario bsico
Patrn de escenario
25 estaciones inalmbricas
500m x 500m
Redes Inalmbricas
1
0
0
Ubicua/2006-2007
Computacin Ubicua/2006-2007 Escenario bsico
Energa Tx Energa Rx
100%
Consumo de Energa (%)
75%
Redes
50%
25%
0%
DSR AODV DSDV TORA
1
0
1
Ubicua/2006-2007
Computacin Ubicua/2006-2007 Impacto del patrn de movimiento
Resultados:
o El consumo de energa de los protocolos reactivos se incrementa a
medida que aumenta la velocidad de las estaciones
o El consumo de los protocolos proactivos se mantiene constante
Redes Inalmbricas
700
DSR AODV DSDV TORA
Consumo de energa (Julios)
600
500
Redes
400
300
200
100
0
0 5 10 15 20 25
Velocidad (m/s)
1
0
2
Ubicua/2006-2007
Computacin Ubicua/2006-2007 Impacto del nmero de estaciones
3500
DSR AODV DSDV TORA
Consumo de energa (Julios)
3000
2500
Redes
2000
1500
1000
500
0
10 20 30 40 50
Nmero de estaciones
1
0
3
Ubicua/2006-2007
Computacin Ubicua/2006-2007 Impacto del rea de la red
1000
DSR AODV DSDV TORA
Consumo de energa (Julios)
800
Redes
600
400
200
0
250mx250m 500mx250m 500mx500m 1000mx500m
MANET rea
1
0
4
Ubicua/2006-2007
Computacin Ubicua/2006-2007 Impacto del trfico de red
600
500
Redes
400
300
200
100
0
10 20 30
Protocolos de encaminamiento:
o Los protocolos reactivos (DSR y AODV) obtienen mejores prestaciones
en la mayora de los escenarios considerados
o DSR obtiene mejores prestaciones que AODV
o En escenarios extremos (velocidad, tamao) se deben considerar
Redes Inalmbricas
aproximaciones proactivas
Redes
1
0
6
Tema 4.-
Redes inalmbricas Ad Hoc
Aspectos relacionados:
o Configuracin cero
zeroconf: Zero Configuration Networking
o movilidad a nivel de red: mobileIP
o Whats new?
o http://www.ietf.org/html.charters/zeroconf-charter.html
Objetivo mnimo: dos ordenadores conectados entre s mediante un
cable cruzado por Ethernet, han de comunicarse entre s bajo IP,
sin necesidad de intervencin humana, ni servidores DHCP o DNS
o AppleTalk actualmente ya hace esto muy bien, conectando
Redes Inalmbricas
simplemente a un hub
Apple con Macs dotados de IEEE 802.11 Airport lo hace de modo
inalmbrico
Redes
1
0
8
Ubicua/2006-2007
Computacin Ubicua/2006-2007 zeroconf: reas de trabajo
router...)
2. Traducir entre nombres y direcciones IP sin un servidor DNS
3. Descubrir servicios, como por ejemplo impresoras, sin un Servicio de
Directorio
Redes Inalmbricas
1
0
9
Ubicua/2006-2007
Computacin Ubicua/2006-2007 zeroconf: objetivos
Requerimientos:
o Ha de configurar una mscara de red apropiada
o Ha de tener una direccin IP nica dentro de una subred
Redes
Best-effort allocation
o Los nodos responsables de la asignacin de direcciones intentan
asignar direcciones IP no utilizadas en la medida de la informacin de
que disponen y luego utilizan tcnicas de deteccin de conflictos para
los casos en los que haya conflicto.
1
1
5
zeroconf/asignacin de direcciones IP:
Ubicua/2006-2007
Computacin Ubicua/2006-2007 conflict-detection allocation - PWMRS
PWMRS
o C.E. Perkins, J.T. Malinen, R. Wakikawa, E.M. Belding-Royer, and Y.
Sun, IP Address Autoconfiguration for Ad Hoc Networks, draft-
Inalmbricas yy Computacin
1
1
6
zeroconf/asignacin de direcciones IP:
Ubicua/2006-2007
Computacin Ubicua/2006-2007 conflict-detection allocation - PWMRS
El nodo enva un Address Request (AREQ) por broadcast a sus
vecinos y arranca un temporizador.
o El AREQ contiene la direccin temporal y la tentativa.
Inalmbricas yy Computacin
DAD dbil:
o ser cuando no se puede garantizar el DAD en determinadas
circunstancias, pero esto es tolerable para el funcionamiento normal de
la red. se permite que haya DA pero se debe garantizar que dados dos
Redes
1
1
9
zeroconf/asignacin de direcciones IP:
Ubicua/2006-2007
Computacin Ubicua/2006-2007 conflict-free allocation
Prophet address allocation for large scale manet , Zhou, Ni, Mutka,
SIGCOMM 2003
Inalmbricas yy Computacin
Redes Inalmbricas
Redes
1
2
0
zeroconf/asignacin de direcciones IP:
Ubicua/2006-2007
Computacin Ubicua/2006-2007 conflict-free allocation
Los autores enfocan el problema de la autoconfiguracin de
direcciones IP como el de la asignacin de un conjunto de enteros
dentro de un rango dado a los distintos nodos de la MANET
Inalmbricas yy Computacin
1
2
1
zeroconf/asignacin de direcciones IP:
Ubicua/2006-2007
Computacin Ubicua/2006-2007 conflict-free allocation - Prophet
Ejemplo de funcionamiento: Cuando la red se inicia slo est A.
o R[1,8] Elige aleatoriamente el nmero 3 como
direccin IP y como semilla para f(n).
o f(n)=(address x state x11) mod 7
Inalmbricas yy Computacin
1
2
2
zeroconf/asignacin de direcciones IP:
Ubicua/2006-2007
Computacin Ubicua/2006-2007 conflict-free allocation - Prophet eleccin de f(n)
Si R es suficientemente grande y f(n) est convenientemente
diseada, se puede garantizar que las secuencias obtenidas
satisfacen:
Inalmbricas yy Computacin
luego se fusionen).
Los autores proponen una solucin aproximada basada en la
descomposicin en factores primos. Cualquier nmero puede
representarse nicamente por:
Redes
1
2
3
zeroconf/asignacin de direcciones IP:
Ubicua/2006-2007
Computacin Ubicua/2006-2007 best effort allocation
S.Nesargi, R.Prakesh MANETconf:Configuration of hosts in mobile
ad hoc networks, Proceedings of IEEE INFOCOM 2002
Protocolo distribuido, no impide el conflicto de direcciones pero
Inalmbricas yy Computacin
232.255.255.255
El nodo local y las direcciones SSM no requieren protocolo o
interaccin entre mltiples hosts
Los mbitos global y de organizacin local se entienden para redes
de mayor escala que los protocolos Zeroconf
Los paquetes multicast deben restringir su alcance lmite, y
suponemos que un router en la frontera es un boundary router como
1 se describe en RFC 2365
2
7
zeroconf/asignacin de direcciones IP multicast
Ubicua/2006-2007
Computacin Ubicua/2006-2007 escenarios y requerimientos
Asignacin de direcciones
o Hay que ser coherente desde la eleccin y la coordinacin hasta la reutilizacin
o Requerimientos
Inalmbricas yy Computacin
o Consideraciones en IPv6
Los protocolos de este servicio no tienen diferencias relacionadas con ZeroConf
Service Discovery Protocols (SDPs)
o SLP (Service Location Protocol)
by IETF srvloc Working Group
o UPnP (Universal Plug and Play)
by Microsoft
o Jini
1
by Sun Microsystems
3
0
Ubicua/2006-2007
Computacin Ubicua/2006-2007 Service Location Protocol
Main components
o User Agent (UA)
discovers services that the devices they represent are requesting
Inalmbricas yy Computacin
o without a DA
1
3
1
Ubicua/2006-2007
Computacin Ubicua/2006-2007
Service Location Protocol (cont.)
With a DA
UA DA SA
Inalmbricas yy Computacin
st
SrvRq service:da
DAAdver
vert t
D AA d service:da://129.187.222.102
SrvReg
service:da:
Redes Inalmbricas
//129.187.222.102 service:printer:
//129.187.222.134
SrvRq Sr v Ac
service:printer st k color=true, postscript=true,
color=true
ly
SrvRp
Redes
service:printer:
//129.187.222.134
AttrRq
st
ly
AttrRp
color=true,
postscript=true,
1
3
2
Ubicua/2006-2007
Computacin Ubicua/2006-2007
Service Location Protocol (cont.)
Without a DA
UA SA
Inalmbricas yy Computacin
SrvRq
service:da st
A Ad v er t
S
service:da:
Redes Inalmbricas
//129.187.222.102
SrvRq
service:printer st
color=true
ly
SrvRp
Redes
service:printer:
//129.187.222.134 AttrRq
st
ly
AttrRp
color=true,
postscript=true,
1
3
3
Ubicua/2006-2007
Computacin Ubicua/2006-2007 Universal Plug and Play
variables
o control point
searches for devices (services)
1
3
4
Ubicua/2006-2007
Computacin Ubicua/2006-2007
Universal Plug and Play
Networking
Step 1. Discovery
Step 2. Description
Inalmbricas yy Computacin
Step 3. Control
Step 4. Eventing
Step 5. Presentation
Redes Inalmbricas
Redes
1
3
5
Ubicua/2006-2007
Computacin Ubicua/2006-2007
Universal Plug and Play
Inalmbricas yy Computacin Step 1. Discovery
multicast
service 1
control
Redes Inalmbricas
advertise
point 2 service 2
multicast
Redes
device 1
search
control
service 1
point 3
response (unicast)
service 2
1
3
6
Ubicua/2006-2007
Computacin Ubicua/2006-2007
Universal Plug and Play
Inalmbricas yy Computacin Step 2. Description
service 1
1
3
7
Ubicua/2006-2007
Computacin Ubicua/2006-2007
Universal Plug and Play
Inalmbricas yy Computacin Step 3. Control
control device
point
action request service
Redes Inalmbricas
result
Redes
query variable
variable value
1
3
8
Ubicua/2006-2007
Computacin Ubicua/2006-2007
Universal Plug and Play
Inalmbricas yy Computacin Step 4. Eventing
control device 1
point subscription request
subscriber service 1
SID=uuid:1 subscription (uuid:1) publisher
renewal request
Redes Inalmbricas
subscription (uuid:1)
event message
Redes
cancellation (uuid:1)
control
point event message
Subscriber
SID=uuid:2
1
3
9
Ubicua/2006-2007
Computacin Ubicua/2006-2007
Universal Plug and Play
Inalmbricas yy Computacin Step 5. Presentation
browser device
presentation request
service
Redes Inalmbricas
presentation page
1
4
0
Ubicua/2006-2007
Computacin Ubicua/2006-2007
Jini
Main Aspects
service
o devices (printers, displays, disks)
Inalmbricas yy Computacin
1
4
1
Ubicua/2006-2007
Computacin Ubicua/2006-2007
Jini
Main Aspects (cont.)
service proxy object
o can be a complete implementation of a service
Inalmbricas yy Computacin
1
4
2
Ubicua/2006-2007
Computacin Ubicua/2006-2007
Jini
Discovery
A service provider seeks a lookup service.
Inalmbricas yy Computacin
lookup service
Redes Inalmbricas
Redes
client service
provider
service object
service attributes
1
4
3
Ubicua/2006-2007
Computacin Ubicua/2006-2007
Jini
Join
A service provider registers a service object (proxy) and its service attributes with the
lookup service.
Inalmbricas yy Computacin
lookup service
Redes Inalmbricas
service object
service attributes
Redes
client service
provider
service object
service attributes
1
4
4
Ubicua/2006-2007
Computacin Ubicua/2006-2007
Jini
Lookup
A client requests a service. A service object copy is moved to the client and used by the
client to talk to the service.
Inalmbricas yy Computacin
lookup service
Redes Inalmbricas
service object
service attributes
Redes
client service
provider
service attributes
1
4
5
Ubicua/2006-2007
Computacin Ubicua/2006-2007
Jini
Client Uses Service
The client interacts directly with the service provider via the service proxy object.
Inalmbricas yy Computacin
lookup service
Redes Inalmbricas
service object
service attributes
Redes
client service
provider
service attributes
1
4
6
Tema 4.-
Redes inalmbricas Ad Hoc
Aspectos relacionados:
o Configuracin cero
zeroconf: Zero Configuration Networking
o movilidad a nivel de red: mobileIP
o Whats new?
Referencias:
o C. Perkins, IP Mobility Support, RFC2002
Redes Inalmbricas
1
4
8
Ubicua/2006-2007
Computacin Ubicua/2006-2007 El problema
Esquema de direccionamiento de IP
Identificadores de conexiones
TCP/UDP
Inalmbricas yy Computacin
<129.34.16.43, sh port #,
128.8.128.45, mh_port #> subnet A Internet
subnet B
Redes Inalmbricas
Clase A 0 red
Red Host
subnet C
1.0.0.0 .. 126.0.0.0
10 Red
128.0.0.0 .. 191.255.0.0
192.0.0.0 .. 223.255.255.0
224.0.0.0 239.255.255.255
1
4
9
0
5
1
Redes
Redes Inalmbricas
Inalmbricas yy Computacin Ubicua/2006-2007
Computacin Ubicua/2006-2007
la red origen
Un agente en
1
Internet
nodo IP
2
4
la red actual
Un agente en
3
La solucin
Ubicua/2006-2007
Computacin Ubicua/2006-2007 Arquitectura
HA
Internet
Inalmbricas yy Computacin
subnet A
subnet B
Mobile
Mobile node
node (MN)
(MN)
Redes Inalmbricas
oo nodo
nodo que
que cambia
cambia su
su punto
punto de
de
conexin
conexin de
de una
una subred
subred aa otra
otra
subnet C
Home
Home agent
agent (HA)
(HA)
HA oo router
router en
en la
la subred
subred home
home del
del
Redes
MN
MN que
que se
se encarga
encarga deldel tunneling
tunneling
de
de los
los datos
datos hacia
hacia el
el MN
MN
Foreign
Foreign agent
agent (FA)
(FA)
oo router
router en
en la
la subred
subred actual
actual
(visitada)
(visitada) del
del MN
MN queque se
se encarga
encarga
del
del reenvo
reenvo dede los
los paquetes
paquetes hacia
hacia
el
el MN
MN
1
5
1
Ubicua/2006-2007
Computacin Ubicua/2006-2007 Servicios de MobileIP
HA
Internet
Inalmbricas yy Computacin
subnet A
subnet B
Agent
Agentdiscovery
discovery
Redes Inalmbricas
oolos
losHA
HAyylos
losFA
FAhacen
hacenpublica
publicasusu
presencia
presenciaenencada
cadasubred
subred(o (o subnet C
segmento
segmentode desubred)
subred)enenelelque
que
quieran proveer el servicio
quieran proveer el servicio
Redes
Registration
Registration
ooestablecimiento
establecimientode
deuna
una
conexin
conexin entre un FAooelelHA
entre un FA HAyy
un
unMN
MN
Tunneling
Tunneling
ooreenvo
reenvode
delos
losdatagramas
datagramasalalMN
MN
por parte del HA
por parte del HA
1
5
2
Ubicua/2006-2007
Computacin Ubicua/2006-2007 Esquema de funcionamiento de mobileIP
HA
reg. request
reg. request
registration
Redes Inalmbricas
reg. accept/deny
reg. accept/deny
Redes
tunnelling
1
5
3
Inalmbricas yy Computacin Ubicua/2006-2007
Computacin Ubicua/2006-2007 Direccionamiento en dos niveles
subnet A: Internet
132.4.16.
subnet B
Redes Inalmbricas
subnet C direccin de
128.8.128. localizacin
Redes
128.8.128.Y
132.4.16.Z
1 direccin esttica
5
4
5
5
1
Redes
Redes Inalmbricas
Inalmbricas yy Computacin Ubicua/2006-2007
Computacin Ubicua/2006-2007
agent
Home
1
Internet
nodo IP
2
4
agent
Foreign
3
Triangle routing
Ubicua/2006-2007
Computacin Ubicua/2006-2007 Deteccin de movimiento
Problema: como establezco que un nodo ha cambiado de subred?
Inalmbricas yy Computacin
Redes Inalmbricas
1
5
6
Ubicua/2006-2007
Computacin Ubicua/2006-2007 Lazy Cell Switching (LCS)
Movement detection with LCS is based on the lifetime field within the
main body of the ICMP Router Advertisement portion of the agent
advertisement
Inalmbricas yy Computacin
1
5
7
Ubicua/2006-2007
Computacin Ubicua/2006-2007 Eager Cell Switching (ECS)
o a mobile computer, once it first enters a new wireless cell, will usually
continue to proceed further into that new cell and, by implication, further
along the way out of its previous cell
Mobile computer switches right away to any new care-of address
that might be available within the new cell
Redes Inalmbricas
1
5
8
Ubicua/2006-2007
Computacin Ubicua/2006-2007 Prefix Matching
1
5
9
Tema 4.-
Redes inalmbricas Ad Hoc
Aspectos relacionados:
o Configuracin cero
zeroconf: Zero Configuration Networking
o movilidad a nivel de red: mobileIP
o Whats new?
o Summary:
All the MANET Internet drafts (DYMO, OLSRv2, and SMF) were updated since
Vancouver. They are moving along nicely. The biggest news is continued
convergence. We now have a common MANET packet/message format
(packetbb). DYMO, OLSRv2, and SMF have been modified to use the packetbb
Redes Inalmbricas
DYMO
o draft-ietf-manet-dymo-04.txt
OLSR v2
o draft-ietf-manet-olsrv2-01.txt
SMF
o draft-ietf-manet-smf-02.txt
1 OSPF-MANET
6
1
Ubicua/2006-2007
Computacin Ubicua/2006-2007 MANET packet format
1
6
2
Ubicua/2006-2007
Computacin Ubicua/2006-2007 DYMO
S I1 I2 I3 D
Redes Inalmbricas
RREQ
0 1 2 3
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Type | Len | TTL |I|A| Res | RREQ RREQ RREQ RREQ
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
. TargetAddress . RE-S RE-S RE-S RE-S
RE-I1 RE-I1 RE-I1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| TargetSeqNum |
Redes
1
6
3
Ubicua/2006-2007
Computacin Ubicua/2006-2007 DYMO Route Maintenance
1
6
4
Ubicua/2006-2007
Computacin Ubicua/2006-2007 DYMO vs AODV
There are several differences between AODV, AODV-bis, DSR and DYMO.
To list just a few.
New packet format.
Generic packet handling.
Redes Inalmbricas
lower requirements (in terms of memory, code, etc.) than AODV. DYMO is
close to what has been implemented for sensor networks, such as tinyAODV.
AODV is no longer being explored in the MANET WG.
1
6
5
Ubicua/2006-2007
Computacin Ubicua/2006-2007 OLSR v2
The key optimization of OLSRv2 is that of multipoint relays,
providing an efficient mechanism for network-wide broadcast of link-
state information.
Inalmbricas yy Computacin
parameters of maximum delay and minimum bandwidth, and maybe more QoS
parameters
in Internet infrastructure
Disadvantages: Overhead to keep
tables up to date
1
6
8
Ubicua/2006-2007
Computacin Ubicua/2006-2007 Hot Topics
reas de inters del MobiHoc 2006 y el programa final:
o Applications, operating system, and o Tutorial 1: Wireless Mesh Networks:
middleware support Fundamentals, Basic Protocols and
o Transport, network, and MAC protocols Research Issues
Inalmbricas yy Computacin
Forwarding
o Technical Session 2: Mobility Models
o Technical Session 3: Analysis, Simulation
and Experimentation
o Technical Session 4: Connectivity and
Coverage
o Technical Session 5: Medium Access
Control
o Technical Session 6 : Location and
Membership Services
o Technical Session 7: Theory
1 o Technical Session 8: Sensor Networks
6
9
Tema 4.-
Redes inalmbricas Ad Hoc
Introduccin al simulador NS-2
agradecimientos/acknowledgments
Jae Chung, Mark Claypool
o Worcester Polytechnic Institute
Ya Xu y Haobo Yu
o USC/ISI
Polly Huang
o AT&T Labs Research
Hao-Li Wang
o Department of Electrical and Computer Engineering, Iowa State University
Sung Park
o Network and Embedded Systems Lab (NESL) - Electrical Engineering, UCLA
K. Sridharan Iyer,
o Texas A&M University
Object-oriented
o Mixed C++ and Otcl
Most UNIX and UNIX-like systems
Redes
o FreeBSD
o Solaris
o Linux
Window 95/98/NT/2K
o Works, but with an effort
1
7
1
Ubicua/2006-2007
Computacin Ubicua/2006-2007 What you CAN do using NS-2
Simulate different scenarios with existing protocols (TCP/UDP)
Wired Routing protocols - Distance Vector and Link State (with the
link state patch)
Inalmbricas yy Computacin
1
7
2
3
7
1
Redes
Redes Inalmbricas
Inalmbricas yy Computacin Ubicua/2006-2007
Computacin Ubicua/2006-2007
NS input & output
Ubicua/2006-2007
Computacin Ubicua/2006-2007 Basic tcl
proc
proc test
test {}
{} {{
set
set aa 43
43
set
set bb 27
Inalmbricas yy Computacin
27
set
set cc [expr
[expr $a$a ++ $b]
$b]
set
set dd [expr
[expr [expr
[expr $a$a -- $b]
$b] ** $c]
$c]
for
for {set
{set kk 0}
0} {$k
{$k << 10}
10} {incr
{incr k}
k} {{
if
if {$k
{$k << 5}
5} {{
Redes Inalmbricas
puts
puts "k"k << 5,
5, pow
pow == [expr
[expr pow($d,
pow($d, $k)]"
$k)]"
}} else
else {{
puts
puts "k"k >=
>= 5,
5, mod
mod == [expr
[expr $d
$d %% $k]"
$k]"
}}
Redes
}}
}}
test
test
1
7
4
Ubicua/2006-2007
Computacin Ubicua/2006-2007 Basic OTcl
Class
Class mom
mom
mom
mom instproc
instproc greet
greet {}
{} {{
$self
$self instvar
instvar age_
age_
Inalmbricas yy Computacin
puts
puts "$age_
"$age_ years
years old
old mom:
mom: How
How are
are you
you doing?"
doing?"
}}
Class
Class kid
kid -superclass
-superclass mom
mom
kid
kid instproc
instproc greet
greet {}
{} {{
$self
$self instvar
instvar age_
Redes Inalmbricas
age_
puts
puts "$age_
"$age_ years
years old
old kid:
kid: What's
What's up,
up, dude?"
dude?"
}}
set
set aa [new
[new mom]
mom]
Redes
$a
$a set
set age_
age_ 45
45
set
set bb [new
[new kid]
kid]
$b
$b set
set age_
age_ 15
15
$a
$a greet
greet
$b
$b greet
greet
1
7
5
Ubicua/2006-2007
Computacin Ubicua/2006-2007 Hello World - Interactive Mode
swallow
swallow 71%
71% ns
ns
%% set
set ns
ns [new
[new Simulator]
Simulator]
Inalmbricas yy Computacin
_o3
_o3
%% $ns
$ns at
at 11 puts
puts \Hello
\Hello World!\
World!\
11
%% $ns
$ns at
at 1.5
1.5 exit
exit
22
Redes Inalmbricas
%% $ns
$ns run
run
Hello
Hello World!
World!
swallow
swallow 72%
72%
Redes
1
7
6
Ubicua/2006-2007
Computacin Ubicua/2006-2007 Hello World - Batch Mode
simple.tcl
simple.tcl
set
set ns
ns [new
[new Simulator]
Simulator]
Inalmbricas yy Computacin
$ns
$ns at
at 11 puts
puts \Hello
\Hello World!\
World!\
$ns
$ns at
at 1.5
1.5 exit
exit
$ns
$ns run
run
swallow
swallow 74%
74% ns
ns simple.tcl
simple.tcl
Hello
Hello World!
World!
Redes Inalmbricas
swallow
swallow 75%
75%
Redes
1
7
7
Ubicua/2006-2007
Computacin Ubicua/2006-2007 Anatomy of NS Scripts
Insert errors
Start event scheduler
Redes
1
7
8
Ubicua/2006-2007
Computacin Ubicua/2006-2007 Creating the Event Scheduler
Schedule events
o $ns at <time> <event>
o <time>: any non-negative real numbers
o <event>: any legitimate ns/tcl commands
Redes Inalmbricas
1
7
9
Ubicua/2006-2007
Computacin Ubicua/2006-2007 Creating the Network
Nodes
o set n0 [$ns node]
Inalmbricas yy Computacin
application application
Redes
agent agent
attach-agent attach-agent
1
8
0
Ubicua/2006-2007
Computacin Ubicua/2006-2007 Creating Connections: TCP
TCP
o set tcp [new Agent/TCP]
Inalmbricas yy Computacin
application application
Redes
agent agent
attach-agent attach-agent
1
8
1
Ubicua/2006-2007
Computacin Ubicua/2006-2007 Creating Traffic: On Top of TCP
FTP
o set ftp [new Application/FTP]
Inalmbricas yy Computacin
application application
Redes
agent agent
attach-agent attach-agent
1
8
2
Ubicua/2006-2007
Computacin Ubicua/2006-2007 Inserting Errors
1
8
3
Ubicua/2006-2007
Computacin Ubicua/2006-2007 Tracing
<event> <time> <from> <to> <pkt> <size>--<flowid> <src> <dst> <seqno> <aseqno>
+ 1 0 2 cbr 210 ------- 0 0.0 3.1 0 0
- 1 0 2 cbr 210 ------- 0 0.0 3.1 0 0
r 1.00234 0 2 cbr 210 ------- 0 0.0 3.1 0 0
Redes Inalmbricas
1
8
4
5
8
1
Redes
Redes Inalmbricas
Inalmbricas yy Computacin Ubicua/2006-2007
Computacin Ubicua/2006-2007
Simple Simulation Example
Ubicua/2006-2007
Computacin Ubicua/2006-2007 TCL Script Step 1
$ns trace-all $f
1
8
6
Ubicua/2006-2007
Computacin Ubicua/2006-2007 TCL Script Step 2
1
8
7
Ubicua/2006-2007
Computacin Ubicua/2006-2007
TCL Script Step 3
1
8
8
Ubicua/2006-2007
Computacin Ubicua/2006-2007
TCL Script Step 4
1
8
9
Ubicua/2006-2007
Computacin Ubicua/2006-2007
TCL Script Step 5
1
9
0
Ubicua/2006-2007
Computacin Ubicua/2006-2007
TCL Script Step 6
global ns nf
$ns flush-trace
#Close the NAM trace file
close $nf
Redes Inalmbricas
1
9
1
2
9
1
Redes
Redes Inalmbricas
Inalmbricas yy Computacin Ubicua/2006-2007
Computacin Ubicua/2006-2007
Observing the behaviour using nam
Ubicua/2006-2007
Computacin Ubicua/2006-2007 Analyze trace file
Use some tools, like AWK or Perl, to analyze the trace file
Use excel or xplot to plot the results
Inalmbricas yy Computacin
o MAC802.11
o Radio Propagation Model
o Channel
Redes
1
9
5
Ubicua/2006-2007
Computacin Ubicua/2006-2007 Mobile Node Modules
Agent
o Responsible for packet generations and receptions
Inalmbricas yy Computacin
1
9
6
Ubicua/2006-2007
Computacin Ubicua/2006-2007 Mobile Node Modules (Continued)
IFq (Interface Queue)
o PriQueue is implemented to give priority to routing protocol packets
o Supports filter to remove packets destined to specific address
Inalmbricas yy Computacin
Mac Layer
o IEEE 802.11 protocol is implemented
o Uses RTS/CTS/DATA/ACK pattern for all unicast pkts and DATA for
broadcast pkts
Redes Inalmbricas
1
9
8
Ubicua/2006-2007
Computacin Ubicua/2006-2007 Setting Up Variables
#============================================================
# Define options
Inalmbricas yy Computacin
#============================================================
set val(chan) Channel/WirelessChannel ;# channel type
set val(prop) Propagation/TwoRayGround ;# radio-propagation model
set val(ant) Antenna/OmniAntenna ;# Antenna type
Redes Inalmbricas
1
9
9
Ubicua/2006-2007
Computacin Ubicua/2006-2007 Setting Up Variables
#Create Topography
set topo [new Topography]
$topo load_flatgrid 500 500
Redes
2
0
0
Ubicua/2006-2007
Computacin Ubicua/2006-2007 Configuring Mobilenode
# Configure nodes
$ns_ node-config -adhocRouting $val(rp) -llType $val(ll) \
Inalmbricas yy Computacin
-agentTrace ON -routerTrace ON \
-macTrace OFF -movementTrace OFF
Redes
2
0
1
Ubicua/2006-2007
Computacin Ubicua/2006-2007 Configuring Movement
Create Movement
Redes
FTP
Redes
TCP Sink
node_(0) node_(1)
2
0
3
Ubicua/2006-2007
Computacin Ubicua/2006-2007
Set Stop Time and Start Simulation
2
0
4
Ubicua/2006-2007
Computacin Ubicua/2006-2007 Trace File
r 100.381997477 _1_ AGT --- 82 tcp 1060 [13a 1 0 800] ------- [0:0 1:0 32 1] [32 0] 1 0
r: receive event,
Inalmbricas yy Computacin
100.381997477:time stamps,
_1_: node 1,
AGT: trace generated by agent,
82: event(pkt) id,
tcp: tcp packet,
Redes Inalmbricas
2
0
5
Ubicua/2006-2007
Computacin Ubicua/2006-2007 Another simple wireless simulation(1)
Scenario
o containing 3 mobile nodes
Inalmbricas yy Computacin
o See:
ns-2/tcl/ex/wireless-demo-csci694.tcl
Redes
2
0
6
Ubicua/2006-2007
Computacin Ubicua/2006-2007 Another simple wireless simulation(2)
-llType LL \
-macType Mac/802_11\
-ifqLen 50 \
-ifqType Queue/DropTail/PriQueue \
Redes Inalmbricas
-antType Antenna/OmniAntenna \
-propType Propagation/TwoRayGround \
-phyType Phy/WirelessPhy \
Redes
-channelType Channel/WirelessChannel \
-topoInstance $topo
-agentTrace ON \
-routerTrace OFF \
-macTrace OFF
2
0
8
Ubicua/2006-2007
Computacin Ubicua/2006-2007 Another simple wireless simulation (4)
2
0
9
Ubicua/2006-2007
Computacin Ubicua/2006-2007 Another simple wireless simulation: Movement file
14.909259208114"
$ns_ at 33.000000000000 "$node_(0) setdest 89.663708107313 283.494644426442
19.153832288917"
$node_(2) set Z_ 0.000000000000
$node_(2) set Y_ 199.373306816804
Redes Inalmbricas
2
1
0
Ubicua/2006-2007
Computacin Ubicua/2006-2007 Another simple wireless simulation: Traffic Scenario
set udp_(0) [new Agent/UDP]
$ns_ attach-agent $node_(0) $udp_(0)
set null_(0) [new Agent/Null]
$ns_ attach-agent $node_(2) $null_(0)
Inalmbricas yy Computacin
$ns_ run
2
1
2
Ubicua/2006-2007
Computacin Ubicua/2006-2007 The setdest mobility generator
Random movement
Redes
$node start
See ns-2/indep-utils/cmu-scen-gen/setdest/
2
1
3
Ubicua/2006-2007
Computacin Ubicua/2006-2007 The traffic patterns generators
See ns-2/indep-utils/cmu-scen-gen/
2
1
4
Ubicua/2006-2007
Computacin Ubicua/2006-2007 Related software
o http://www-124.ibm.com/developerworks/opensource/bluehoc/
2
1
5