CCM 4300 Lecture 6 Computer Networks: Wireless and Mobile Communication Systems Dr E. Ever

70
CCM 4300 Lecture 6 Computer Networks: Wireless and Mobile Communication Systems Dr E. Ever School of Computing Science

description

CCM 4300 Lecture 6 Computer Networks: Wireless and Mobile Communication Systems Dr E. Ever School of Computing Science. Lesson objectives. To acquire a basic understanding of performance issues of TCP with wireless communication systems - to investigate enhancement schemes. - PowerPoint PPT Presentation

Transcript of CCM 4300 Lecture 6 Computer Networks: Wireless and Mobile Communication Systems Dr E. Ever

Page 1: CCM 4300 Lecture 6 Computer Networks: Wireless and Mobile Communication Systems Dr E. Ever

CCM 4300 Lecture 6

Computer Networks: Wireless and Mobile Communication

Systems

Dr E. EverSchool of Computing Science

Page 2: CCM 4300 Lecture 6 Computer Networks: Wireless and Mobile Communication Systems Dr E. Ever

Lesson objectives• To acquire a basic understanding of performance issues of

TCP with wireless communication systems

- to investigate enhancement schemes.

- explore the architecture of such technologies

- identify some of the advantages and disadvantages of using these

technologies.

•Understand TCP performance issues for Mobile Ad Hoc Networks

- to investigate routing protocols in ad-hoc networks

Page 3: CCM 4300 Lecture 6 Computer Networks: Wireless and Mobile Communication Systems Dr E. Ever

TCP performance over wireless and mobile networks

Motivation TCP-mechanisms

Slow start Congestion Control

Classical approaches

Indirect TCP Snooping TCP Mobile TCP SACK

Additional optimizations

Fast handoffs Selective retransmission Hop-by-hop rate control

Page 4: CCM 4300 Lecture 6 Computer Networks: Wireless and Mobile Communication Systems Dr E. Ever

Typical mobile wireless scenario

FH: Fixed Host MH: Mobile Host BS: Base Station (gateway)

Page 5: CCM 4300 Lecture 6 Computer Networks: Wireless and Mobile Communication Systems Dr E. Ever

Recovering from Error

Packet

ACK

Tim

eou

t

Packet

ACK

Tim

eou

t

Packet

Tim

eou

t

Packet

ACKT

ime

out

Time

Packet

ACK

Tim

eou

t

Packet

ACK

Tim

eou

t

ACK lost Packet lost Early timeoutDUPLICATEPACKETS!!!

Page 6: CCM 4300 Lecture 6 Computer Networks: Wireless and Mobile Communication Systems Dr E. Ever

Sliding Windows•The window size advertised by the receiver

•Tells the sender how much data, can be sent without waiting for further acknowledgements.

6

Page 7: CCM 4300 Lecture 6 Computer Networks: Wireless and Mobile Communication Systems Dr E. Ever

Go-Back-N in ActionDon’t wait for an acknowledgement of each packet

Page 8: CCM 4300 Lecture 6 Computer Networks: Wireless and Mobile Communication Systems Dr E. Ever

Selective Repeat

Page 9: CCM 4300 Lecture 6 Computer Networks: Wireless and Mobile Communication Systems Dr E. Ever

Slow Start and Congestion Control•When a TCP connection first begins, the Slow Start algorithm initializes a congestion window to one segment.

•Congestion window doubles up to the maximum window size advertised by the receiver.

•The sender can transmit the minimum of the congestion window and the advertised window of the receiver.

•In the Congestion Avoidance algorithm a retransmission timer expiring or the reception of duplicate ACKs (transmission window to one half of the current window size).

•If congestion was indicated by a timeout (or three or more duplicate ACKs are received), the congestion window is reset to one segment

9

Page 10: CCM 4300 Lecture 6 Computer Networks: Wireless and Mobile Communication Systems Dr E. Ever

Typical TCP behaviour

0

5

10

15

20

25

Time (round trips)

Con

