Issuu on Google+

無線網路CH7

學校 : 中華大學 系所 : 通訊工程學系 老師 : 余誌民教授

1


Ad Hoc On-Demand Distance Vector Routing (AODV)

1


Unicasting  The routing we have discussed so far is mainly point-topoint routing.  A source node wants to send a message to a destination node.

2


Multicasting  However, in many situations a node wants to send a message to a group of nodes in the network.  This is called multicasting and the group is called a multicast group.

3


Broadcasting  Broadcasting is a special case of multicasting when all the nodes in the network is in the multicast group.

4


Multicasting Support  DSDV and DSR mainly support unicast routing.  If multicasting is required, a node must establish unicast routes to each node in the multicast group.  A more efficient approach will maintain multicast routing trees for each multicast group.

5


Non-uniform Packet Size in DSR  Though DSR is a reactive or on-demand routing protocol, a major problem with DSR is its non-uniform packet size.  When a source node S sends a packet to a destination node D, S should send the entire route to D along with the packet.  This is necessary for the intermediate nodes to forward the packet.

6


Problem with Non-uniform Packet Size  Usually all media support packets of uniform size. If a packet is large, it has to be split into smaller packets.  This may cause problems in the wireless medium as packets that are split into smaller parts may not arrive in correct order.  Intermediate nodes may not be able to forward packets correctly.

7


Main Features of the AODV Protocol (I)  The Ad hoc On-Demand Distance Vector protocol is both an on-demand and a table-driven protocol.  The packet size in AODV is uniform unlike DSR. Unlike DSDV, there is no need for system-wide broadcasts due to local changes.  AODV supports multicasting and unicasting within a uniform framework.

8


Main Features of the AODV Protocol (II)  Each route has a lifetime after which the route expires if it is not used.  A route is maintained only when it is used and hence old and expired routes are never used.  Unlike DSR, AODV maintains only one route between a source-destination pair.

9


Continued  DSR includes source routes in packet headers  Resulting large headers can sometimes degrade performance. – particularly when data contents of a packet are small

 AODV attempts to improve on DSR by maintaining routing tables at the nodes, so that data packets do not have to contain routes.  AODV retains the desirable feature of DSR that routes are maintained only between nodes which need to communicate. 10


Unicast Route Establishment  Unicast route is a route from a source node to a destination node.  Like DSR, this protocols uses two types of messages, route request (RREQ) and route reply (RREP).  Like DSDV, we use sequence numbers to keep track of recent routes. Every time a node sends a new message, it uses a new sequence number which increases monotonically.

11


Route Request (RREQ) Message  When node S wants to send a message to node D, S searches its route table for a route to D.  If there is no route, S initiates a RREQ message with the following components : – The IP addresses of S and D – The current sequence number of S and the last known sequence number of D – A broadcast ID from S. This broadcast ID is incremented each time S sends a RREQ message.

12


Processing a RREQ Message (I)  The <broadcast ID, IP address> pair of the source S forms a unique identifier for the RREQ.  Suppose a node P receives the RREQ from S. P first checks whether it has received this RREQ before.  Each node stores the <broadcast ID, IPaddress> pairs for all the recent RREQs it has received.

13


Processing a RREQ Message (II) S

Q

P

D

 If P has seen this RREQ from S already, P discards the RREQ. Otherwise, P processes the RREQ :  P sets up a reverse route entry in its route table for the source S.  This entry contains the IP address and current sequence number of S, number of hops to S and the address of the neighbour from whom P got the RREQ.

14


Lifetime of a Route-Table Entry  A lifetime is associated with the entry in the route table.  This is an important feature of AODV. If a route entry is not used within the specified lifetime, it is deleted.  A route is maintained only when it is used. A route that is unused for a long time is assumed to be stale.

15


Route Requests in AODV Y Z S

E F

B

C

M

J

A

L

G H

K I

D N

Represents a node that has received RREQ for D from S 16


Route Requests in AODV Y

Broadcast transmission Z S

E F

B

C

M

J

A

L

G H

K I

D N

Represents transmission of RREQ 17


Route Requests in AODV Y Z S

E F

B

C

M

J

A

L

G H

K

D

I

N

Represents links on Reverse Path 18


