37
Communication Research Labs Sweden AB

Ad hoc communication #2/3

  • Upload
    sakina

  • View
    36

  • Download
    0

Embed Size (px)

DESCRIPTION

Ad hoc communication #2/3. Course element content for Ad hoc. Lecture 1 (Ad hoc concept and networking overview) Ad hoc concept Ad hoc basic functionality Ad hoc possible usage areas Background of ad hoc Networking: OSI, Protocols, routing, TCP/IP Project description (briefly) - PowerPoint PPT Presentation

Citation preview

Page 1: Ad hoc communication #2/3

Communication Research Labs Sweden AB

Page 2: Ad hoc communication #2/3

Communication Research Labs Sweden AB

Course element content for Ad hoc

•Lecture 1 (Ad hoc concept and networking overview)•Ad hoc concept•Ad hoc basic functionality•Ad hoc possible usage areas•Background of ad hoc•Networking: OSI, Protocols, routing, TCP/IP•Project description (briefly)

•Lecture 2 (Networking and routing in depth)•TCP/IP in depth•Routing protocols: purpose, conceptual function and review•Standardization work: IETF, IEEE current protocols•Additional ad hoc routing features

•Lecture 3 (Advanced concepts)•ARP, MAC layer•Quality of Siervice (QoS): SNR, Bandwidth constraints, Neighbor solicitation errors•IPv6 (briefly)•Security issues for ad hoc networks (briefly)

Ad hoc communication: Concept, OSI and TCP/IP OSI and TCP/IP

Page 3: Ad hoc communication #2/3

Communication Research Labs Sweden AB

Purpose:• Means of discovering paths in a (data) network along which information can be sent.• Allows routing in large/complex networks without the need of manual configuration.

Example of applications:• Public Switched Telephone Network (PSTN)• The Internet

Example of wired routing algorithms:• Open Shortest Path First (OSPF)• Routing Information Protocol (RIP)• Border Gateway Protocol (BGP)

Routing algorithms in general

(Not ad hoc specific!)

Page 4: Ad hoc communication #2/3

Communication Research Labs Sweden AB

802.2Logical Link Control (LLC)

IP

TCP

Medium Access Control (MAC)

6 - Presentation Layer

7 - Application Layer

5 - Session Layer

4 - Transport Layer

3 - Network Layer

2 - Data Link Layer

1 - Physical Layer

NetworkOperatingSystem(NOS)

802.11Wireless LAN

802.5Token Ring

802.4Token Bus

802.3Ethernet

The 7-Layer OSI Reference Model

• Divides the functions of protocols into a series of layers.• Often referred to as a protocol stack.• Each layer performs services for the next higher layer and makes requests of the next

lower layer.• Is an ISO standard.• Often simplified to a 5-layer model.

Page 5: Ad hoc communication #2/3

Communication Research Labs Sweden AB

Transport Layer

Network Layer

Data Link Layer

Physical Layer

Application Layer

Simplified OSI Reference Model

Transmission Control Protocol (TCP)

Internet Protocol (IP)

Ethernet (MAC)

802.11x

HyperText Transfer Protocol

(Examples of each layer)

Page 6: Ad hoc communication #2/3

Communication Research Labs Sweden AB

The Data Link Layer – Layer 2

• Provides a reliable data transfer over a physical link.

• May detect and possibly correct errors occurred at the physical layer.

• All IEEE 802 compatible devices has a unique Media Access Control (MAC) address.

• The MAC addresses are used for identification on point-to-point (link) communication.

Page 7: Ad hoc communication #2/3

Communication Research Labs Sweden AB

The Network Layer – Layer 3

• Responsible for end-to-end packet delivery.

• Determines the route from source to destination.

• Most famous Network Layer Protocol is the Internet Protocol, IPv4.

• Provides logical addressing, such as the IP addresses.

• IP provides an unreliable packet service (best effort). Reliability is typically performed at higher level protocols like TCP.

Page 8: Ad hoc communication #2/3

Communication Research Labs Sweden AB

Layer 7 example: HTTP

HTTP/1.1 200 OKDate: Tue, 1 November 2005 12:38:34 GMTServer: Apache/1.3.27 (Linux)Last-Modified: Wed, 08 Jan 2003 23:11:55 GMTAccept-Ranges: bytesContent-Length: 188Content-Type: text/html; charset=UTF-8<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html> <head> <title> Communication Research Labs Sweden AB </title> </head> <body> ... </body></html>

Objective: We want to transmit a HyperText Transfer Protocol