gest

ion

win

dow

(se

gmen

ts)

ssthresh = 8

cwnd = 20

After timeout

What is the case in your lab experiment?(Time vs Sequence number)

Page 11: CCM 4300 Lecture 6 Computer Networks: Wireless and Mobile Communication Systems Dr E. Ever

Motivation I Transport protocols typically designed for

Fixed end-systemsFixed, wired networks

Research activitiesPerformanceCongestion controlEfficient retransmissions

TCP congestion controlpacket loss in fixed networks typically due to

(temporary) overload situations router have to discard packets as soon as the

buffers are full TCP recognizes congestion only indirectly via

missing acknowledgements, retransmissions unwise, they would only contribute to the congestion and make it even worse

slow-start algorithm as reaction11

Page 12: CCM 4300 Lecture 6 Computer Networks: Wireless and Mobile Communication Systems Dr E. Ever

TCP Problems in wireless links

In Wire network: Packet Loss CongestionIn Mobile Networks: Packet Loss disconnections, handoffs, high bit error rates

TCP was designed to work well in networks with low channel error rates, however Wireless links can exhibit high & variable error rates due to attenuation, fading, or interfering active radiation sources.

TCP has no means of detecting the nature of the error, so losses due to channel errors also get treated as congestion losses

Page 13: CCM 4300 Lecture 6 Computer Networks: Wireless and Mobile Communication Systems Dr E. Ever

TCP Performance Issues (Slow start)

Slow-start is used in conjunction with other algorithms to avoid sending more data than the network is capable of transmitting

Inappropriate reduction of congestion windowTCP backs off upon detection of packet loss Slow-start assumes that unacknowledged segments are due

to network congestion. While this is an acceptable assumption for many networks, segments may be lost for other reasons, such as poor data link layer transmission quality. Thus, slow-start can perform poorly in situations with poor reception, such as wireless networks.

Severe degradation in TCP throughput

Page 14: CCM 4300 Lecture 6 Computer Networks: Wireless and Mobile Communication Systems Dr E. Ever

halved

Packet loss

TCP Congestion Control

CWND

t

Congestion window size (CWND) limits the rate at which sender can send data traffic, in order to avoid congestion situation in network.

congestion window is smaller when congestion is larger and vice versa

Slow Start

Congestion Avoidance

Ehsan Hamadani (2004)

Congestion Avoidance

Three or more duplicatesOr

Time outCongestion Avoidance

Congestion Avoidance

Page 15: CCM 4300 Lecture 6 Computer Networks: Wireless and Mobile Communication Systems Dr E. Ever

TCP Performance Issues (Cont.)

Throughput loss WLAN

Frame Error Rate (FER) Cellular Communications systems

Increased processing delay due to interleaving

Widely varying RTT (round trip time)Disruptions caused by link resets suffer from severe error rates, due to

external interference

Page 16: CCM 4300 Lecture 6 Computer Networks: Wireless and Mobile Communication Systems Dr E. Ever

Interleaving (Bursty errors)

Error-free code words: aaaabbbbccccddddeeeeffffgggg

Interleaved: abcdefgabcdefgabcdefgabcdefg

Transmission with a burst error: abcdefgabcd____bcdefgabcdefg

Received code words after deinterleaving: aa_abbbbccccdddde_eef_ffg_gg

Page 17: CCM 4300 Lecture 6 Computer Networks: Wireless and Mobile Communication Systems Dr E. Ever

Link Layer mechanisms

Forward Error Correction (FEC) Can be use to correct small number of errors Incurs overhead even when errors do not occur GSM uses block coding (40 bits redundancy),

Convolutional coding (various rates 1/2, 1/3 and 1/6 as well as 244/456)

Link Level Retransmissions Retransmit a packet at the link layer, if errors are

detected Retransmission overhead incurred only if errors

occur

Page 18: CCM 4300 Lecture 6 Computer Networks: Wireless and Mobile Communication Systems Dr E. Ever