Reverse Path Setup in AODV Y Z S

E F

B

C

M

J

A

L

G H

K I

D N

â&#x20AC;˘ Node C receives RREQ from G and H, but does not forward it again, because node C has already forwarded RREQ once 19


Reverse Path Setup in AODV Y Z S

E F

B

C

M

J

A

L

G H

K I

D N

20


Reverse Path Setup in AODV Y Z S

E F

B

C

M

J

A

L

G H

K

D

I

â&#x20AC;˘ Node D does not forward RREQ, because node D is the intended target of the RREQ

N

21


Forward Path Setup in AODV Y Z S

E F

B

C

M

J

A

L

G H

K

D

I

N

Forward links are setup when RREP travels along the reverse path Represents a link on the forward path

22


Handling More than one RREP  An intermediate node P may receive more than one RREP for the same RREQ.  P forwards the first RREP it receives and forwards a second RREP later only if : – The later RREP contains a greater sequence number for the destination, or – The hop-count to the destination is smaller in the later RREP – Otherwise, it does not forward the later RREPs. This reduces the number of RREPs propagating towards the source.

23


Route Maintenance  Once a unicast route has been established between two nodes S and D, it is maintained as long as S (source node) needs the route.  If S moves during an active session, it can reinitiate route discovery to establish a new route to D.  When D or an intermediate node moves, a route error (RERR) message is sent to S.

24


Route Maintenance RERR S

RERR 1 2

3´ 3 D

 The link from node 3 to D is broken as 3 has moved away to a position 3´.  Node 2 sends a RERR message to 1 and 1 sends the message in turn to S.  S initiates a route discovery if it still needs the route to D.

25


Updating Route Tables RERR S

3´

RERR 1 2 4

3 D 5

 Suppose neighbours 4 and 5 route through 2 to reach D. Node 2 broadcasts RERR to all such neighbours.  Each neighbour marks its route table entry to D as invalid by setting the distance to infinity.

26


Updating Route Tables RERR S

3´

RERR 1 2 4

3 D 5

 Each neighbour in turn propagates the RERR message.  Route entries with an infinity metric are not rejected immediately as they contain useful routing information for the neighbourhood.

27


Local Connectivity  Neighbourhood information is obtained through hello messages. Each node broadcasts a hello message to its neighbours at a regular hello-interval.  When a node M receives a hello message from a neighbour N, node M updates the lifetime associated with N in its route table.  Hello messages propagate only for one hop, in the neighbourhood of a node.

28


Multicast Route Establishment  RREQ and RREP messages are used for multicast route establishment.  A multicast tree has two kinds of members.  A group member is a node that is part of the multicast group.  A tree member is not part of the multicast group, but used to connect the multicast tree.

29


An Example Multicast Tree

Tree Member Group member Non-tree member 30


Multicast Route Discovery  Multicast route discovery begins when either â&#x20AC;&#x201C; A node S wishes to join a multicast group â&#x20AC;&#x201C; A node S has data to send to a multicast group and does not have a current route to it

 S sends a RREQ with the destination address set to the IP address of the multicast group and the last known sequence number of the group. These could be for any node from the multicast group known to S.

31


Multicast Route Discovery  S also indicates whether it wants to join the multicast group by setting a join flag.  S then broadcasts this RREQ to its neighbours.  If the RREQ is a join request, only a node that is a member of the multicast group may reply.  Otherwise, any node with a current route to the multicast group may reply.

32


Joining a Multicast Group

Sending RREQ 33


Joining a Multicast Group

RREP back 34


Forward Path for RREP  The forward path for a RREP is set up in the same way as for unicast path set up.  A member of the multicast group may send a RREP for a RREQ if it has a greater sequence number for the multicast group than the sequence number in the RREQ.  The RREP is unicast back to the sender of the RREQ and all route tables along the path are updated.

35


Multicast Route Activation  The node S sending a RREQ will generally receive multiple RREPs. These RREPs set up potential branches for S to join the multicast tree.  S chooses the path with the greatest sequence number and smallest hop count.  S activates this route by sending a multicast activation (MACT) message to the next hop of this route. This message is forwarded by the other nodes along the route.

36