HTTP object(HTTP/1.1 200 OK\n Date:Tue, 1 November 2005 12:38:34 GMT\nServer: Apache/1.3.27 ...)

Page 9: Ad hoc communication #2/3

Communication Research Labs Sweden AB

Layer 4 example: TCP

TCP PAYLOAD(i.e. the HTTP object)

Payload is to large. Fragmentation needed!

HTTP/1.1 200 OK\nDate: Tue, 1 November 2005 12:38:34 GMT\nServer: Apache/1.3.27 (Linux)\nLast-Modified: Wed, 08 Jan 2003 23:11:55 GMT\nAccept-Ranges: 148 bytes\nContent-Length: 188\nContent-Type: text/html; charset=UTF-8\n<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">\n<html>\n<head>\n<title>\nCommunication Research Labs Sweden AB</title>\n</head>\n<body>\n...\n</body>\n</html>\n

TCPHEADER

TCP PAYLOAD(Fragment 1)

HTTP/1.1 200 OK\nDate: Tue, 1 November 2005 12:38:34 GMT\nServer: Apache/1.3.27 (Linux)\nLast-Modified: Wed, 08 Jan 2003 23:11:55 GMT\nAccept-Ranges: 148 bytes\nContent-Length: 188\nContent-Type: text/html; charset=UTF-8\n<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"

TCPHEADER

TCP PAYLOAD(Fragment 2)

"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">\n<html>\n<head>\n<title>\nCommunication Research Labs Sweden AB</title>\n</head>\n<body>\n...\n</body>\n</html>\n

Page 10: Ad hoc communication #2/3

Communication Research Labs Sweden AB

Layer 2 & 3 example: IP & MAC

TCPHEADER

TCP PAYLOAD(Fragment 1)

TCPHEADER

TCP PAYLOAD(Fragment 1)

IPHEADER

TCPHEADER

TCP PAYLOAD(Fragment 1)

IPHEADER

MACHEADER

Page 11: Ad hoc communication #2/3

Communication Research Labs Sweden AB

Layer 1 example: PHY

TCPHEADER

TCP PAYLOAD(Fragment 1)

IPHEADER

MACHEADER

• Line coding (0010 0010 1100 0101 …)

• Channel coding (01010 01010 11100 01101 …)

• Modulation

Page 12: Ad hoc communication #2/3

Communication Research Labs Sweden AB

IPv4 Header overview

Version IHL Type of Service Total Length Identification Fragment offset0 DF

MF

Time To Live …..

0 bit 32 64

Destination AddressDestination Address

Protocol

Fragment offset0 D

F

MF

IP header

Version Type of ServiceIHL

Identification

Total Length

Time To Live Protocol Header Checksum

Source Address

Transport Layer Data….

Version Type of ServiceIHL

Identification

Total Length

Time To Live Header Checksum

Source Address

Transport Layer Data….

Fragment offset0 DF

MF

0 bit

32

64

96

128 bit160

Page 13: Ad hoc communication #2/3

Communication Research Labs Sweden AB

• Charged with developing and promoting Internet standards, in particular, those of the TCP/IP protocol suite

• Organized into a large number of Working Groups (WGs), each dealing with a specific topic, and intended to complete work on that topic and then shut down.

• IETF MANET WG is dedicated to MANET research in deployment of open standards for ad hoc routing protocols.

The Internet Engineering Task Force (IETF)

Standardization work

Page 14: Ad hoc communication #2/3

Communication Research Labs Sweden AB

Internet-Drafts:• The Dynamic Source Routing Protocol for Mobile Ad Hoc Networks (DSR)• Dynamic MANET On-demand (DYMO) Routing• Simplified Multicast Forwarding for MANET• The Optimized Link-State Routing Protocol version 2

Request For Comments:• Mobile Ad Hoc Networking (MANET): Routing Protocol Performance Issues and

Evaluation Considerations (RFC2501)• Ad Hoc On Demand Distance Vector (AODV) Routing (RFC 3561)• Optimized Link-State Routing Protocol (RFC 3626)• Topology Dissemination Based on Reversed-Path Forwarding (TBRPF) (RFC 3684)

Standardization workIETF – MANET Workgroup

Page 15: Ad hoc communication #2/3

Communication Research Labs Sweden AB

Ad hoc routing protocols