TCP Enhancement Schemes Indirect TCP or I-TCP (Split TCP)

Segments the connection

No changes to the TCP protocol for hosts connected to the wired Internet, millions of computers use (variants of) this protocol

Optimized TCP protocol for mobile hosts

Splitting of the TCP connection at, e.g., the foreign agent into 2 TCP connections, no real end-to-end connection any longer

Hosts in the fixed part of the net do not notice the characteristics of the wireless part

Page 19: CCM 4300 Lecture 6 Computer Networks: Wireless and Mobile Communication Systems Dr E. Ever

mobile hostaccess point (foreign agent) wired Internet

wireless TCP standard TCP

mobile host

access point2

Internet

access point1

socket migrationand state transfer

MSR – Mobility Source Router/ Base Station

19

Page 20: CCM 4300 Lecture 6 Computer Networks: Wireless and Mobile Communication Systems Dr E. Ever

Indirect TCP operates in Transport layer

20

Ajay V. Bakre, B.R. Badrinath, “Implementation and Performance Evaluation of Indirect TCP” , IEEE Transactions on Computers

Page 21: CCM 4300 Lecture 6 Computer Networks: Wireless and Mobile Communication Systems Dr E. Ever

Split Connection

Wireless related problems are isolated from the existing network protocols.

Splitting the TCP connection into 2 independent flow control between the mobile host and the fixed host into two separate connections:

1) Wired connection between the fixed host and the base station

2) Wireless connection between the base station and the mobile host.

Mobile Host

BSFixed Host

Connectio

n1

Connection2

Page 22: CCM 4300 Lecture 6 Computer Networks: Wireless and Mobile Communication Systems Dr E. Ever

Split Connection

Ajay V. Bakre, B.R. Badrinath, “Implementation and Performance Evaluation of Indirect TCP” , IEEE Transactions on Computers

Page 23: CCM 4300 Lecture 6 Computer Networks: Wireless and Mobile Communication Systems Dr E. Ever

TCP Enhancement Schemes (Snooping)

Snooping TCP at BS Better than split TCP Confine retransmission to wireless paths only Foreign agent sits between fixed network and mobile network No need to modify fixed network

FH MHBSwireless

physical

link

network

transport

application

physical

link

network

transport

application

physical

link

network

transport

application

TCP connection

Page 24: CCM 4300 Lecture 6 Computer Networks: Wireless and Mobile Communication Systems Dr E. Ever

”Transparent“ extension of TCP within the foreign agent buffering of packets sent to the mobile host lost packets on the wireless link (both directions!) will be

retransmitted immediately by the mobile host or foreign agent, respectively (so called “local” retransmission)

the foreign agent therefore “snoops” the packet flow and recognises acknowledgements in both directions, it also filters ACKs

It uses NACK to prompt retransmission changes of TCP only within the foreign agent

Snooping TCP (cont)

“ wired ” Internet

buffering of data

end-to-end TCP connection

local retransmission correspondenthostforeign

agent

mobilehost

snooping of ACKs

24

Page 25: CCM 4300 Lecture 6 Computer Networks: Wireless and Mobile Communication Systems Dr E. Ever

Snoop Protocol(2)

In the snoop protocol the base station monitors communication across the connection in either direction and caches packets.

A packet loss is detected by the arrival of a small number of

duplicate acknowledgements from the receiver or by local timeout at the base station.

Basic operation at BS: Data from MH -> FH

Detect missing packetsPerform negative acknowledgements

Data from FH -> MH Cache unacknowledged TCP data Perform local retransmissions

MH FHBS

Page 26: CCM 4300 Lecture 6 Computer Networks: Wireless and Mobile Communication Systems Dr E. Ever

Performance – Effect of Bit Errors

26

Hari Balakrishnan, Venkata N. Padmanabhan, Srinivasan Seshan and Randy H.Katz, “A Comparison of Mechanisms for Improving TCP Performance over Wireless Links”,

