Ad hoc communication #3/3

41
Communication Research Labs Sweden AB

description

Ad hoc communication #3/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

Transcript of Ad hoc communication #3/3

Page 1: Ad hoc communication #3/3

Communication Research Labs Sweden AB

Page 2: Ad hoc communication #3/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)•MAC layer•ARP•Quality of Service (QoS): SNR, Bandwidth constraints, Neighbor solicitation errors•IPv6•Security considerations

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

Page 3: Ad hoc communication #3/3

Communication Research Labs Sweden AB

OSI layer 1 802.11 PHY Sublayer

Examples:Ethernet/802.3   Token Ring (802.5) SNAP/802.2 X.25 FDDI ISDN Frame Relay   SMDS   ATM   Wireless (WAP, CDPD, 802.11) Fibre Channel   DDS/DS0/T-carrier/E-carrier   SONET/SDH   DWDMPPP   HDLC   SLIP/CSLIP   xDSL   Cable Modem (DOCSIS)

802.11 phy Defines a series of encoding and transmission schemes

FHHS (802.11 2Mbps)

DSSS (802.11b 11Mbps)

OFDM (802.11a 54Mbps)

Defines the physical and electrical characteristics of the network. The NIC cards in your PC and the interfaces on your routers all run at this level since, eventually, they have to pass strings of ones and zeros down the wire!

IEEE 802.11a

¾64-QAM54

½64-QAM48

¾16-QAM36

½16-QAM24

¾4-QAM18

½4-QAM12

¾BPSK9

½BPSK6

Coding rateModulationData rate

Examples of modulation and data rates

Page 4: Ad hoc communication #3/3

Communication Research Labs Sweden AB

OSI layer 2 MAC

The 802.11 MAC frame, as shown in the following figure, consists of a MAC header, the frame body, and a frame check sequence (FCS). The numbers in the following figure represent the number of bytes for each field.

802.11 MAC Frame Format

Frame Control Field

802.11 MAC Frame

MAC Header

Duration/ID

Address1

FrameControl

Address2

SequenceControl

Address3

Address4

FrameBody

FCS2 2 6 26 6 6

0-2312 4

Type SubtypeProtocolVersion

ToDS

MoreFragments

FromDS

2 bits 2 4 11 1 1 11Retry Power

Mgt.Moredata

WEP Order1 1

Page 5: Ad hoc communication #3/3

Communication Research Labs Sweden AB

802.11 MAC Layer Overhead

Data rate (Mbps) Approximate Throuput (Mbps)

802.11b 11 6

802.11g (802.11b in cell) 54 8

802.11g (no 802.11b in cell) 54 22

802.11a 54 25

Source: Cisco Systems, Inc.

Network Capacity Approximations for 802.11b, 802.11g and 802.11a

Page 6: Ad hoc communication #3/3

Communication Research Labs Sweden AB

Data link

Physical

Application

Transport

Network

MAC

Physical

Application

TCP / UDP

IP

ARP

OSI reference model

Page 7: Ad hoc communication #3/3

Communication Research Labs Sweden AB

Address Resolution Protocol (ARP)

• ARP translates Ethernet addresses (MAC) to Internet Protocol addresses (IP)

• Data communication (IPv4) is initiated by ARP messages.

• ARP messages are sent automatically.

• Has been deprecated in IPv6 and replaced by the Neighbor Discovery Protocol (NDP) which is a pure layer 4 protocol.

Page 8: Ad hoc communication #3/3

Communication Research Labs Sweden AB

ARP Illustrated by Ping Example

Node: 1IP Address: 192.168.0.1MAC Address: 00-0D-56-3C-DE-C0

Node: 2IP Address: 192.168.0.2MAC Address: 00-0D-56-3C-DB-9D

Who has 192.168.0.2? Tell 00-0D-56-3C-DE-C0 192.168.0.2 is at 00-0D-56-3C-DB-9D

ICMP Request to 192.168.0.2

192.168.0.1 is at 00-0D-56-3C-DE-C0

Who has 192.168.0.1? Tell 00-0D-56-3C-DE-C0

ICMP Reply to 192.168.0.1

ICMP Request to 192.168.0.2

ICMP Request to 192.168.0.2

ICMP Request to 192.168.0.2

ICMP Reply to 192.168.0.1

ICMP Reply to 192.168.0.1

ICMP Reply to 192.168.0.1

Page 9: Ad hoc communication #3/3

Communication Research Labs Sweden AB

Standard Internet ARP Message

Hardware Type

Protocol Type

Hardware Address Len Protocol Address Len

Operation Code

Sender Hardware Address

Sender IP Address

Recipient Hardware Address

Recipient IP Address

The operation code defines what type of message that is transmitted / received.

Hardware Type