Multicast Tree Deactivation  A leaf node may leave a multicast tree by following a similar procedure, by sending an MACT message and deleting the multicast group information from its route table.  However, a non-leaf node cannot remove itself from a tree as that partitions the tree.  A non-leaf node continues to act as a router for the multicast group even when it leaves the group.

37


Link Breaks  A member or a tree-node in a multicast tree may notice a link break when : â&#x20AC;&#x201C; No hello-message has been received from the next hop node for sometime â&#x20AC;&#x201C; Or, when the node cannot send a packet to the next hop node (the next hop node has moved away)

 It is the responsibility of a node nearer to the source S to repair this link break.  This is done through sending a RREQ message.

38


Repairing Link Breaks

M

N

M

N

RREQ

39


Repairing Link Breaks  A node discovering the link break broadcasts a RREQ message to its neighbours. This RREQ message requests a route to the multicast group.  Once RREP messages are recieved, the node chooses a new route to the multicast group by sending an MACT message.

40


Performance of AODV  AODV does not retransmit data packets that are lost and hence does not guarantee packet delivery.  However, the packet delivery percentage is close to 100 with relatively small number of nodes.  The packet delivery percentage drops with increased moility.

41


Control Overheads  The overhead packets in AODV are due to RREQ, RREP and RERR messages.  AODV needs much less number of overhead packets compared to DSDV.  The number of overhead packets increases with increased mobility, since this gives rise to frequent link breaks and route discovery.

42


Latency in Route Discovery  The route discovery latency in AODV is low compared to DSR and DSDV.  The latency is almost constant even with increased mobility if the concentration of the nodes remain similar.  The average path length for discovered routes is also quite low.

43


Route Request and Route Reply  Route Request (RREQ) includes the last known sequence number for the destination  An intermediate node may also send a Route Reply (RREP) provided that it knows a more recent path than the one previously known to sender  Intermediate nodes that forward the RREP, also record the next hop to destination  A routing table entry maintaining a reverse path is purged after a timeout interval  A routing table entry maintaining a forward path is purged if not used for a active_route_timeout interval 44


Link Failure  A neighbor of node X is considered active for a routing table entry if the neighbor sent a packet within active_route_timeout interval which was forwarded using that entry  Neighboring nodes periodically exchange hello message  When the next hop link in a routing table entry breaks, all active neighbors are informed  Link failures are propagated by means of Route Error (RERR) messages, which also update destination sequence numbers

45


Route Error  When node X is unable to forward packet P (from node S to node D) on link (X,Y), it generates a RERR message  Node X increments the destination sequence number for D cached at node X  The incremented sequence number N is included in the RERR  When node S receives the RERR, it initiates a new route discovery for D using destination sequence number at least as large as N  When node D receives the route request with destination sequence number N, node D will set its sequence number to N, unless it is already larger than N 46


AODV: Summary  Routes need not be included in packet headers  Nodes maintain routing tables containing entries only for routes that are in active use  At most one next-hop per destination maintained at each node â&#x20AC;&#x201C; DSR may maintain several routes for a single destination

 Sequence numbers are used to avoid old/broken routes  Sequence numbers prevent formation of routing loops  Unused routes expire even if topology does not change 47


MANETs and Dynamic Source Routing Protocol

48


Mobile Ad Hoc Networks (MANET) • • 

• 

Information exchange in a network of mobile and wireless nodes without any infrastructural support. Such networks are often called ad hoc networks to emphasize that they do not depend on infrastructural support. A mobile ad-hoc network is a mobile, multi-hop wireless network which is capable of autonomous operation. The purpose of an ad hoc network is to set up (possibly) a short-lived network for a collection of nodes. Characteristics – – – –

Energy constrained nodes Bandwidth constrained Variable capacity wireless links Dynamic topology

49


Mobile Ad Hoc Networks (MANET)  Host movement frequent  Topology change frequent

A

B

A

B

 No cellular infrastructure. Multi-hop wireless links.  Data must be routed via intermediate nodes. 50


Why Ad Hoc Networks ?  Setting up of fixed access points and backbone infrastructure is not always viable – Infrastructure may not be present in a disaster area or war zone – Infrastructure may not be practical for short-range radios; Bluetooth (range ~ 10m)

 Ad hoc networks: – Do not need backbone infrastructure support – Are easy to deploy – Useful when infrastructure is absent, destroyed or impractical