Page 27: CCM 4300 Lecture 6 Computer Networks: Wireless and Mobile Communication Systems Dr E. Ever

M-TCP

FH MHBS

Ack 1000Ack 999

Special handling of lengthy and/or frequent disconnections M-TCP splits as I-TCP does

unmodified TCP fixed network to supervisory host (SH) optimized TCP SH to MH

Supervisory host no caching, no retransmission monitors all packets, if disconnection detected BS does not send an ack to FH, unless BS has received an ack from MH

(maintains end-to-end semantics) BS withholds ack for the last byte ack’d by MH. When BS does not receive

ACK for sometime, it chokes sender by setting advertise window to 0

Page 28: CCM 4300 Lecture 6 Computer Networks: Wireless and Mobile Communication Systems Dr E. Ever

M-TCP (2)

When a new ack is received with receiver’s advertised window = 0, the sender enters persist mode

Sender does not send any data in persist modeexcept when persist timer goes off

When a positive window advertisement is received, sender exits persist mode

On exiting persist mode, cwnd are same as before the persist mode.

Page 29: CCM 4300 Lecture 6 Computer Networks: Wireless and Mobile Communication Systems Dr E. Ever

Some other well known TCP Enhancement Schemes

Notifying the causes of packet lossExplicit Loss Notification (ELN)Works well together with Snoop TCP

Adding selective ACK to TCPSACKCombat multiple losses in one RTT Data receiver can inform the sender about

all segments that have arrived successfully, so the sender need retransmit only the segments that have actually been lost.

SACKCombat multiple losses in one RTT

Page 30: CCM 4300 Lecture 6 Computer Networks: Wireless and Mobile Communication Systems Dr E. Ever

Comparison Things need to consider when assessing TCP enhancement schemes

End-to-end semantics (e.g. In I-TCP because the connection is split, separate acknowledgements are generated )

IP payload access Wireless gateway overhead Ease of deployment

Page 31: CCM 4300 Lecture 6 Computer Networks: Wireless and Mobile Communication Systems Dr E. Ever

Additional Approaches to Improve TCP Performance

Fast hand-offs The last packets before the handoff are

available with new BS as well.HA uses multicast address to forward

packetsPackets are automatically forwarded to

BSThe new BS joins the multicast group

before hand-off occursThe new BS buffers last few packetsThe new BS starts forwarding the

buffered packets to the mobile host after hand-off

31

Page 32: CCM 4300 Lecture 6 Computer Networks: Wireless and Mobile Communication Systems Dr E. Ever

TCP/IP over Heterogeneous Wireless Sys.

Challenges Multiple systems co-exist Direct interoperability between different

wireless systems Hierarchical cellular systems

Research projects Multi-Service Link Layer (MSLL) Wireless Internet Network (WINE) Wireless Adaptation Layer (WAL)

Page 33: CCM 4300 Lecture 6 Computer Networks: Wireless and Mobile Communication Systems Dr E. Ever

Characteristics of Mobile Networks

Cellular networksBase station (BS) arbitrates channel

allocationMobile hosts communicate with each

other via BSs Ad hoc networks

No BSAll mobile hosts act as routers

33

Page 34: CCM 4300 Lecture 6 Computer Networks: Wireless and Mobile Communication Systems Dr E. Ever

34

Mobile Ad hoc networksStandard Mobile IP needs an infrastructure

Home Agent/Foreign Agent in the fixed network

DNS, routing etc. are not designed for mobility

Sometimes there is no infrastructure!

remote areas, ad-hoc meetings, disaster areas

cost can also be an argument against an infrastructure!

routing

no default router available

every node should be able to forward

Page 35: CCM 4300 Lecture 6 Computer Networks: Wireless and Mobile Communication Systems Dr E. Ever

Cellular vs Ad-hoc Networks

35

Page 36: CCM 4300 Lecture 6 Computer Networks: Wireless and Mobile Communication Systems Dr E. Ever

Impacts of Mobility on TCP Performance Blackouts

LocationFadingDegrade TCP throughput

