+ All Categories
Home > Documents > Computer Network2.4

Computer Network2.4

Date post: 17-Jan-2016
Category:
Upload: akshay-mehta
View: 4 times
Download: 1 times
Share this document with a friend
Description:
dd
22
Data link control Data link control
Transcript
Page 1: Computer Network2.4

Data link controlData link control

Page 2: Computer Network2.4

Model of Frame Model of Frame TransmissionTransmission

Page 3: Computer Network2.4

Simplex protocolSimplex protocol Tx expects that Rx is always ready to accept Tx expects that Rx is always ready to accept

the frame ,whatever may be frame interval the frame ,whatever may be frame interval (too short or too long)(too short or too long)

Rx should be provided with buffer capability, Rx should be provided with buffer capability, since it needs time to process a frame.since it needs time to process a frame.

Channel assumed to be errorless so no Channel assumed to be errorless so no chancechance

of frame corrupted or missingof frame corrupted or missing If too long ,leads to poor bandwidth utilizationIf too long ,leads to poor bandwidth utilization If too short Rx suffers by flooding If too short Rx suffers by flooding

Page 4: Computer Network2.4
Page 5: Computer Network2.4

Protocol for Half/full duplexProtocol for Half/full duplex

Both prevents flooding of the RxBoth prevents flooding of the Rx Larger buffer space at Rx is required Larger buffer space at Rx is required

in sliding windowin sliding window Tx informed about successful Tx informed about successful

transmission of a frame by means of transmission of a frame by means of acknowedgementacknowedgement

Variations leads to improved Variations leads to improved bandwidth utilizationbandwidth utilization

Page 6: Computer Network2.4

Stop and Wait

Page 7: Computer Network2.4

Stop and Wait Link Stop and Wait Link UtilizationUtilization

Page 8: Computer Network2.4

Max. possible link Max. possible link utilizatizationutilizatization

Tprop =propagation time between end1 and end2Tprop =propagation time between end1 and end2 Tframe=time required to put all frame bitsTframe=time required to put all frame bits Tproc=processing time to react to an eventTproc=processing time to react to an event tack= time to transmit acktack= time to transmit ack

Time to send a frame=tTime to send a frame=tprop+ t+ tframeframe +tproc+ tprop+tack+tproc +tproc+ tprop+tack+tprocAssuming ack frame << and tproc negligibleAssuming ack frame << and tproc negligible Tf= 2 tprop+ tTf= 2 tprop+ tframeframeIf n frame were transmitted T=nxTf =n(2 tprop+ tframe)If n frame were transmitted T=nxTf =n(2 tprop+ tframe)Line utilization U=time spent for actual data/ total timeLine utilization U=time spent for actual data/ total time =n tframe / n x(2 tprop +t frame)=n tframe / n x(2 tprop +t frame)If a =tprop/tframe ; then U= 1 / 1+ 2aIf a =tprop/tframe ; then U= 1 / 1+ 2a a= a= d/v d/v where d=link distance,v=velocity,l=frame where d=link distance,v=velocity,l=frame

length ,r=datarate length ,r=datarate l/ rl/ r

Page 9: Computer Network2.4

Sliding Windows Flow Sliding Windows Flow ControlControl

Allow multiple frames to be in transitAllow multiple frames to be in transit Receiver has buffer W longReceiver has buffer W long Transmitter can send up to W frames without Transmitter can send up to W frames without

ACKACK Each frame is numberedEach frame is numbered ACK includes number of next frame expectedACK includes number of next frame expected Sequence number bounded by size of field (k)Sequence number bounded by size of field (k)

– Frames are numbered modulo 2Frames are numbered modulo 2kk

Page 10: Computer Network2.4

Sliding Window

Page 11: Computer Network2.4

Sender Sliding Window

Page 12: Computer Network2.4

Receiver Sliding Window

Page 13: Computer Network2.4

Sliding Window Example

Page 14: Computer Network2.4
Page 15: Computer Network2.4

Damaged Frame in stop & wait

Page 16: Computer Network2.4

Stop & wait with ARQ in error prone Stop & wait with ARQ in error prone channelchannel

If frame get corrupted nack is sent and tx repeats the If frame get corrupted nack is sent and tx repeats the same frame so tx should also have a buffer to hold thesame frame so tx should also have a buffer to hold the

copy of the frame till pack arrives.copy of the frame till pack arrives.Tx tied up in infinite waiting loopTx tied up in infinite waiting loop if frame is lost completely, Rx will not send the ack if frame is lost completely, Rx will not send the ack

while tx is waiting for pack or nackwhile tx is waiting for pack or nack if pack /nack is lostif pack /nack is lost So Tx is provided of timer with preset waiting time ,if So Tx is provided of timer with preset waiting time ,if

ack doesnot arrive within set-time,Tx repeats the ack doesnot arrive within set-time,Tx repeats the frameframe

if frame was arrived successfully earlier ,Rx gets if frame was arrived successfully earlier ,Rx gets duplicated frame so it should ignore it(for this frame duplicated frame so it should ignore it(for this frame numbering reqd) otherwise accept it.numbering reqd) otherwise accept it.

Page 17: Computer Network2.4

Sliding window:Go-back-to nSliding window:Go-back-to n

If any frame/s missed of a window while tx is If any frame/s missed of a window while tx is transmitting exhaustively , Rx discards all transmitting exhaustively , Rx discards all successivesuccessive

frames till it gets the awaited frame.frames till it gets the awaited frame.

So Tx has to retransmit all the frames discarded by So Tx has to retransmit all the frames discarded by rx including the frames missed earlier.rx including the frames missed earlier.

Page 18: Computer Network2.4

Dam.frame –go back to n

Page 19: Computer Network2.4

Lost Frame-go back to n

Page 20: Computer Network2.4

Sliding window-selective rejectSliding window-selective reject

Rx is provided with capability to Rx is provided with capability to rearrange the frames belonging to a rearrange the frames belonging to a window and then pass on to network window and then pass on to network layer.layer.

so if any frames missed only those so if any frames missed only those require to repeatrequire to repeat..

Page 21: Computer Network2.4

Selective Reject

Page 22: Computer Network2.4

Line utilization in sliding windowLine utilization in sliding window

Line utilization = L /(L +B R)Line utilization = L /(L +B R) Where L= bits in frame, Where L= bits in frame, B= channel capacity in bits/secB= channel capacity in bits/sec R= round trip propagation delay in secR= round trip propagation delay in sec If B R<< line utilization would be 100% If B R<< line utilization would be 100%

(more than 50%)(more than 50%) If B R>> line utilization would be less than If B R>> line utilization would be less than

50% 50%


Recommended