51


Wireless Networks  Need: Access computing and communication services, on the move  Infrastructure-based Networks – traditional cellular systems (base station infrastructure)

 Wireless LANs – Infrared (IrDA) or radio links (Wavelan) – very flexible within the reception area; ad-hoc networks possible – low bandwidth compared to wired networks (1-1000 Mbit/s)

 Ad hoc Networks – useful when infrastructure not available, impractical, or expensive – military applications, rescue, home networking 52


Cellular Wireless  Single hop wireless connectivity to the wired world – – – –

Space divided into cells A base station is responsible to communicate with hosts in its cell Mobile hosts can change cells while communicating Hand-off occurs when a mobile host starts communicating via a new base station

53


Multi-Hop Wireless  May need to traverse multiple links to reach destination

 Mobility causes route changes 54


Routing in MANET 

No base station. No fixed infrastructure.



Traditional fixed networks routing schemes are not effective. – E.g. Link state and distance vector routing algorithms



MANET nodes cooperate to provide routing service. – A node communicates directly with nodes in wireless range. – For all other destinations, a dynamically determined multi-hop route through other nodes. – Rely on each other to forward packets to their destination.

55


Taxonomy - MANET routing 

Communication model – What is the wireless communication model?



Structure – Are all nodes treated uniformly? – How are distinguished nodes selected?



State information – Is network scale topology information obtained at each node?



Scheduling – Is the route information always maintained at each destination?

56


Taxonomy – Communication model 

Multi-channel communication – Combine channel assignment and routing functionality – Generally used in TDMA or CSMA based networks – E.g. Clusterhead Gateway Switched Routing



Single channel communication – Generally CSMA/CA oriented protocols – Vary in the extent to which they rely on specific link-layer behaviors like failure detection, traffic information etc. – E.g. Dynamic Source Routing, Global State Routing

57


Taxonomy - Structure 

Uniform protocols – No hierarchical structure. – Send and respond to routing control messages the same way. – Save resource cost in maintaining high-level structure – Scalability may become an issue



Non-Uniform protocols – Reduces no. of nodes participating in a route computation. – Improve scalability – Reduce communication overhead. – Support use of greater computational complexity.

58


Taxonomy – Structure (contd.) 

Further categories of non-uniform protocols – Neighbor selection protocol

• • • –

Some nodes take on distinguished role. No negotiation process. No consensus with neighbors. Not affected by non-local topological changes.

Partitioning protocol

• • •

Nodes negotiate a topological partitioning into clusters. Distributed operation. No central topology manager. Roles could be “cluster-head” or “gateway” between two clusters.

59


Taxonomy – State Information 

Topology based Protocols – Exchange large scale (complete) topology information – Variants of link-state protocols

• • 

Less frequent data exchange Apply expensive computation to a few nodes.

Destination based Protocols – Exchange local topology information (e.g. 1 or 2-hop ) – Most are variants of distance-vector protocols. – Others avoid exchange of distance information.

Maintain information only for “active” destination.

60


Taxonomy – Scheduling 



Proactive protocols – –

Traditional distributed shortest-path protocols Maintain routes between every host pair at all times

– –

Exchange route information • Periodically • In response to topology change Minimizes delay in obtaining a route Consumes significant network resources due to periodic updates, i.e., High routing overhead

Example: DSDV (destination sequenced distance vector)

Reactive protocols – –

Determine route if and when needed Source initiates route discovery

2 step process • Route Discovery • Route Maintenance Route discovery is expensive



Hybrid protocols – – –

Adaptive; Combination of proactive and reactive Example: DSR (dynamic source routing) Example : ZRP (zone routing protocol) 61


Many Applications  Personal area networking – cell phone, laptop, ear phone, wrist watch

 Military environments – soldiers, tanks, planes

 Civilian environments – – – –

taxi cab network meeting rooms sports stadiums boats, small aircraft

 Emergency operations – search-and-rescue – policing and fire fighting 62


Challenges in Mobile Environments • Limitations of the Wireless Network • • • • •