Handoff latencyPacket re-routingBursty lossesDegrade TCP throughput

Triangular routing and large RTTTriangular causes extra delay TCP throughput inversely proportional to RTTLarge RTT results in lesser throughput

•IP packets to a mobile node that is outside its home network are routed through the home agent.

•Packets from the mobile node to the correspondent nodes are routed directly (triangle routing)

36

Page 37: CCM 4300 Lecture 6 Computer Networks: Wireless and Mobile Communication Systems Dr E. Ever

• TCP does not distinguish between congestion and packet loss due to transmission errors and route failures

• This inability results in performance degradation in ad hoc networks

•Route re-computation takes a finite amount of time

• During this time no packet can reach the destinationthrough the existing route

• Packets and ACKs may get queued and possibly dropped

• In turn leads to timeouts at the source, which ismisinterpreted as congestion

Implications of using Normal TCP over Ad-Hoc Wireless N/W

37

Page 38: CCM 4300 Lecture 6 Computer Networks: Wireless and Mobile Communication Systems Dr E. Ever

Different approaches to improve the performance of TCP over Ad-Hoc Networks

• in wireless networks we have:– I-TCP– Snoop TCP– M-TCP– SACK

• Ad hoc networks– TCP-F– ELFN– ATCP

Recall ….

38

Page 39: CCM 4300 Lecture 6 Computer Networks: Wireless and Mobile Communication Systems Dr E. Ever

TCP Performance Issues in Ad Hoc NW

Route failureTCP may lose a congestion window of

packetsLarge RTT variationDegrade TCP throughput

Route Re-computationIncur extra delayResult in a more inflated re-transmission

time-out

39

Page 40: CCM 4300 Lecture 6 Computer Networks: Wireless and Mobile Communication Systems Dr E. Ever

TCP Performance Issues in Ad Hoc Networks

Network Partition TCP may reset the connection if the

partition lasts for more than 100 sec.TCP enters slow-start phase after

cutting down its window size to 1Degrade TCP throughput

40

Page 41: CCM 4300 Lecture 6 Computer Networks: Wireless and Mobile Communication Systems Dr E. Ever

Impact of Multi-Hop Wireless Paths

0

200

400

600

800

1000

1200

1400

1600

1 2 3 4 5 6 7 8 9 10

Number of hops

TCP Throughtput(Kbps)

TCP Throughput using 2 Mbps 802.11 MAC

Nael B. Abu-Ghazaleh , ” tcp over wireless”

Page 42: CCM 4300 Lecture 6 Computer Networks: Wireless and Mobile Communication Systems Dr E. Ever

Approaches for Improvement

TCP-feedback and TCP-ELFNEmploy Explicit Link Failure Notification

(ELFN)A source node issues a route re-

computation request upon receipt of an ELFN

Reset TCP congestion window size to half its size (instead of 1)

42

Page 43: CCM 4300 Lecture 6 Computer Networks: Wireless and Mobile Communication Systems Dr E. Ever

Approaches for Improvement (Cont.)

Hop-by-hop rate controlEach router (mobile host) performs

rate control on each of its outgoing links based on feedback from downstream routers

Feedback time is minimalMore responsive to route failures

43

Page 44: CCM 4300 Lecture 6 Computer Networks: Wireless and Mobile Communication Systems Dr E. Ever

ATCP – TCP for Mobile Ad Hoc Networks

•Thin layer between TCP and IP

• Treats loss due to congestion and medium

differently (notifications, network feedback)

• Functions efficiently even with high bit error

rates

• Handles network partition gracefully

• Maintains end-to-end TCP semantics!

44

Page 45: CCM 4300 Lecture 6 Computer Networks: Wireless and Mobile Communication Systems Dr E. Ever

• ATCP– Normal– Congested– Loss– Disconnected

• TCP– Depending on it’s mode of operation ATCP

sets TCP in one of the following modes• Normal• Congested• Persist

Modes of operation

45

