Professional Documents
Culture Documents
C. D.
agradecimientos/acknowledgments
Nitin H. Vaidya, Tutorial on Mobile Ad Hoc Networks: Routing, MAC and Transport Issues disponible en http://www.crhc.uiuc.edu/wireless/tutorials.html
o http://www.fleetnet.de
Ofrece:
Varios tipos
Entorno completamente simtrico
o todos los nodos tiene capacidades y responsabilidades idnticas
Visin general
aplicaciones
Middleware
seguridad
MobileIP
IP
MANETs
zeroconf
TCP/UDP TCP
sensores
IEEE 802.11
Bluetooth
Mobile ad hoc networking: imperatives and challenges, Imrich Chlamtac, Marco Conti, Jennifer J.-N. Liu, Ad Hoc Networks, Elsevier, 1 (2003).
C.
Routing Overview
Network with nodes, edges Goal: transfer message from one
node to another
msg
Routing Overview
Which path?
o Generally try to optimize one of the following:
Shortest path (fewest hops) Shortest time (lowest latency) Shortest weighted path (utilize available bandwidth, battery)
1 0
Quantitative Properties
o End-to-End data throughput o Delays o Route Acquisition time o Out of order delivery (percentage) o Efficiency
1 1
Rate of link failure/repair may be high when nodes move fast New performance criteria are used
o route stability despite mobility o energy consumption o host position
1 2
Protocolos reactivos
o Mantiene las rutas solamente si es necesario
Que solucin adoptar depende del tipo di trafico y del tipo de movilidad!! Que solucin adoptar depende del tipo di trafico y del tipo de movilidad!!
1 4
Both IPv4 and IPv6 will be supported. Routing security requirements and issues will also be addressed.
1 5
1 6
Mar 06
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 (AODV) Routing. Request for Comments (Experimental) 3561, July 2003. http://www.ietf.org/rfc/rfc3561.txt T. Clausen and P. Jacquet. Optimized Link State Routing Protocol OLSR. Request for Comments (Experimental) 3626, October 2003. http://www.ietf.org/rfc/rfc3626.txt R. Ogier, F. Templin, and M. Lewis. Topology Dissemination Based on Reverse-Path Forwarding (TBRPF). Request for Comments (Experimental) 3684. February 2004. http://www.ietf.org/rfc/rfc3684.txt I. Chakeres, E. Belding-Royer, and C. Perkins. Dynamic MANET On-demand (DYMO) Routing, draft-ietf-manet-dymo-02.txt. Internet Draft (work in progress), June 2005. http://www.ietf.org/internet-drafts/draft-ietf-manet-dymo-02.txt T. Clausen. The Optimized Link-State Routing Protocol version 2, draft-clausenmanet-olsrv2-01. Internet Draft (work in progress), August 2005. http://www.ietf.org/internet-drafts/draft-clausen-manet-olsrv2-01.txt J. Macker. Simplified Multicast Forwarding for MANET, draft-ietf-manet-smf-00.txt. Internet Draft (work in progress), June 2005. http://www.ietf.org/internet-drafts/draftietf-manet-smf-00.txt Y muchos ms:
o http://en.wikipedia.org/wiki/Ad_hoc_protocol_list
1 7
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 (AODV) Routing. Request for Comments (Experimental) 3561, July 2003. http://www.ietf.org/rfc/rfc3561.txt T. Clausen and P. Jacquet. Optimized Link State Routing Protocol OLSR. Request for Comments (Experimental) 3626, October 2003. http://www.ietf.org/rfc/rfc3626.txt R. Ogier, F. Templin, and M. Lewis. Topology Dissemination Based on Reverse-Path Forwarding (TBRPF). Request for Comments (Experimental) 3684. February 2004. http://www.ietf.org/rfc/rfc3684.txt I. Chakeres, E. Belding-Royer, and C. Perkins. Dynamic MANET On-demand (DYMO) Routing, draft-ietf-manet-dymo-02.txt. Internet Draft (work in progress), June 2005. http://www.ietf.org/internet-drafts/draft-ietf-manet-dymo-02.txt T. Clausen. The Optimized Link-State Routing Protocol version 2, draft-clausenmanet-olsrv2-01. Internet Draft (work in progress), August 2005. http://www.ietf.org/internet-drafts/draft-clausen-manet-olsrv2-01.txt J. Macker. Simplified Multicast Forwarding for MANET, draft-ietf-manet-smf-00.txt. Internet Draft (work in progress), June 2005. http://www.ietf.org/internet-drafts/draftietf-manet-smf-00.txt Y muchos ms:
o http://en.wikipedia.org/wiki/Ad_hoc_protocol_list
1 8
1 9
Z
envio broadcast de una trama
S E B C A H K N I posible colisin!! G F J D M
2 0
Z
envio broadcast de una trama
2 1
Z
envio broadcast de una trama
2 2
Z
envio broadcast de una trama
2 3
Z
envio broadcast de una trama
2 4
Ventajas Sencillo Es ms eficiente si la tasa de envo es baja el overhead de los procesos de bsqueda y mantenimiento de rutas explicitas resulte ser ms alto
o en el peor de los casos todos los nodos alcanzable por el nodo fuente recibirn los datos
o Ej.: en el caso que los nodos transmitan pocos mensajes de tamao pequeo y que la topologa vare muy a menudo
Potencialmente la entrega de los datos es ms fiable, por que se pueden utilizar mltiples rutas.
Potencialmente la entrega de los datos es menos fiable a causa del uso de difusiones. ?
o Ej.: las difusiones con el MAC de IEEE 802.11 son pocos fiables
2 5
C. D.
2 7
S [S] E B F C J D A H G K N I destino M
2 8
Z
[X,Y] lista de IDs aadidos al RREQ L
S B C [S,C] A H
2 9
Z
[X,Y] lista de IDs aadidos al RREQ L
3 0
Z
[X,Y] lista de IDs aadidos al RREQ L
S E B C A H G D K[S,C,G,K] N I recibe la trama de J y de K (entre ellos son hidden) posible colisin F J [S,E,F,J] M
3 1
Z
[X,Y] lista de IDs aadidos al RREQ L
3 2
S E B C A H
RREP [S,E,F,J,D]
F J
G K
N I
3 3
Si se permiten enlaces unidireccionales (asimtricos) entonces el RREP tiene que utilizar un route discovery desde D hacia S
o A menos que D ya tenga una ruta hacia S o Si un route discovery es iniciado por D hacia S, entonces el Route Reply es piggybacked hacia S desde D.
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
Los nodos intermedio utilizan solo y nicamente la ruta incluida en la cabecera para saber a quien tienen que reenviar el paquete.
3 5
DATA [S,E,F,J,D]
S E B C A H G K N I D F J M L
3 6
3 7
3 8
Z S L
RERR [J-D] M F J
C A H I G K N D
3 9
Caractersticas adicionales
Tcnica del Expading ring en la bsqueda de rutas utilizando el campo TTL de los paquetes
o non propagating Route Request
4 0
o Problema de la tormenta de Route Reply. o se puede evitar forzando un nodo a no enviar un RREP si escucha otro RREP con una ruta ms corta
Un nodo intermedio puede corromper las caches de otros nodos enviando RREP utilizando una cache obsoleta
4 1
C. D.
4 3
Distance Vector
Basic Routing Protocol
o known also as Distributed Bellman-Ford or RIP
Periodically send table to all neighbors to maintain topology Bi-directional links are required!
4 4
A
Dest. A B C Next A B B Metric 0 1 3
1
Dest. A B C
B
Next A B C Metric 1 0 2
2
Dest. A B C
C
Next B B C Metric 3 2 0
4 5
A
Dest. A B C Next A B B Metric 0 1 3 2
1
Dest. A B C
B
Next A B C Metric 1 0 1
1
Dest. A B C
C
Next B B C Metric 3 2 1 0
4 6
(D, 0)
A
Dest. A B C D Next A B B B Metric 0 1 2 3 Dest. A B C D A B C C
B
Next Metric 1 0 1 2 Dest. A B C D Next B B C D
C
Metric 2 1 0 1
4 7
Distance Vector
Broken Link and consequent Loops
1 1 1
A
Dest. D Next B Metric 3 Dest.c D C
B
Next Metric 2 Dest. D Next D B
C
Metric 1
(D, 2)
(D, 2)
A
Dest. D Next B Metric 3 Dest. D C
B
Next Metric 2 Dest. D Next B
C
Metric 3
4 8
Distance Vector
create the Count to Infinity problem
A
Dest. D Next B Metric 3, 5, Dest.c D C
B
Next Metric 2, 4, 6 Dest. D
C
Next B Metric 3, 5,
4 9
Distance Vector
Issues in ad-hoc networks:
o Loops
Bandwidth reduction in network Unnecessary work for loop nodes
o Count to Infinity
Very slow adaptation to topology changes.
5 0
AODV
Los mensajes de Route Requests (RREQ) son reenviados de manera similar a DSR Cuando un nodo retransmite un Route Request, activa tambin una ruta inversa que apunta a la fuente
o AODV supone canales bidireccionales
Cuando el destino recibe el Route Request, responde enviando un Route Reply El Route Reply recorre la ruta activada a travs del envo del Route Request
5 1
5 2
5 3
5 4
5 5
5 6
5 7
S E B C A H G K N I D F J M
5 8
o La probabilidad que un nodo intermedio enve un Route Reply es inferior en AODV que en DSR
Un Route Request nuevo desde S para un destino se le asigna un destination sequence number ms alto. Un nodo intermedio que conoce la ruta, pero con un numero de secuencia ms pequeo, no puede enviar un Route Reply
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
6 0
6 1
B E
o C efecta un route discovery buscando a D. EL nodo A recibe el RREQ, por ejemplo va la ruta C-E-A o El nodo A contestara por que A conoce una ruta hacia D pasando por B o Obtenemos un bucle, por ejemplo, C-E-A-B-C
A
6 2
B E
C. D.
6 4
o Una difusin desde el nodo X es reenviada solo por sus multipoint relays o Los multipoint relays del nodo X son sus vecinos escogidos de manera que cada vecino two-hop de X sea un vecino one-hop de por lo menos un multipoint relay de X o Cada nodo transmite su lista de vecinos en mensajes peridicos, de forma que todos los nodos puedan saber cuales son sus vecinos two-hops, para poder escoger sus multipoint relays
Son necesarias 11 retransmisione s para difundir el mensaje hasta tres salto de distancia
6 5
Terminologa
Los nodos pueden tener diferentes interfaces OLSR, cada una con su propia direccin IP
o 2-hop neighbor: un nodo cuya P seal es recibida por un vecino. o strict 2-hop neighbor
multipoint relay (MPR):
M
o Un nodo seleccionado por su vecino x, para retransmitir todos los mensajes de difusin que recibe de x, si no es un mensaje duplicado y si el tiempo de vida es >1
multipoint relay selector (MS)
Z X Y
Tablas de encaminamiento
Todos los nodos gestionan una tabla de encaminamiento La estructura es:
1. 2. 3. R_dest_addr R_dest_addr ,, R_next_addr R_next_addr ,, R_dist R_dist ,, R_iface_addr R_iface_addr ,,
Cada entry indica que el nodo R_dest_addr est a R_dist hops de distancia, que el primer salto es a travs de R_next_addr. Este nodo se puede alcanzar por medio del interfaz local R_iface_addr Hay una entry por cada destino en la red La tabla se actualiza cada vez que se detecta una cambio de:
o the link set, o the neighbor set, o the 2-hop neighbor set, o the topology set, o the Multiple Interface Association Information Base,
6 8
Implementaciones
C. D.
Performance issues
A lot of work has been done in supporting QoS in the Internet, but unfortunately none of them can be directly used in MANETs because of the bandwidth constraints and dynamic network topology of MANETs. 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 surrounding circumstances. The resource limitations and the mobility of hosts make things more complicated. Hard QoS guarantee is not possible in MANETs
o Adaptive QoS o Service Differentiation
degradation due to mobility Bursty losses Several consecutive frames lost (video freezed) degradation due to congestion Random losses More uniform distortion decay
Congestion jitter: relatively small frequent variations Mobility jitter: very large peaks occasional occurrences on route change
7 2
Main issues
The main issues to consider to achieve good quality video streaming are:
o MAC level QoS: IEEE 802.11e required to differentiate from bandwidth greedy best-effort traffic o Admission control: to avoid more connections than the MANET can handle o Increase routing effectiveness: even by using layer-2 aware routing 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 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
QoS Signalling
o INSIGNIA (in-band signalling) o dRSVP(dynamic RSVP)
QoS Routing
o QoS enabled routing (AODV/OLSR) o CEDAR(Core-Extraction Distributed Ad-hoc Routing) o Ticket based Probing (distributed QoS routing)
QoS MAC
o IEEE 802.11e o MACA/PR
(Multiple Access Collision Avoidance with Piggyback Reservation)
... and
7 4
Integrated Services
Attempt to modify Internet service model to support diverse application requirements 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 into the network Each router
o o o Maintains reservation state for each flow Classifies every packet and decides forwarding behavior Monitors the flow to ensure that it does not consume more than the reserved resources Enables fine-grained QoS and resource guarantees Not scalable, harder to administer
Advantages
o o
7 5
Disadvantages
Differentiated Services
Moves admission control and flow monitoring to the edge of the network Edge nodes classify and mark packets to receive a particular type of service
o o Diff Serv Code Point (DSCP) Finite set of DSCPs defined
Interior nodes determine the type of service for forwarded packets based on their DSCP values Advantages
o o o o More scalable No per-flow state Easier to administer Cannot provide the same per-flow guarantees as IntServ
Disadvantages
7 6
FQMM
FQMM is the first QoS Model proposed in 2000 for MANETs by Xiao et al. The model can be characterized as a hybrid IntServ/DiffServ Model as
o the highest priority is assigned per-flow provisioning. o the rest is assigned per-class provisioning.
2 1 3
egress
6 5
7 7
QoS Signalling
o INSIGNIA (in-band signalling) o dRSVP(dynamic RSVP)
QoS Routing
o CEDAR(Core-Extraction Distributed Ad-hoc Routing) o QoS enabled routing (AODV/OLSR) o Ticket based Probing (distributed QoS routing)
QoS MAC
o IEEE 802.11e o MACA/PR
(Multiple Access Collision Avoidance with Piggyback Reservation)
... and
7 8
QoS Signalling
Signaling is used to reserve and release resources. Prerequisites of QoS Signalling
o Reliable transfer of signals between routers o Correct Interpretation and activation of the appropriate mechanisms to handle the signal.
Most papers support that In-band Signaling is more appropriate for MANETs.
7 9
INSIGNIA
INSIGNIA is the first signaling protocol designed solely for MANETs by Ahn et al. 1998.
o Lee, S.B., Ahn, G.S., Campbell, A.T., "Improving UDP and TCP Performance in Mobile Ad Hoc Networks with INSIGNIA", June 2001, IEEE Communication Magazine.
INSIGNA tries to provide something better than best effort service for some flows, e.g., video, voice.
o QoS insensitive flows can be serviced in best effort manner: e-mail o QoS sensitive flows should be treated in better than best effort manner
8 0
INSIGNIA Features
Approach
o Adaptive QoS approach o Service Differentiation via packet prioritization
8 1
INSIGNIA Principles
In band signaling -> to be responsive
o requires only single packet on new path to initiate the restoration after rerouting o explicit out-of-band signaling is not responsive enough and often fails to reach the target mobile nodes
Soft-state
o for management and maintenance of resource reservations o first packet on new path create states (if necessary) and subsequent packets refresh the previous associated reservations en-route o outstanding reservations and states automatically time out, typically in seconds range.
8 2
INSIGNIA IP option
SERVICE MODE
BANDWIDTH REQUEST
RES/BE
BQ/EQ
BW_IND
MAX
MIN
1 bit
1 bit
1 bit
16 bits
SERVICE MODE : adaptive (RES) service / best effort service PAYLOAD INDICATOR : base quality (BQ) packet / enhanced quality (EQ) packet BANDWIDTH INDICATOR : reflects the resource availability en route BANDWIDTH REQUEST : indicates the max/min BW requirements
8 3
Reservation Set-up
MS
M2 M1 M4 MD M3
8 4
Re-routing / Restoration
M2
MS
M22 M M1
Rerouting Rerouting
MD M3
M4
immediate restoration
Legend RES/BQ packet RES/EQ packet BE packet MAX reserved link MIN reserved link
8 5
Re-routing / Degradation
MS
M1 M4
M3
MD M5
node
M5
Legend RES/BQ packet RES/EQ packet BE packet MAX reserved link MIN reserved link
8 6
M1
bottleneck node
M5
8 7
Adaptation : Scale Up
M1 M4
MD
M5
Max_BW Legend
Min_BW
8 8
RES/BQ packet RES/EQ packet BE packet MAX reserved link MIN reserved link
QoS Signalling
o INSIGNIA (in-band signalling) o dRSVP(dynamic RSVP)
QoS Routing
o CEDAR(Core-Extraction Distributed Ad-hoc Routing) o QoS enabled routing (AODV/OLSR) o Ticket based Probing (distributed QoS routing)
QoS MAC
o IEEE 802.11e o MACA/PR
(Multiple Access Collision Avoidance with Piggyback Reservation)
... and
8 9
QoS Routing
Routing is an essential component for QoS. It can inform a source node of the bandwidth and QoS availability of a destination node We know that AODV is a successful an on-demand routing protocol based on the ideas of both DSDV and DSR. We also know that when a node in AODV desires to send a message to some destination node it initiates a Route Discovery Process (RREQ).
9 0
9 1
S RREQ RREP
9 2
P R
Q S
9 3
Wireless Ad hoc
Extranet Traffic
9 4
QoS Signalling
o INSIGNIA (in-band signalling) o dRSVP(dynamic RSVP)
QoS Routing
o CEDAR(Core-Extraction Distributed Ad-hoc Routing) o QoS enabled routing (AODV/OLSR) o Ticket based Probing (distributed QoS routing)
QoS MAC
o IEEE 802.11e o MACA/PR
(Multiple Access Collision Avoidance with Piggyback Reservation)
... and
9 5
QoS Signalling
o INSIGNIA (in-band signalling) o dRSVP(dynamic RSVP)
QoS Routing
o CEDAR(Core-Extraction Distributed Ad-hoc Routing) o QoS enabled routing (AODV/OLSR) o Ticket based Probing (distributed QoS routing)
QoS MAC
o IEEE 802.11e o MACA/PR
(Multiple Access Collision Avoidance with Piggyback Reservation)
... and
9 6
9 7
SWAN Model
C. D.
E(p) = i * v * tp
9 9
Metodologa de evaluacin
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
Escenario bsico Patrn de escenario 25 estaciones inalmbricas 500m x 500m 15m/s de velocidad mxima Modelo random waypoint Patrn de trfico 20 fuentes CBR 4 paquetes/seg de 512 bytes
Estudio de sensibilidad Parmetros evaluados Patrn de movimiento Patrn de trfico Nmero de estaciones rea de la red
1 0 0
Escenario bsico
El consumo total depende del proceso de recepcin
o Proceso de recepcin=Recibir + Sobre-escucha (overhearing)
Energa Rx
75%
50%
25%
1 0 1
1 0 2
Velocidad (m/s)
3500
DSR
AODV
DSDV
TORA
1 0 3
Nmero de estaciones
1000
DSR
AODV
DSDV
TORA
800
600
400
200
1 0 4
MANET rea
DSR
AODV
DSDV
TORA
1 0 5
Conclusiones
El consumo de energa depende de las operaciones de recepcin de datos 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 aproximaciones proactivas
1 0 6
zeroconf: Zero Configuration Networking o movilidad a nivel de red: mobileIP o Whats new?
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 simplemente a un hub
Apple con Macs dotados de IEEE 802.11 Airport lo hace de modo inalmbrico
1 0 8
Las soluciones en cualquiera de las cuatro reas han de coexistir amigablemente con las redes actualmente configuradas
o Direccionamiento IP tanto de IPv4 como de IPv6
Los protocolos de Zeroconf no tienen que causar perjuicio alguno a la red, cuando una mquina configurada con Zeroconf sea conectada a la red actual
o Caractersticas de seguridad suficientes para prevenir que no sean menos seguros
1 0 9
zeroconf: objetivos
Las funciones habrn de ser definidas para dos topologas de red distintas
o Un segmento de red simple, donde los hosts son accesibles a travs de la capa de enlace mediante broadcasting o mensajes multicast o Un conjunto de segmentos de redes (en distintas subredes IP) interconectadas mediante un simple router
La configuracin automtica de una topologa arbitraria de routers y subredes queda fuera del mbito del grupo de trabajo
Definir cmo una red puede automticamente realizar una transicin desde el comportamiento de configurada a desconfigurada y viceversa
o Los mismos hosts han de ser capaces de funcionar en redes sin configuracin, as como con conectividad directa IP hacia Internet, incluyendo servicios DNS, etc. o Tambin ser posible que ambos modos (Zeroconf y administrado) puedan coexistir en la misma red, sin ser dichos modos mutuamente excluyentes
1 1 0
Simplicidad y facilidad de uso (la escalabilidad no debera ser un objetivo primordial del grupo de trabajo)
zeroconf: requerimientos
Protocolos TCP/IP inaceptables en redes emergentes
o o o o DNS DHCP LDAP MADCAP Protocol RFC 1034 y 1035 Domain Name Service RFC 2131 Dynamic Host Configuration Protocol RFC 2251 Lightweight Directory Access Protocol RFC 2730 Multicast Address Dynamic Client Allocation
Coexistencia y escalabilidad
o No es necesario usar Zeroconf simultneamente en las cuatro reas o La escalabilidad es importante pero no es un objetivo primordial
1 1 1
1 1 2
Requerimientos:
o Ha de configurar una mscara de red apropiada o Ha de tener una direccin IP nica dentro de una subred o Ha de tener alguna informacin relativa al encaminamiento para la interred o Ha de tener una subred IP nica dentro de la interred, si sta existe o Tiene que resolver conflictos puntualmente ante los cambios de topologa
Consideraciones en IPv6
1 1 4
o IPv6 permite a un host seleccionar apropiadamente una direccin, una mscara de red e informacin de encaminamiento. As, ya existe una configuracin Zeroconf
Conflict-free allocation
o En este esquema no hay conflicto de direcciones, ya que se implementan mecanismos que controlan a priori que no pueda existir un solapamiento de las direcciones. Se basan en algoritmos de asignamiento de enteros para que los conjuntos sean disjuntos.
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
Se utilizan direcciones de clase B con prefijo 169.254 / 16(IPv4) tiene extensiones para soportar IPv6. El nodo que intenta obtener una direccin IP utiliza inicialmente una temporal(para comunicarse con el resto) dentro del rango 0-2047, seleccionndola aleatoriamente. Elige otra, dentro del rango 2048-65534, como direccin tentativa.
1 1 6
Cuando un nodo recibe un AREQ comprueba que no coincida con su IP la direccin tentativa.
o Si no coincide reenva el mensaje a sus vecinos (broadcast) lo mismo hace con los AREP que no son para l. o Si coincide enva (por broadcast) un Address Reply (AREP).
Cuando un nodo enva AREQ espera AREP hasta que venza el time-out. Si es as repite el proceso AREQ_TIMES
o si no hay contestacin se queda la IP, considerndose configurado. o si el nodo recibe AREP, vuelve a iniciar el proceso con otra direccin.
La tcnica tambin puede utilizarse con Ipv6, con pequeas modificaciones. S.Cheshire IPv4 Address Conflict Detection draft-cheshire-ipv4acd-03.txt propone un mecanismo similar y para la resolucin de conflictos usa ARP.
1 1 7
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 nodos (A y B) con la misma direccin IP, los paquetes dirigidos al nodo A le acaben llegando slo a l y lo mismo con el nodo B. o Weak Duplicate Address Detection in Mobile Ad Hoc Networks, Nitin Vaidya, ACM International Symposium on Mobile Ad Hoc Networking and Computing (MobiHoc), June 2002
K. Weniger: Passive Duplicate Address Detection in Mobile Ad hoc Networks, In Proceedings of IEEE WCNC 2003, New Orleans, USA, Mar. 2003 Jeong et al. Ad Hoc IP Address Autoconfiguration draft-jeong-adhoc-ipaddr-autoconf-00.txt
1 1 8
1 1 9
1 2 0
1 2 1
o R[1,8] o f(n)=(address x state x11) mod 7 o cada nodo tiene asociado: (address, state of f(n)).
Cuando la red se inicia slo est A. Elige aleatoriamente el nmero 3 como direccin IP y como semilla para f(n). Cuando B intenta unirse, A calcula f(3)=(3 x 3 x11) mod 7=1 y se lo pasa a B como direccin IP y semilla. Adems actualiza su semilla con ese valor. Posteriormente C se aproxima a A y D a B. Cada uno calcula los valores independientemente (pero compartiendo semilla) de forma que
o para C: f(n)=f(1)=(3 x 1 x 11) mod 7=5 IP C=5 y el estado de A y C=5. o para B: f(n)=f(1)=( 1 x 1 x 11) mod 7=4 IP D=4 y el estado de B y D=4.
1 2 2
Los autores proponen una solucin aproximada basada en la descomposicin en factores primos. Cualquier nmero puede representarse nicamente por:
De forma que si las tuplas (e1,e2,...,ek) tiene diferentes ei(i=1,...,k) habr diferentes n( y por lo tanto no conflicto en direcciones).
1 2 3
Independiente del protocolo de routing, del protocolo de acceso al medio y del HW. Todo el mecanismo est dirigido por el proceso de asignacin de direcciones, que es utilizado por los nodos para actualizar su informacin de estado de la red, detectar particiones/fusiones, cadas de nodos,.... Proceso de asignacin: interaccin entre el nodo que quiere acceder (requester) y otro nodo (alcanzable sin direccin IP) ya configurado (initiator) que le configurar.
1 2 4
Distribucin de direcciones equilibrada: interesar que la distribucin sea lo ms aquprobable posible (respecto al conjunto de direcciones), pues entonces la probabilidad de conflicto ser baja, disminuyendo la sobrecarga de trfico. Latencia: Entendida como el tiempo que tarda en asignarse una direccin a un nodo. Escalabilidad: en MANETs, el tamao puede ser variable e impredecible con un rango dinmico potencialmente
o Adems interesarn soluciones donde la mayor parte de la comunicacin ocurra localmente pues si se usan broadcast y la red crece mucho la latencia puede disparase
1 2 5
Correccin: Entendida como la minimizacin del tiempo de vulnerabilidad (DAD) esto es los perodos de sombra en los que no se puede garantizar que haya duplicados.
1 2 7
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 se describe en RFC 2365
Fuente mltiple
o Un sistema de intercomunicacin en el hogar es un ejemplo de aplicacin con mltiples fuentes de IP multicast, pues diversos orgenes pueden estar enviando paquetes destinados a la misma direccin IP multicast o El problema se presenta cuando una direccin puede continuar siendo vlida an despus de que el host que inici la asignacin haya desaparecido del grupo, es decir haya cado o simplemente abandonado el grupo multicast o Requerimiento: Un host distinto del que asigna las direcciones tiene que defender el mantenimiento de la asignacin de una direccin multicast
O. Catrina et al., Zeroconf Multicast Address Configuration Protocol (ZMAAP), Internet draft, October 2002
1 2 8
Escenarios y requerimientos
Servicio de descubrimiento
o Los protocolos de este servicio permiten a los usuarios seleccionar servicios y/o hosts por un nombre que es descubierto dinmicamente, mucho mejor que por un nombre y tipo que el usuario debiera conocer anticipadamente o Servicio de impresora
Las impresoras de red permiten enviar a diferentes clientes trabajos de impresin. Hay que averiguar sus caractersticas (localizacin, resolucin, estado, color, etc.) sin protocolos particulares de impresin Requerimientos
Tiene que permitir que un servicio sea descubierto Tiene que descubrir a travs de un identificador y/o tipo de servicio Ha de descubrir servicios sin usar ningn protocolo especfico de servicios Deber descubrir caractersticas del propio servicio Tiene que completar el servicio puntualmente (dcimas de segundo)
o Consideraciones en IPv6
Los protocolos de este servicio no tienen diferencias relacionadas con ZeroConf
1 3 0
Implementation
o with a DA o without a DA
1 3 1
UA
DA
st SrvRq DAAdver t
SA
service:da
ert AAdv D
service:da://129.187.222.102
SrvReg
Sr v Ac k
SrvRq
st
ly SrvRp
service:printer: //129.187.222.134
AttrRq
st
ly AttrRp
color=true, postscript=true,
1 3 2
UA
service:da
SA
SrvRq st
er t AAdv S
SrvRq
st
ly SrvRp
service:printer: //129.187.222.134
AttrRq
st
ly AttrRp
color=true, postscript=true,
1 3 3
o control point
searches for devices (services)
1 3 4
1 3 5
multicast
advertise
device 2 service 1
search
device 1 service 1
control point 3
control point
device
service 2
1 3 7
control point
action request
device
service
result
1 3 8
control point
subscriber SID=uuid:1
device 1
subscription request subscription (uuid:1) renewal request subscription (uuid:1)
service 1
publisher
event message
cancellation (uuid:1)
control point
Subscriber SID=uuid:2
event message
1 3 9
browser
presentation request presentation page
device service
1 4 0
lookup service
o maps interfaces indicating service functionality to sets of objects implementing the service
1 4 1
events
o objects register with other objects to get notifications o when services join or leave, events are signaled
1 4 2
Jini Discovery
A service provider seeks a lookup service.
lookup service
client
service provider
service object service attributes
1 4 3
Jini Join
A service provider registers a service object (proxy) and its service attributes with the lookup service.
lookup service
service object service attributes
client
service provider
service object service attributes
1 4 4
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.
lookup service
service object service attributes
client
service provider
service attributes
1 4 5
lookup service
service object service attributes
client
service provider
service attributes
1 4 6
zeroconf: Zero Configuration Networking o movilidad a nivel de red: mobileIP o Whats new?
mobileIP
IETF mobileip (IP Routing for Wireless/Mobile Hosts) working group
o http://www.ietf.org/html.charters/mobileip-charter.html
Referencias:
o C. Perkins, IP Mobility Support, RFC2002 o J. Solomon et al., Mobile-IPv4 Configuration Option for PPP IPCP, RFC2290 o Charles E. Perkins, Mobile IP: design principles and practices, Addison-Wesley Wireless Communications Series, October 1997
1 4 8
El problema
Esquema de direccionamiento de IP Identificadores de conexiones TCP/UDP
<129.34.16.43, sh port #, 128.8.128.45, mh_port #>
subnet A Internet
subnet B
Clase A
red Red
Host
1.0.0.0 .. 126.0.0.0
subnet C
Clase B
10
red Red
Host
128.0.0.0 .. 191.255.0.0
Clase C
110
Red
192.0.0.0 .. 223.255.255.0
Host
Clase D
1110
direccin multicast
224.0.0.0 239.255.255.255
1 4 9
1 5 0
Internet
nodo IP
La solucin
Arquitectura
HA
o nodo que cambia su punto de o nodo que cambia su punto de conexin de una subred a otra conexin de una subred a otra
Home agent (HA) Home agent (HA)
HA
subnet C
o router en la subred home del o router en la subred home del MN que se encarga del tunneling MN que se encarga del tunneling de los datos hacia el MN de los datos hacia el MN o router en la subred actual o router en la subred actual (visitada) del MN que se encarga (visitada) del MN que se encarga del reenvo de los paquetes hacia del reenvo de los paquetes hacia el MN el MN
1 5 1
Servicios de MobileIP
HA
o los HA yylos FA hacen publica su o los HA los FA hacen publica su presencia en cada subred (o presencia en cada subred (o segmento de subred) en el que segmento de subred) en el que quieran proveer el servicio quieran proveer el servicio
Registration Registration
subnet C
o reenvo de los datagramas al MN o reenvo de los datagramas al MN por parte del HA por parte del HA
1 5 2
agent discovery
registration
reg. accept/deny reg. accept/deny
tunnelling
1 5 3
subnet A: 132.4.16.
Internet subnet B
subnet C 128.8.128.
direccin de localizacin
128.8.128.Y
132.4.16.Z
1 5 4
direccin esttica
1 5 5
Home agent
Internet
nodo IP
Triangle routing
Foreign agent 3
Deteccin de movimiento
Problema: como establezco que un nodo ha cambiado de subred?
Lazy Cell Switching (LCS) (conmuta con lnea AZUL) Eager Cell Switching (ECS) (conmuta con lnea ROJA) Prefix comparison (conmuta con lnea ROJA) (requiere mas subredes) Notificacin por el nivel de enlace (incluyendo parmetros como la potencia de la seal, etc.) Las prestaciones de estas tcnicas dependes del patrn de movilidad, de la frecuencia de los advertisement LCS con potencia de las seal pude ser mejor que ECS
1 5 6
1 5 7
Mobile computer switches right away to any new care-of address that might be available within the new cell Mobile nodes can switch to new care-of addresses without any interruption in connectivity to the Internet A list of current foreign agents must be maintained
o if a mobile node actually resides within range of two different foreign agents and is receiving beacons from both of them, the mobile node has to remember which was the most recently detected foreign agent and remain attached to that most recent one
1 5 8
Prefix Matching
Movement detection with prefix matching uses network prefixes If the prefixes differ, the mobile node may assume that it has moved If the prefix-matching method shows that the mobile node has moved, then a mobile node may choose instead to register with a foreign agent advertising a different network prefix, rather than reregister with its current care-of address The prefix-length extension may be used in some cases by a mobile node to determine whether a newly received agent advertisement was received on the same subnet as the mobile node's current careof address
1 5 9
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 format. We have also agreed to carve out (from OLSRv2) a common MANET neighborhood discovery protocol (still unnamed).
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 6 1
OSPF-MANET
1 6 2
DYMO
DYMO Reactive Protocol like AODV, but with path accumulation feature
I1
I2
I3
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 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ . TargetAddress . +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | TargetSeqNum | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | THopCnt |Res|
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 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |G| RBPrefix |Res| RBHopCnt | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ . RBNodeAddress . +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | RBNodeSeqNum | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | NL |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
RREQ RREQ RE-S RREQ RE-S RE-I1 RREQ RE-S RE-I1 RE-I2 RREQ RE-S RE-I1 RE-I2 RE-I3
RREP
1 6 3
1 6 4
DYMO vs AODV
Respuestas de Ian Chakeres a la pregunta: could you briefly explain what are the differences between DYMO and AODV
o 8 Mar 2005
There are several differences between AODV, AODV-bis, DSR and DYMO. To list just a few.
New packet format. Generic packet handling. Unsupported element handling. Optional path accumulation. Much more.
o 23 Mar 2006
DYMO is a simpler version of AODV. DYMO is easier to implement and has 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
OLSR v2
The key optimization of OLSRv2 is that of multipoint relays, providing an efficient mechanism for network-wide broadcast of linkstate information. A secondary optimization is, that OLSRv2 employs partial link-state information: each node maintains information of all destinations, but only a subset of links. This allows that only select nodes diffuse linkstate advertisements (i.e. reduces the number of network-wide broadcasts) and that these advertisements contain only a subset of links (i.e. reduces the size of each network-wide broadcast). The partial link-state information thus obtained allows each OLSRv2 node to at all times maintain optimal (in terms of number of hops) routes to all destinations in the network. OLSRv2 imposes minimum requirements to the network by not requiring sequenced or reliable transmission of control traffic. Furthermore, the only interaction between OLSRv2 and the IP stack is routing table management. OLSRv2 is particularly suitable for large and dense networks as the technique of MPRs works well in this context.
1 6 6
Advantage: ease of integration in Internet infrastructure Disadvantages: Overhead to keep tables up to date
1 6 7
http://www.ietf.org/internet-drafts/draft-badis-manet-qolsr-03.txt
1 6 8
Hot Topics
reas de inters del MobiHoc 2006
o Applications, operating system, and middleware support o Transport, network, and MAC protocols o Energy-efficient algorithms o Quality of Service issues o Location discovery techniques o Network scaling and limits o Cross layer design o Network resilience, fault-tolerance, and reliability o Trust, security and privacy o Distributed sensing, actuation, control, and coordination o Measurements and practical experience from experimental systems and testbeds o Modeling and performance evaluation
y el programa final:
o Tutorial 1: Wireless Mesh Networks: Fundamentals, Basic Protocols and Research Issues o Tutorial 3: Pervasive Environments: Challenges and Solutions o Tutorial 5: Design Guidelines for Network Layer Protocols in Ad Hoc and Sensor Networks o Tutorial 2: Wireless Mesh Networks: Applications, Testbeds, Products and Standards o Tutorial 4: Delay/Disruption Tolerant Networking o Tutorial 6: Multimedia Conferencing in Mobile Ad Hoc Networks: Challenges and Early Approaches o Technical Session 1: Routing and 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 o Technical Session 8: Sensor Networks
1 6 9
What is NS
Discrete event simulator
o The VINT project : Virtual InterNet Testbed o UC Berkeley, Lawrence Berkeley National Lab, USC/ISI, Xerox PARC, AT&T Research o Packet-level o Link layer and up o Wired and wireless
Object-oriented
o Mixed C++ and Otcl
Window 95/98/NT/2K
o Works, but with an effort
1 7 1
Graphic visualization - using nam (Network Animator) Emulation - A less known fact about ns-2
1 7 2
1 7 3
Basic tcl
proc test {} { proc test {} { set a 43 set a 43 set b 27 set b 27 set c [expr $a + $b] set c [expr $a + $b] set d [expr [expr $a - $b] * $c] set d [expr [expr $a - $b] * $c] for {set k 0} {$k < 10} {incr k} { for {set k 0} {$k < 10} {incr k} { if {$k < 5} { if {$k < 5} { puts "k < 5, pow = [expr pow($d, $k)]" puts "k < 5, pow = [expr pow($d, $k)]" } else { } else { puts "k >= 5, mod = [expr $d % $k]" puts "k >= 5, mod = [expr $d % $k]" } } } } } } test test
1 7 4
Basic OTcl
Class mom Class mom mom instproc greet {} { mom instproc greet {} { $self instvar age_ $self instvar age_ puts "$age_ years old mom: How are you doing?" puts "$age_ years old mom: How are you doing?" } } Class kid -superclass mom Class kid -superclass mom kid instproc greet {} { kid instproc greet {} { $self instvar age_ $self instvar age_ puts "$age_ years old kid: What's up, dude?" puts "$age_ years old kid: What's up, dude?" } } set a [new mom] set a [new mom] $a set age_ 45 $a set age_ 45 set b [new kid] set b [new kid] $b set age_ 15 $b set age_ 15 $a greet $a greet $b greet $b greet
1 7 5
1 7 6
ns [new Simulator] ns [new Simulator] at 1 puts \Hello World!\ at 1 puts \Hello World!\ at 1.5 exit at 1.5 exit run run
swallow 74% ns simple.tcl swallow 74% ns simple.tcl Hello World! Hello World! swallow 75% swallow 75%
1 7 7
Anatomy of NS Scripts
Create the event scheduler Create network Create protocol agents (connections) Generate traffic Turn on tracing Setup routing Insert errors Start event scheduler
1 7 8
Schedule events
o $ns at <time> <event> o <time>: any non-negative real numbers o <event>: any legitimate ns/tcl commands
1 7 9
agent
attach-agent
agent
attach-agent
Node
1 8 0
Link
Node
application
application
agent
attach-agent
agent
attach-agent
Node
1 8 1
Link
Node
application
application
agent
attach-agent
agent
attach-agent
Node
1 8 2
Link
Node
Inserting Errors
Creating Error Module
o set loss_module [new ErrorModel] o $loss_module set rate_ 0.01 o $loss_module unit pkt o $loss_module ranvar [new RandomVariable/Uniform] o $loss_module drop-target [new Agent/Null]
1 8 3
Tracing
Trace packets on all links
o $ns trace-all [open test.out w]
<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
1 8 4
1 8 5
1 8 6
1 8 7
1 8 8
#Setup a CBR over UDP connection set cbr [new Application/Traffic/CBR] $cbr attach-agent $udp $cbr set packet_size_ 1000 $cbr set rate_ 1mb
1 8 9
#Call the finish procedure after 5 seconds of simulation time $ns at 5.0 "finish"
1 9 0
1 9 1
1 9 2
1 9 3
1 9 5
LL (Link Layer)
o Runs data link protocols o Fragmentation and reassembly of packet o Runs Address Resolution Protocol(ARP) to resolve IP address to MAC address conversions
1 9 6
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
1 9 7
A first example
The file simple-wireless.tcl is under <NSRoot>/ns-allinone2.1b9/nstutorial/examples/simple-wireless.tcl
cd into the directory and type ns simple-wireless.tcl to run the simulation The simulation will generate a trace file named simple.tr
1 9 8
Setting Up Variables
#============================================================ # Define options #============================================================ set val(chan) Channel/WirelessChannel ;# channel type set val(prop) Propagation/TwoRayGround ;# radio-propagation model set val(ant) Antenna/OmniAntenna ;# Antenna type set val(ll) LL ;# Link layer type set val(ifq) Queue/DropTail/PriQueue ;# Interface queue type set val(ifqlen) 50 ;# max packet in ifq set val(netif) Phy/WirelessPhy ;# network interface type set val(mac) Mac/802_11 ;# MAC type set val(rp) DSDV ;# ad-hoc routing protocol set val(nn) 2 ;# number of mobilenodes
1 9 9
Setting Up Variables
#Instantiate simulator object set ns_ [new Simulator] #Setup Trace File set tracefd [open simple.tr w] $ns_ trace-all $tracefd #Create Topography set topo [new Topography] $topo load_flatgrid 500 500 #Create Object God create-god $val(nn)
2 0 0
Configuring Mobilenode
# Configure nodes $ns_ node-config -adhocRouting $val(rp) -macType $val(mac) -ifqLen $val(ifqlen) -propType $val(prop) -topoInstance $topo -agentTrace ON -macTrace OFF
-llType $val(ll) \ -ifqType $val(ifq) \ -antType $val(ant) \ -phyType $val(netif) \ -channelType $val(chan) \ -routerTrace ON \ -movementTrace OFF
for {set i 0} {$i < $val(nn) } {incr i} { set node_($i) [$ns_ node ] $node_($i) random-motion 0 ;# disable random motion }
2 0 1
Configuring Movement
Configure Initial Position
$node_(0) set X_ 5.0 $node_(0) set Y_ 2.0 $node_(0) set Z_ 0.0 $node_(1) set X_ 390.0 $node_(1) set Y_ 385.0 $node_(1) set Z_ 0.0
Create Movement
# Node_(1) starts to move towards node_(0) $ns_ at 50.0 "$node_(1) setdest 25.0 20.0 15.0" $ns_ at 10.0 "$node_(0) setdest 20.0 18.0 1.0" # Node_(1) then starts to move away from node_(0) $ns_ at 100.0 "$node_(1) setdest 490.0 480.0 15.0"
2 0 2
2 0 3
node_(0)
node_(1)
for {set i 0} {$i < $val(nn) } {incr i} { $ns_ at 150.0 "$node_($i) reset"; } $ns_ at 150.0001 "stop" $ns_ at 150.0002 "puts \"NS EXITING...\" ; $ns_ halt" proc stop {} { global ns_ tracefd close $tracefd }
Finally, Start The Simulation
2 0 4
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, 100.381997477:time stamps, _1_: node 1, AGT: trace generated by agent, 82: event(pkt) id, tcp: tcp packet, 1060: packet size, 13a(hex): expected duration of pkt transmission (not working), 1: sender mac id, 0: transmitter mac id, 800: pkt type IP (806 for ARP), 0:0: sender address:port# 1:0: receiver address:port#, 32: TTL 1: next hop address, [32 0]: TCP sequence #, ack #
2 0 5
ns-2/tcl/ex/wireless-demo-csci694.tcl
2 0 6
#Define standard ns/nam trace set tracefd [open 694demo.tr w] $ns_ trace-all $tracefd set namtrace [open 694demo.nam w] $ns_ namtrace-all-wireless $namtrace 670 670 #Create God set god_ [create-god 3]
God is used to store an array of the shortest number of hops required to reach from one node to an other. CAN BE OMITTED!!
2 0 7
2 0 8
Use for loop to create 3 nodes: for {set i < 0} {$i<3} {incr i} { set node_($i) [$ns_ node] }
2 0 9
2 1 0
2 1 1
2 1 2
Random movement
$node start
See ns-2/indep-utils/cmu-scen-gen/setdest/
2 1 3
See ns-2/indep-utils/cmu-scen-gen/
2 1 4
Related software
TraceGraph: trace files analyser
o http://www.geocities.com/tracegraph/
2 1 5