Protocol Type

Hardware Address Len Protocol Address Len

Operation Code

Sender Hardware Address

Sender IP Address

Recipient Hardware Address

Recipient IP Address

Page 10: Ad hoc communication #3/3

Communication Research Labs Sweden AB

Concept of Multi-hop Enabled ARP (MEARP)

• Reuses existing data traffic

• Introduced resending of ARP requests

• Introduced forwarding of ARP replies

• Mechanisms to treat the new ARP messages• Flood avoidance• Pending request list

• Cross-layer issues• Link quality observations• Traffic observations

• Multi-hop gateway support

Page 11: Ad hoc communication #3/3

Communication Research Labs Sweden AB

ARP Enabled Ad Hoc Routing

Node: 1IP Address: 192.168.0.1MAC Address: 00-0D-56-3C-DE-C0

Node: 2IP Address: 192.168.0.2MAC Address: 00-0D-56-3C-DB-9D

Node: 3IP Address: 192.168.0.3MAC Address: 00-0D-56-3C-E2-4C

Who has 192.168.0.3? Tell 00-0D-56-3C-DE-C0

Who has 192.168.0.3? Tell 00-0D-56-3C-DB-9D

192.168.0.3 is at 00-0D-56-3C-E2-4C

Use 192.168.0.2 to reach 192.168.0.3

ICMP Request 192.168.0.3 ICMP Request 192.168.0.3 Who has 192.168.0.1? Tell 00-0D-56-3C-E2-4C

ICMP Reply 192.168.0.1

Who has 192.168.0.1? Tell 00-0D-56-3C-DB-9D

Use 192.168.0.2 to reach 192.168.0.1

192.168.0.1 is at 00-0D-56-3C-DE-C0

ICMP Reply 192.168.0.1

Page 12: Ad hoc communication #3/3

Communication Research Labs Sweden AB

• Information integrity – Unauthorized should not be able to read our data.

Security considerations in ad hoc networks

• Transmission security – Unauthorized should not be able to eavesdrop on out transmitted information.

• Denial of Service (DoS) – No one should be able to report unusable routes, drown the network with bogus data in order to cause congestions etc.

Issues:

Page 13: Ad hoc communication #3/3

Communication Research Labs Sweden AB

Security considerations in ad hoc networks

An unauthorized person eavesdrops on our transmitted data packets.

Information is relayed by someone you do not trust. How do you protect your information?

Solution:OSI layer 6 cryptography, e.g. the Secure Socket Layer (SSL).

Solution:OSI layer 2 cryptography, e.g. WEP or WPA for IEEE 802.11x. Frequency hopping etc.

Issues: Distribution of new authentication keys.

Solution:OSI layer 3 cryptography, e.g. IP Security (IPSec, AH, ESP).

Page 14: Ad hoc communication #3/3

Communication Research Labs Sweden AB

Security considerations in ad hoc networks

Solution:

A node must be authenticated before it can be trusted in the ad hoc network. Nodes that are not authenticated should not be trusted and their information should not be forwarded.

Issues: Distribution of new authentication keys.

An unauthorized person is injecting invalid routes, to much data traffic etc. into the ad hoc network.

Page 15: Ad hoc communication #3/3

Communication Research Labs Sweden AB

Security summary

• Secure communication and information integrity can be performed at different OSI layers.

• Ad hoc routing algorithms have to be able to authenticate other nodes.

• Difficulties to distribute authentication keys to all ad hoc nodes, since all nodes may not be in reach of radio transmission.

Page 16: Ad hoc communication #3/3

Communication Research Labs Sweden AB

Definition:• A device that connects multiple networks together and forwards packets (of

data) between them.

• Uses multiple network interfaces.

• Routing is preformed at the network layer (layer 3), i.e. a router does not care about higher layers.

• A router has a routing table, specifying which IP address (or group of addresses) should belonging to which interface.

• The Internet is hierarchy designed, which allows routers to group similar addresses to the same interface.

How an ordinary router works – 1 of 2

Page 17: Ad hoc communication #3/3

Communication Research Labs Sweden AB

1. An inbound packet is received on one interface.

2. The MAC Header is removed. (It is only valid for one link)

3. The destination of the IP packet is examined to find out on which interface the packet should be transmitted. If no route is found, the packet is dropped and an Internet Control Message (ICMP) is sent to the source of the IP packet.

4. The Data Link Layer adds a MAC Header on the packet.

5. The Physical Layer transmits the packet.

100BASE-TX

Ethernet

IP

100BASE-TX

Ethernet

IP

TCP

HTTP

100BASE-TX

Ethernet

IP

TCP

HTTP

SOURCE ROUTER(S) DESTINATION

How an ordinary router works – 2 of 2