Page 46: CCM 4300 Lecture 6 Computer Networks: Wireless and Mobile Communication Systems Dr E. Ever

46

Ad Hoc NetworksKey question:

How do we provide connectivity between different mobile wireless technologies in a mobile Ad-hoc network (MANET)?

An Ad-Hoc network is defined as: Dynamically formed mobile nodes, no central manager, no fixed topology, and nodes can act as routers.

Page 47: CCM 4300 Lecture 6 Computer Networks: Wireless and Mobile Communication Systems Dr E. Ever

47

Connectivity – how to achieve it?• “Mostly “Wireless:

• Router to wired network• Mobile ad-hoc networks:

• MANET• Examples

– Example 1– cell 1 hosts use IEEE802.11 ….– cell 2 hosts use Bluetooth– host with one interface of each type acts as

router– Example 2

– some hosts in cell 1– some hosts in cell 2– cell-cell distance > Tx range– host in cell 1 and cell 2 acts as router between

cells

Page 48: CCM 4300 Lecture 6 Computer Networks: Wireless and Mobile Communication Systems Dr E. Ever

Routing in Ad hoc networks

Proactive: “Normal” routingCreate routing tables

periodically:oRoute ready when requiredoComputation overhead oRouting updates

Topology changes may be frequent

oDue to mobility

Reactive: Build routes on demandNeed to build routes

oRouting information evaluated only when neededolatency (due to path search)oDiscover route and destination

Topology changes may be frequent

oHow to re-evaluate on the flyoWhat if flow is in progress

48

Page 49: CCM 4300 Lecture 6 Computer Networks: Wireless and Mobile Communication Systems Dr E. Ever

49

Reactive routing

•Route Discovery:

•Find path to destination

• define protocols for requests and responses

•Report reachability / nonreachability

•Data forwarding (routing):

•Forwarding Mechanism

•Depending on the algorithm

• Information (state) needed in routers

• Information (state) needed in packets

Router End system

Page 50: CCM 4300 Lecture 6 Computer Networks: Wireless and Mobile Communication Systems Dr E. Ever

50

Reactive routing ….. Cont….

•Route Maintenance:

•Dealing with forwarding path outages (e.g. link breaks, next hop “disappears”)

• Recovery procedures for finding alternative routes

•Signalling/reporting mechanisms

•State information in network:

•Hold in network (routers),

•What if router losses connectivity?

•Possible to keep information in the packets

Page 51: CCM 4300 Lecture 6 Computer Networks: Wireless and Mobile Communication Systems Dr E. Ever

51

Reactive routing … cont….•State information in packets:

•Hold in packet header•Waste of wireless capacity

•Complexity of algorithm •Computational cost •Energy/power expenditure

•Timeliness of routing update:•Route maintenance •Periodic probes may waste resources (similar to proactive)•Use layer1 and 2 connectivity information to see if forwarding path still up

•Scalability(?)•Small network …. OK … but … what about large networks?

Page 52: CCM 4300 Lecture 6 Computer Networks: Wireless and Mobile Communication Systems Dr E. Ever

52

FixedNetwork

MobileDevices

MobileRouter

Manet

Mobile IP, DHCP

Router End system

Mobile Ad hoc networks

Page 53: CCM 4300 Lecture 6 Computer Networks: Wireless and Mobile Communication Systems Dr E. Ever

53

Routing examples for ad-hoc networks

N1

N4

N2

N5

N3

N1

N4

N2

N5

N3

good linkweak link

time = t1 time = t2

•Asymmetric links

•Redundant links

•Interference

•Dynamic topology

Page 54: CCM 4300 Lecture 6 Computer Networks: Wireless and Mobile Communication Systems Dr E. Ever

54

•Split routing into discovering a path and maintaining a path,

Discover a path

only if a path for sending packets to a certain destination is needed and no path is currently available

Maintaining a path

only while the path is in use one has to make sure that it can be used continuously

No periodic updates needed!

Dynamic Source Routing…. DSR