• AODV Ad hoc On demand Distance Vector Protocol(IETF RFC #3561)

• DSR Dynamic Source Routing Protocol(IETF DRAFT #09)

• OLSR Optimized Link State Routing Protocol(IETF RFC #3626)

• TBRPF Topology Dissemination Based onReverse-Path Forwarding(IETF RFC #3684)

Will used in one of the projects.

Page 16: Ad hoc communication #2/3

Communication Research Labs Sweden AB

Proactive Routing Reactive Routing

• Continuously updates the network topology

• Requested routes are immediately available

• Network resources are wasted

• Route discovery on demand• Might cause some initial delay• Consumes less network

resources• Silent network

Routing / mobility management(Repetition from the first lecture)

Page 17: Ad hoc communication #2/3

Communication Research Labs Sweden AB

Infrastructure ModeExtended Service Set(ESS)

Ad hoc Mode Independent Basic Service Set(IBSS)

Ad hoc communication with WLAN802.11 MAC Layer Service Set

Page 18: Ad hoc communication #2/3

Communication Research Labs Sweden AB

Limitations with WLAN

A

B

C

A

B

C

Uni-directional link Bi-directional link

• The Data Link Layer (MAC Layer) in IEEE 802.11 requires bi-directional links for point-to-point communication.

• Broadcasted messages is done at a lower bit rate and thereby travel further.

• Broadcasted transmissions are not guaranteed to be bi-directional, unlike unicasted transmissions.

• Small packets are often used to discover routes. However, small packets are less prone to bit errors than large packets.

Page 19: Ad hoc communication #2/3

Communication Research Labs Sweden AB

• Reactive routing protocol.• The User Datagram Protocol (UDP), Layer 4, is used for locating

and maintaining routes.• Uses Expanding Ring Search to locate destinations.• Simple, yet effective routing algorithm.

Ad hoc On-demand Distance Vector(AODV)

Page 20: Ad hoc communication #2/3

Communication Research Labs Sweden AB

AODV Route Establishment

RREQ RREQRREQRREQ

RREP RREPRREP RREP

• Expanding Ring Search (ERS) limits data packets from traversing through the entire network.

• Route Requests are broadcasted!

• All routing messages MUST contain node specific sequence numbers which are incremented for every transmission.

• Each node MUST record and maintain sequence numbers for all known destinations.

• A received message with lower sequence number than recorded is to be discarded to ensure loop freedom at all times.

Page 21: Ad hoc communication #2/3

Communication Research Labs Sweden AB

AODV Connectivity

• Each forwarding node MUST ensure connectivity to its active next hops.

• Most implementations of AODV uses hello messages to offer connectivity.A hello message is a broadcasted message with hop limit of one. This also allows nodes to always keep track of its neighbors.

• Broken links has to be reported by sending a Route Error message to adjacent nodes.

Connectivity lost. Sending Route Error!

RERR

Page 22: Ad hoc communication #2/3

Communication Research Labs Sweden AB

AODV Characteristics

Advantages:• Low processing.• Low network utilization.• Low memory overhead.

Disadvantages:• Initial latency while requesting new routes. (Reactive routing)• Sensitive to unstable links (for instance when used in WLAN).• Does not support multi-path, load balancing or weighting of routes.

Page 23: Ad hoc communication #2/3

Communication Research Labs Sweden AB

Optimized Link-State Routing(OLSR)

• Proactive routing protocol.• Table driven (i.e. nodes exchange topology information).• Quality aware algorithm.• Uses the User Datagram Protocol (UDP) for topology propagation.

Page 24: Ad hoc communication #2/3

Communication Research Labs Sweden AB

OLSR Multipoint relays (MPR) – 1 of 3

• Each node selects a set of its neighbor nodes as Multipoint Relays (MPR) by two rules: any 2-hop neighbor must be covered by at least one MPR and the number of MPRs be as low as possible.

• Only MPRs advertises (floods) their current links.

• MPRs was first introduced in HiperLAN, a ETSI standard similar to WLAN.

A B1

2

3

4

5

6

Page 25: Ad hoc communication #2/3

Communication Research Labs Sweden AB

OLSR Multipoint relays (MPR) – 2 of 3

Left image:• Normal flooding.

Right image:• MPRs are the only nodes that may forward (flood) messages.

Page 26: Ad hoc communication #2/3

Communication Research Labs Sweden AB

OLSR Multipoint relays (MPR) – 3 of 3

Page 27: Ad hoc communication #2/3

Communication Research Labs Sweden AB

OLSR Route Establishment

• Every node periodically broadcasts hello messages in order to exchange neighborhood information. (IP address, route weight, distance, sequence number etc.)

• MPRs propagates the topology information in the network. • Hello messages allows nodes to calculate the shortest/best route to

other nodes.• The information is only updated when:

1. The neighborhood has changed.

2. A route has expired.

3. A better route is detected.

Page 28: Ad hoc communication #2/3

Communication Research Labs Sweden AB

OLSR Characteristics

Advantages:• Minimal latency.• Supports multi-path.• Supports route weighting. (i.e. the cost of using a certain route)

Disadvantages:• High routing control overhead traffic.• High demands on memory, computational capacity and power.• Complex (implementation)!

Page 29: Ad hoc communication #2/3

Communication Research Labs Sweden AB

Dynamic Source Routing(DSR)

• Reactive routing protocol.• Modifies every IP packet with an additional header, DSR Header.

Example:

TCPHEADER

TCP PAYLOADDSRHEADER

IPHEADER

Page 30: Ad hoc communication #2/3

Communication Research Labs Sweden AB

DSR Route Discovery

• A Route Request is preformed as in AODV but with one great difference: Each node adds its own IP address in the request.

• The Route Discovery mechanism in DSR allows intermediate nodes to eavesdrop on routes.

• The destination of a Route Request reverses the the route in the received request. Thereby, the return-path is found.

”A,B,C””A,B””A”

Id=2 Id=2 Id=2DA B C

X

X

X

X

X X

X

Page 31: Ad hoc communication #2/3

Communication Research Labs Sweden AB

DSR Route Maintenance

• Every node is responsible for confirming that the next hop in the DSR Header receives the packet.

• Packets are retransmitted up to a maximum number of times. If the retransmission fails, a Route Error message is sent to the initiator of the packet.

Page 32: Ad hoc communication #2/3

Communication Research Labs Sweden AB

DSR Characteristics

Advantages:• Forwarding nodes do not need to know the path (memory efficient).• Does not transmit any routing data (overhead) when there is no data

traffic.• Simple, yet very effective!• Natively supports uni-directional links, however, the MAC protocols

in IEEE 802.11 does not.

Disadvantages:• Source routing information (the DSR Header) increases per hop.

(e.g. IP packet size increases per hop)• Initial latency while requesting new routes. (Reactive routing)

Page 33: Ad hoc communication #2/3

Communication Research Labs Sweden AB

Zone Routing Protocol(ZRP)

• Hybrid routing protocol.

• Consists of 3 routing algorithms1. Intrazone Routing Protocol (IARP) (Proactive)

2. Interzone Routing Protocol (IERP) (Reactive)

3. Bordercast Resolution Protocol (BRP) (Reactive)

Page 34: Ad hoc communication #2/3

Communication Research Labs Sweden AB

ZRP Characteristics

Advantages:• No initial delay within a cluster.• Takes advantage of pro-active route discovery within a nodes local

neighborhood.

Disadvantages:• Small initial delay in cluster-cluster communication.• Complex (implementation)!

Page 35: Ad hoc communication #2/3

Communication Research Labs Sweden AB

• UDP based routing packets. (Most common)

• TCP based routing packets.

• Self-defined IP Header. (e.g. DSR)

• Usage of the ARP - Address Resolution Protocol. (Next lecture)

• IPv6 Routing Header. (Next Lecture)

Different routing approaches

Page 36: Ad hoc communication #2/3

Communication Research Labs Sweden AB

• Promiscuous mode• Setting the network interface into promiscuous mode.• Listen to all data packets within reach.• A node can catch and examine all routing specific packets, even if the target

address of the packets is neither broadcast nor its own IP.• Network can save a lot of overhead packets by using such information:

• Passive acknowledgement of a transmitted packet by overhearing the next node forward the same packet.

• route shortening. When a node is overhearing a packet with a source route where this node is used later in the route, but not the next hop, it can send back a gratuitous route reply to the original sender of the packet, telling it there is a shorter route to the destination.

• Gratuitous Route errorsA node that is receiving a route error can, in addition to update its route cache, also resend the route error to its neighbors with the next route request. By caching recent route errors, the node can also assure that an incoming route reply does not deliver an old previously broken link.

Additional advanced features

Page 37: Ad hoc communication #2/3

Communication Research Labs Sweden AB

• Standardization• IETF MANET WG: http://www.ietf.org/html.charters/manet-charter.html• Mobile Ad hoc Networking (MANET): Routing Protocol Performance Issues

and Evaluation Considerations (RFC 2501)

• How 802.x Wireless Works: http://www.microsoft.com/technet/prodtechnol/windowsserver2003/library/TechRef/370b019f-711f-4d5a-8b1e-4289db0bcafd.mspx

Ad hoc communicationReferences