Page 18: Ad hoc communication #3/3

Communication Research Labs Sweden AB

• The Physical Layer receives all wireless communication. All filtering, i.e. packets that are not destined for the local device, is performed at the Data Link Layer.

• Power is consumed when receiving and computing data.• Most ad hoc routing algorithms performs routing at the Network

Layer.• Routes are set by saying:

To reach C, send to B.

Wireless routing

A B C

Page 19: Ad hoc communication #3/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 20: Ad hoc communication #3/3

Communication Research Labs Sweden AB

Dynamic Source Routing (DSR)

DSR Header

TCPHEADER

TCP PAYLOADDSRHEADER

IPHEADER

Next Header

F Reserved Payload Length

(Option1)

(…)

(Option N)

Page 21: Ad hoc communication #3/3

Communication Research Labs Sweden AB

Dynamic Source Routing (DSR)

DSR Header options

Next Header

F Reserved Payload Length

(Option1)

(…)

Options:

• Variable-length field;

• The length of the Options field is specified by the Payload Length field in this DSR Options header.

• Contains one or more pieces of optional information (DSR options).

Page 22: Ad hoc communication #3/3

Communication Research Labs Sweden AB

Dynamic Source Routing (DSR)

DSR Header options

Next Header

F Reserved Payload Length

(Option1)

(…)

• Route Request option• Route Reply option• Route Error option• Acknowledgement Request option• Acknowledgement option• DSR Source Route option• Pad1 option• PadN option

• Route Request option• Route Reply option• Route Error option• Acknowledgement Request option• Acknowledgement option• DSR Source Route option• Pad1 option• PadN option

Page 23: Ad hoc communication #3/3

Communication Research Labs Sweden AB

Dynamic Source Routing (DSR)

DSR options example

ROUTE REQUESTOption Type Opt Data length Identification

Target AddressAddress[1]Address[2]

…Address[N]

• Opt Data Len 8-bit unsigned integer. Length of the option, in octets, excluding the Option Type and Opt Data Len fields.

• Identification A unique value generated by the initiator (original sender) of the Route Request.

• Target Address The address of the node that is the target of the Route Request.

Page 24: Ad hoc communication #3/3

Communication Research Labs Sweden AB

Dynamic Source Routing (DSR)

DSR options example

ROUTE REPLY

Option Type Opt Data length ReservedTarget Address

Address[1]Address[2]

…Address[N]

L

L: Set to indicate that the last hop given by the Route Reply (the link from Address[n-1] to Address[n]) is actually an arbitrary path in a network external to the DSR network. Addresses: The source route being returned by the Route Reply.

Page 25: Ad hoc communication #3/3

Communication Research Labs Sweden AB

DSR Considerations

• DSR packets can not be traversed on the Internet.• If the DSR network is interconnected with another network, e.g. the

Internet, all DSR information, i.e. the DSR Header, has to be removed in the packet!

Page 26: Ad hoc communication #3/3

Communication Research Labs Sweden AB

• Ideal QoS = unlimited throughput + no delay + no drops

• But…1. Links have limited bandwidth.

2. Applications/nodes compete for bandwidth.

3. Some applications try to take all available bandwidth.

4. Transmissions takes time and packets get queued.

• Different applications have different QoS requirements.

Why have QoS techniques? – 1 of 2

Page 27: Ad hoc communication #3/3

Communication Research Labs Sweden AB

R1

R2 R3

R4

2.0

2.0

1.5

1.5

0.064

0.064

1.0

2.0

1.0

news server 1

file server 1

news server 2

voipA

voipB

unit: Mbps

Why have QoS techniques? – 2 of 2

Page 28: Ad hoc communication #3/3

Communication Research Labs Sweden AB

Issues in QoS-aware MANETs

Quality of Service metrics• Delay, bandwidth, probability of packet loss, and delay variance (jitter).• Power consumption and service coverage area.• QoS metrics could be defined in terms of one of the parameters or set of

parameters in varied proportions.

Page 29: Ad hoc communication #3/3

Communication Research Labs Sweden AB

QoS in MANETs: Issues and difficulties

• Unpredictable link properties.• Node mobility.• Limited battery life.• Hidden and exposed terminal problems.• Route maintenance.• Security.

Page 30: Ad hoc communication #3/3

Communication Research Labs Sweden AB

Hidden and exposed terminal problems

BA C A CB D

Range of terminal A

Range of terminal C

Range of terminal B

Range of terminal C

will collide with transmission from A at B

Hidden Terminal Problem Exposed Terminal Problem

cannot send to D due to carrier sense

currently transmittingwants to transmit

Page 31: Ad hoc communication #3/3

Communication Research Labs Sweden AB

QoS Support in the Physical Layer