packet loss due to transmission errors variable capacity links frequent disconnections/partitions limited communication bandwidth Broadcast nature of the communications

• Limitations Imposed by Mobility • dynamically changing topologies/routes • lack of mobility awareness by system/applications

• Limitations of the Mobile Computer • short battery lifetime • limited capacities 63


Effect of mobility on the protocol stack  Application – new applications and adaptations

 Transport – congestion and flow control

 Network – addressing and routing

 Link – media access and handoff

 Physical – transmission errors and interference

64


Medium Access Control in MANET  Can we apply media access methods from fixed networks?  Example CSMA/CD – Carrier Sense Multiple Access with Collision Detection – send as soon as the medium is free, listen into the medium if a collision occurs (original method in IEEE 802.3)

 Medium access problems in wireless networks – signal strength decreases proportional to the square of the distance – sender would apply Carrier Sense (CS) and Collision Detection (CD), but the collisions happen at the receiver – sender may not “hear” the collision, i.e., CD does not work – CS might not work, e.g. if a terminal is “hidden” 65


Hidden and Exposed Terminals  Hidden terminals – – – –

A sends to B, C cannot receive A C wants to send to B, C senses a “free” medium (CS fails) collision at B, A cannot receive the collision (CD fails) A is “hidden” for C

A

B

C

 Exposed terminals – – – –

B sends to A, C wants to send to another terminal (not A or B) C senses carrier, finds medium in use and has to wait A is outside the radio range of C, therefore waiting is not necessary C is “exposed” to B 66


Routing  A router receives a packet from a network and passes it to another network.  At the Router a Routing Table is maintained which may be Static or Dynamic.  A router is usually attached to several networks. When it receives a packet, to which network should it pass the packet? The decision is based on optimization: which of the available pathways is the optimum pathway?  Routing is the act of moving information across an internetwork from a source to a destination.  Along the way, at least one intermediate node typically is encountered.  Routing involves two basic activities: determining optimal routing paths and transporting information groups (typically called packets) through an internetwork. 67


Continue Continue

68


Routing Example A To A B C D E D To A B C D E

Cost Next 0 5 2 3 6 C A’s Table Cost 3 8 5 0 9 D’s Table

Next A A A

A

4

3

C C To Cost A 2 B 4 C 0 D 5 E 4 C’s Table

4

2 3 D

B

5

Next A -

B To A B C D E E E To A B C D E

Cost Next 5 0 4 8 A 3 B’s Table

Cost 6 3 4 9 0 69 E’s Table

Next C C -


Continue  Routing is often contrasted with bridging, which might seem to accomplish precisely the same thing to the casual observer.  The primary difference between the two is that bridging occurs at Layer 2 (the data link layer) of the OSI reference model, whereas routing occurs at Layer 3 (the network layer).  This distinction provides routing and bridging with different information to use in the process of moving information from source to destination, so the two functions accomplish their tasks in 70 different ways.


Continue  The International Organization for Standardization (ISO) has developed a hierarchical terminology that is useful in describing routing.  Using this terminology, network devices without the capability to forward packets between subnetworks are called end systems (ESs), whereas network devices with these capabilities are called intermediate systems (ISs).  ISs are further divided into those that can communicate within routing domains (intradomain ISs) and those that communicate both within and between routing domains (interdomain ISs). 71


Continue  A routing domain generally is considered a portion of an internetwork under common administrative authority that is regulated by a particular set of administrative guidelines.  An autonomous system (AS) is a group of networks and routers under the authority of a single administration.  Routing inside an autonomous system is referred to as intradomain routing.  Routing between autonomous systems is referred to as interdomain routing. Each autonomous system can choose one or more intradomain routing protocols to handle routing inside the autonomous systems. 72


Autonomous Systems R1 R1 R1 R1

R1

R1

R1

R1 R1

R1 R1

R1 R1

73


Routing and Mobility  Finding a path from a source to a destination  Issues – Frequent route changes • amount of data transferred between route changes may be much smaller than traditional networks – Route changes may be related to host movement – Low bandwidth links 

Goal of routing protocols – decrease routing-related overhead – find short routes – find “stable” routes (despite mobility) 74


Protocol Trade-offs  Reactive protocols – – – –