Page 55: CCM 4300 Lecture 6 Computer Networks: Wireless and Mobile Communication Systems Dr E. Ever

55

Discover a path (A-G)

A

B

C

E

D

G

H

F

A

A

A-B

A-C

A-C-E

A-C-E

A-C-E

A-B-D

A-B-D-GA-B-D-G

A-B-D-G

Page 56: CCM 4300 Lecture 6 Computer Networks: Wireless and Mobile Communication Systems Dr E. Ever

56

Maintain a path (A-G)

A

B

C

E

D

G

H

F

G

RERRRERR

Route Cache (A)G: A, B, D, G

G: A, C, E, H, GF: B, C, F

Page 57: CCM 4300 Lecture 6 Computer Networks: Wireless and Mobile Communication Systems Dr E. Ever

57

Dynamic Source Routing (DSR)•Route for packet:

•list of IP addresses (hops) in IP header (option header)

•Route discovery

•Source Broadcasts

•ROUTE_REQ with destination address and ID number, i.e., id = 45, Target = G (Slide 55)

•At intermediate node:

•check ID for duplicates (if same request, discard)

•if route unknown, add your address to packet header and flood

•if route to destination known, send ROUTE_REPLY back to source

Page 58: CCM 4300 Lecture 6 Computer Networks: Wireless and Mobile Communication Systems Dr E. Ever

58

DSR ….. Cont…..

•At destination:

•send ROUTE_REPLY, containing all address in ROUTE_REQ, back to source

•backward learn

•At source:

•check ID number for duplicates

•add route to route cache

Page 59: CCM 4300 Lecture 6 Computer Networks: Wireless and Mobile Communication Systems Dr E. Ever

destination

source1

65

4

3

2

8

7

(1,4)

(1,2)

(1,3)

(1,3,5,6)(1,3,5)

(1,4,7)

source broadcasts a packet containing address of source and destination

The route looks up its route caches to look for a route to destinationIf not find, appends its address into the packet

The destination sends a reply packet to source.

The node discards the packets having been seen

59

Page 60: CCM 4300 Lecture 6 Computer Networks: Wireless and Mobile Communication Systems Dr E. Ever

60

DSR … continues …

•Data forwarding:

•source puts route (list of IP addresses – hops – to destination) from route cache in IP header

•Intermediate hops forward to next IP address in list and forwards

•Route maintenance:

•upstream hop should monitor transmission from downstream hop to see if downstream is “alive”

Page 61: CCM 4300 Lecture 6 Computer Networks: Wireless and Mobile Communication Systems Dr E. Ever

61

DSR .. Continues …

•error message generated giving information about break in route

•source restarts route discovery for destination

•Simple

•Only useful for small networks:

•Only need to use it for small networks

•Inefficient (too complicated)

Page 62: CCM 4300 Lecture 6 Computer Networks: Wireless and Mobile Communication Systems Dr E. Ever

62

Ad hoc On demand distance vector routing: AODVDistance Vector routing:

•(hop count) on demand evaluation

•Route Discovery

•source broadcasts – •ROUTE_REQ:

•destination sequence number (DSN) used to detect old routs

•Intermediate node:

•sends ROUTE_REPLY if it knows route to destination and has a “newer” DSN for that route

Page 63: CCM 4300 Lecture 6 Computer Networks: Wireless and Mobile Communication Systems Dr E. Ever

63

AODV ….. Continues •Destination:

•sends ROUTE_REPLY

Data forwarding •Next hop forwarding:

•routing tables kept by all nodes

Route Maintenance •HELLO packets:

•broadcast periodically by all nodes – “heart beat”

•If link is dead, ROUTE-REPLY using poisoned reverse for all routes that use that link

Page 64: CCM 4300 Lecture 6 Computer Networks: Wireless and Mobile Communication Systems Dr E. Ever

64

AODV …. Continues

•Use of poisoned reverse: a route is no longer reachable and should be removed from their routing tables

•avoids count-to-infinity

•Use of DSN:

•avoids looping