• Channel estimation• Signal-to-noise ratio in channels fluctuates adaptive modulation• Accurate channel estimation at the receiver and then reliable feedback of the

estimation to the transmitter.

• Joint source-channel coding• Takes both source characteristics and channel conditions into account

Page 32: Ad hoc communication #3/3

Communication Research Labs Sweden AB

QoS Provisioning at the MAC Layer

• Fully distributed scheme is needed that should first solve the hidden and exposed terminal problems.

• Multihop access collision avoidance (MACA)• Request-to-send/clear-to-send (RTS/CTS) dialogs• Does not completely eliminate the hidden terminal problem

• MACA for Wireless (MACAW)• Extension to MACA to provide faster recovery from hidden terminal collisions

• IEEE 802.11• Collision avoidance feature of MACA and MACAW by its distributed control

function (DCF)• Carrier sense multiple access with collision avoidance (CSMA/CA)

Page 33: Ad hoc communication #3/3

Communication Research Labs Sweden AB

QoS-aware routing at the Network Layer

• Types of MANET routing protocols:• Proactive, table-driven routing schemes.• Reactive, on-demand routing schemes.

• These algorithms are based on the discovery of shortest paths.

• QoS-aware routing protocol should find a path that satisfies the QoS requirements in the path from source to the destination.

Page 34: Ad hoc communication #3/3

Communication Research Labs Sweden AB

Transport Layer issues for QoS

TCP performs poorly in terms of end-to-end throughput in MANETs• The assumption used in Internet that packet losses are due to congestion is not

valid in MANET environments

TCP performance improvement in wireless networks• Local retransmissions• Split-TCP connections (Use of multi-path)

Explicit feedback mechanisms to distinguish between losses due to errors and congestion is necessary for QoS provisioning in MANETs.

Page 35: Ad hoc communication #3/3

Communication Research Labs Sweden AB

QoS Summary

• Quality of Service is the idea that transmission rates, error rates, and other characteristics can be measured, improved, and, to some extent, guaranteed in advance.

• Cross-layer, OSI layers that is, issues needs to be examined. (Interaction between layers that is)

Page 36: Ad hoc communication #3/3

Communication Research Labs Sweden AB

Motivation for developing IPv6:

• Header fields simplification, including removal of fields.

• Revision of fields.

• New fields were added.

• Fixed header size. (Improves routing efficiency)

• Increased amount of addresses.

• Scalability. (Introduction of extension headers)

IPv6 overview

IPv6

Note! IPv6 only affect layer 3 and 7 in the OSI model.

IPv6

Page 37: Ad hoc communication #3/3

Communication Research Labs Sweden AB

Header ChecksumHeader Checksum

Version Type of ServiceIHL

Identification

Total Length

Flags Fragment offset

Time To Live Protocol Header Checksum

Source Address

Destination Address(Option 1)

(Option 10)

IP header overview

IP header

Version Type of ServiceIHL

Identification

Total Length

Flags Fragment offset

Time To Live Protocol

Version Type of ServiceIHL

Identification

Total Length

Flags Fragment offset

Time To Live Protocol

Source Address

Destination Address

Transport Layer Data….

(Option line 1)

(Option line 10)

Payload length

Next HeaderHop Limit

Source Address

Destination Address

From IPv4 toIPv6

Page 38: Ad hoc communication #3/3

Communication Research Labs Sweden AB

IP header overview

Base Header

VersionVersion

Payload length Next Header Hop Limit

Source Address

Destination Address

Traffic Class Flow Label

IPv6

( Extension Headers)

( Extension Header)( Extension Header)

Hop-by-hopoptions

DestinationoptionsRoutingheader

ESP

TCP header

Applicationpayload

…….

Extension headers

Page 39: Ad hoc communication #3/3

Communication Research Labs Sweden AB

• IPv6 currently uses two different types of addresses:1. Link Local addresses (Used for point-to-point communication – not

routable!)

2. Global addresses (Used on the Internet – Routable!)

IPv6 effect on ad hoc routings

Issue:A neighbor (point-to-point) could move, i.e. the node is no longer our neighbor. If the Link Local address is used, it should not be routed!

Solution: Only use Global addresses!

Page 40: Ad hoc communication #3/3

Communication Research Labs Sweden AB

IPv6 Routing Header• Similar to the DSR Header.• Allows the source of an IP packet to choose the packets path.• Ad hoc routing algorithms could take an advantage of this additional

header.

IPv6 effect on ad hoc routings

Issue: IPv6 addresses are large (128 bits), which reduces the amount of available space for IP payload.

Solution: IPv6 header compression!

Page 41: Ad hoc communication #3/3

Communication Research Labs Sweden AB

• Internet Protocol version 6:http://www.ipv6.org

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

Ad hoc communicationReferences