Lower overhead since routes are determined on demand Significant delay in route determination Employ flooding (global search) Control traffic may be bursty

 Which approach achieves a better trade-off depends on the traffic and mobility patterns

75


Reactive Routing Protocols Dynamic Source Routing (DSR) 76


The Routing Problem S

S´

D´

D

The

routing problem is to find a route from S to D when some or all of the nodes are mobile.

77


Dynamic Source Routing (DSR)

 When node S wants to send a packet to node D, but does not know a route to D, node S initiates a route discovery  Source node S floods Route Request (RREQ)  Each node appends own identifier when forwarding RREQ

78


Route Discovery in DSR Y Z S

E F

B

C

M

J

A

L

G H

K I

D N

Represents a node that has received RREQ for D from S 79


Route Discovery in DSR Y

Broadcast transmission [S] S

Z E F

B

C

M

J

A

L

G D

H

K I

N

Represents transmission of RREQ [X,Y]

Represents list of identifiers appended to RREQ

80


Route Discovery in DSR Y Z S

E

[S,E] F

B

C

A

M

J

[S,C]

L

G D

H

K I

N

â&#x20AC;˘ Node H receives packet RREQ from two neighbors: potential for collision 81


Route Discovery in DSR Y Z S

E F

B

[S,E,F]

C

M

J

A

L

G D

H I

[S,C,G] K

N

â&#x20AC;˘ Node C receives RREQ from G and H, but does not forward it again, because node C has already forwarded RREQ once 82


Route Discovery in DSR Y Z S

E [S,E,F,J]

F

B

C

M

J

A

L

G D

H

K I

[S,C,G,K]

â&#x20AC;˘ Nodes J and K both broadcast RREQ to node D â&#x20AC;˘ Since nodes J and K are hidden from each other, their transmissions may collide

N

83


Route Discovery in DSR Y Z S

E

[S,E,F,J,M]

F

B

C

M

J

A

L

G D

H

K I

â&#x20AC;˘ Node D does not forward RREQ, because node D is the intended target of the route discovery

N

84


Route Discovery in DSR

 Destination D on receiving the first RREQ, sends a Route Reply (RREP)  RREP is sent on a route obtained by reversing the route appended to received RREQ  RREP includes the route from S to D on which RREQ was received by node D

85


Route Reply in DSR Y Z S

E

RREP [S,E,F,J,D] F

B

C

M

J

A

L

G D

H

K I

Represents RREP control message

N

86


Dynamic Source Routing (DSR)

 Node S on receiving RREP, caches the route included in the RREP  When node S sends a data packet to D, the entire route is included in the packet header â&#x20AC;&#x201C; hence the name source routing

 Intermediate nodes use the source route included in a packet to determine to whom a packet should be forwarded

87


Data Delivery in DSR Y DATA [S,E,F,J,D] S

Z

E F

B

C

M

J

A

L

G D

H

K I

N

Packet header size grows with route length 88


DSR Optimization: Route Caching  Each node caches a new route it learns by any means  When node S finds route [S,E,F,J,D] to node D, node S also learns route [S,E,F] to node F  When node K receives Route Request [S,C,G] destined for node, node K learns route [K,G,C,S] to node S  When node F forwards Route Reply RREP [S,E,F,J,D], node F learns route [F,J,D] to node D  When node E forwards Data [S,E,F,J,D] it learns route [E,F,J,D] to node D  A node may also learn a route when it overhears Data  Problem: Stale caches may increase overheads 89


Dynamic Source Routing: Advantages

 Routes maintained only between nodes who need to communicate â&#x20AC;&#x201C; reduces overhead of route maintenance

 Route caching can further reduce route discovery overhead  A single route discovery may yield many routes to the destination, due to intermediate nodes replying from local caches

90


Dynamic Source Routing: Disadvantages  Packet header size grows with route length due to source routing  Flood of route requests may potentially reach all nodes in the network  Potential collisions between route requests propagated by neighboring nodes â&#x20AC;&#x201C; insertion of random delays before forwarding RREQ

 Increased contention if too many route replies come back due to nodes replying using their local cache â&#x20AC;&#x201C; Route Reply Storm problem

 Stale caches will lead to increased overhead

91


中華大學 余誌民 Ch7 AODV