•DSN associated with each routing table entry

•DSN incremented on new route discovery

Page 65: CCM 4300 Lecture 6 Computer Networks: Wireless and Mobile Communication Systems Dr E. Ever

65

AODV – the benefits

•No need for multiple route discovery:

•Routers established some state from HELLO packets

•More scalable than DSR

•More complex than DSR:

•computationally expensive

•energy usage

Page 66: CCM 4300 Lecture 6 Computer Networks: Wireless and Mobile Communication Systems Dr E. Ever

66

Other Protocols

•Single stability routing protocol (SSA)

•DSDV (Destination Sequenced Distance Vector)

•Zone routing protocol (ZRP)

•On-Demand Multicast Routing Protocol (ODMRP)

•(plus others)

Page 67: CCM 4300 Lecture 6 Computer Networks: Wireless and Mobile Communication Systems Dr E. Ever

67

Recap

•Ad hoc routing:

•Proactive

•Reactive

•Reactive routing examples:

•DSR

•AODV (early work) -

•(other protocols exist)

Page 68: CCM 4300 Lecture 6 Computer Networks: Wireless and Mobile Communication Systems Dr E. Ever

68

Summary

• wireless networks–I-TCP – Indirect TCP– Snoop TCP–M-TCP - – SACK

• Ad-hoc networks –TCP-Feedback (TCP-F)

–TCP with Explicit Link Failure Notification (ELFN)–ATCP – TCP for Mobile Ad-hoc Networks

Page 69: CCM 4300 Lecture 6 Computer Networks: Wireless and Mobile Communication Systems Dr E. Ever

Further Correction of error on UDP ChecksumMy previous explanation of how the UDP checksum worked was incorrect. Here is the correct

version.1. Segment is divided into consecutive 16 bit words2. The words are summed up using 1’s complement addition3. The final sum from step 2 is then complemented. The resulting 16 bit word is the

Checksum.

What is 1’s complement addition?1. Sum the numbers normally2. The carry of the sum is whatever bits are to the left of the rightmost 16 bits.3. If carry=0 then the normal sum is the 1’s complement sum.

If carry!=0 then add the carry back into normal sum to get 1’s complement sum.4. Examples below use 8 bits5. 1’s complement is actually a way of adding signed numbers (but we will not discuss

this)

1 0 0 0 1 0 0 1 Word 1 1 0 1 1 1 0 0 0 Word 2------------------------------------- 1 0 1 0 0 0 0 0 1 Normal Sum (note carry to remove) 1 Remove carry and add it back------------------------------------- 0 1 0 0 0 0 1 0 1’s complement sum

0 0 1 0 1 0 0 1 Word 11 0 1 1 1 0 0 0 Word 2---------------------------------1 1 1 0 0 0 0 1 1’s complement sum

Page 70: CCM 4300 Lecture 6 Computer Networks: Wireless and Mobile Communication Systems Dr E. Ever

Checksum example1 0 0 0 1 0 0 1 Input Word 11 1 1 1 0 0 0 0 Input Word 20 0 1 1 1 1 0 0 Input Word 31 0 1 0 0 0 0 1 Input Word 4

1 0 0 0 1 0 0 1 W1 1 1 1 1 0 0 0 0 W2--------------------------------------------------------------------- 1 0 1 1 1 1 0 0 1 Normal sum 1 Carry--------------------------------------------------------------------- 0 1 1 1 1 0 1 0 1’s Comp sum W1, W2 0 0 1 1 1 1 0 0 W3--------------------------------------------------------------------- 1 0 1 1 0 1 1 0 1’s Comp sum W1, W2, W3 1 0 1 0 0 0 0 1 W4--------------------------------------------------------------------- 1 0 1 0 1 0 1 1 1 Normal sum 1 Carry--------------------------------------------------------------------- 0 1 0 1 1 0 0 0 1’s Comp sum W1, W2, W3, W4 1 0 1 0 0 1 1 1 complement

= checksum of W1-W4