Presentation is loading. Please wait.

Presentation is loading. Please wait.

CS380 Int. to Comp. Networks Data Link Networks - Part II1 Reliable Transmission How to fix corrupted frames. –Error correcting codes too expensive –Should.

Similar presentations


Presentation on theme: "CS380 Int. to Comp. Networks Data Link Networks - Part II1 Reliable Transmission How to fix corrupted frames. –Error correcting codes too expensive –Should."— Presentation transcript:

1 CS380 Int. to Comp. Networks Data Link Networks - Part II1 Reliable Transmission How to fix corrupted frames. –Error correcting codes too expensive –Should discard frames (retransmission) Recover from Corrupt Frames should be done in the Link Level

2 CS380 Int. to Comp. Networks Data Link Networks - Part II2 Reliable Transmission Recovery is accomplished with two mechanisms –Acknowledgements (ACK) Small control frame (a frame with header only but no data) sent back indicating successful frame delivery –Timeouts if the sender does not receive an ACK in a predetermined time the original frame is retransmitted.

3 CS380 Int. to Comp. Networks Data Link Networks - Part II3 ARQ Algorithms –The general strategy of using ACKs and timeouts to implement reliable delivery is called Automatic Repeat reQuest (ARQ) –Two ARQ algorithms: Stop-and-wait Sliding Window

4 CS380 Int. to Comp. Networks Data Link Networks - Part II4 4 Scenarios for Stop-and-Wait Problem: If there is lost/delayed ACK like in (c) and (d), sender will times-out and retransmits frame. The receiver believes it is the next frame. What to do? A 1-bit sequence number included in the header Both (a) and (b) are fine

5 CS380 Int. to Comp. Networks Data Link Networks - Part II5 Stop-and-Wait with 1-bit Sequence Number Include a 1-bit sequence number (with values of 0 or 1) in the header Sequence numbers used for each frame alternate Thus, when the sender retransmits frame 0, the receiver knows that it is a second copy of frame 0 rather than the first copy of frame 1 Time Sender Receiver frame 0 frame 1 frame 0 ACK0 ACK1 ACK0

6 CS380 Int. to Comp. Networks Data Link Networks - Part II6 Stop-and-Wait with 1-bit Sequence Number –Main shortcoming Only one frame is sent at a time may underutilize the link capacity  not keeping the pipe full Example: 1.5Mbps link x 45ms RTT Delay x bandwidth = 67.5Kb (~8KB). Assuming frame size of 1KB, stop-and-wait uses about one-eighth of the link's capacity. Want the sender to be able to transmit up to 8 frames before having to wait for an ACK. ( Sliding Window can do that )

7 CS380 Int. to Comp. Networks Data Link Networks - Part II7 Sliding Window Idea: Allow sender to transmit multiple frames before receiving an ACK, thereby keeping the pipe full.There is an upper limit on the number of outstanding (un-ACKed) frames allowed. SenderReceiver T ime … … Allow multiple outstanding (un-ACKed) frames Upper bound on un-ACKed frames, called window

8 CS380 Int. to Comp. Networks Data Link Networks - Part II8 Sliding Window: Sender Assign sequence number to each frame ( SeqNum ) Maintain three state variables: –send window size ( SWS ) –last acknowledgment received ( LAR ) –last frame sent ( LFS ) Maintain invariant: LFS - LAR <= SWS Advance LAR when ACK arrives Buffer up to SWS frames  SWS LARLFS ……

9 CS380 Int. to Comp. Networks Data Link Networks - Part II9 Sliding Window : Receiver Maintain three state variables –receive window size ( RWS ) –largest acceptable frame( LAF ) –last frame received ( LFR ) Maintain invariant: LAF - LFR <= RWS Frame SeqNum arrives: –if LFR < SeqNum < = LAF accept –if SeqNum LAF discarded Send cumulative ACKs  RWS LFRLAF ……

10 CS380 Int. to Comp. Networks Data Link Networks - Part II10 Sequence Number Space SeqNum field is finite; sequence numbers wrap around Sequence number space must be larger then number of outstanding frames SWS <= MaxSeqNum-1 is not sufficient –suppose 3-bit SeqNum field (0..7) –SWS=RWS=7 –sender transmit frames 0..6 –arrive successfully, but ACKs lost –sender retransmits 0..6 –receiver expecting 7, 0..5, but receives second incarnation of 0..5 SWS < (MaxSeqNum + 1)/2 is correct rule Intuitively, SeqNum “slides” between two halves of sequence number space

11 CS380 Int. to Comp. Networks Data Link Networks - Part II11 Shared Access Networks Outline Ethernet (802.3) Token Ring (802.5) Wireless (802.11)

12 CS380 Int. to Comp. Networks Data Link Networks - Part II12 Ethernet (802.3) Xerox Palo Alto Research Center(PARC) created Ethernet in the mid-1970’s Uses a technology called Carrier Sense, Multiple Access with Collision Detect(CSMA/CD) Multiple Access – nodes send/receive data over a shared link Carrier Sense – all nodes distinguish between idle/busy link Collision Detection – node monitors transmission and detects collision

13 CS380 Int. to Comp. Networks Data Link Networks - Part II13 Ethernet (802.3) Beginnings in an early packet radio system called Aloha developed at the University of Hawaii DEC, Intel, and Xerox defined a 10 Mbps Ethernet standard in 1978. This formed the basis of the IEEE standard called 802.3.  Wider collection of physical media  Faster version 100 Mbps Fast Ethernet 1000 Mbps Gigabit Ethernet

14 CS380 Int. to Comp. Networks Data Link Networks - Part II14 Ethernet Physical Properties Host Adaptor Transceiver Ethernet Cable Transceiver sends/receives data and detects when the line is idle Adaptor contains all the logic for the protocol (not the transceiver) Use Manchester encoding

15 CS380 Int. to Comp. Networks Data Link Networks - Part II15 Ethernet Physical Properties: Repeater Hosts Terminators Repeaters join multiple Ethernet segments  forwards signals on all outgoing segments  can support up to 4 repeaters Terminators avoid bounce-back Can support up to 1024 hosts

16 CS380 Int. to Comp. Networks Data Link Networks - Part II16 Ethernet Hub Hubs Multiway repeater (sometimes called hub)

17 CS380 Int. to Comp. Networks Data Link Networks - Part II17 Access Protocol for Ethernet Controls access to the shared Ethernet link Called the Ethernet’s Media Access Control (MAC) protocol Usually implemented in hardware on the adaptor

18 CS380 Int. to Comp. Networks Data Link Networks - Part II18 Ethernet Frame Format PreambleDestSrc Type Body CRC 64 48 48 16 32 Preamble – synch bits for signal – alternating O’s and 1’s Type – demultiplexing key (which of the higher level protocols does the frame belong?)

19 CS380 Int. to Comp. Networks Data Link Networks - Part II19 Ethernet Addresses Ethernet adaptors have unique addresses Burned into ROM Series of six one-byte numbers(a pair of hexadecimal digits) 8:0:2b:e4:b1:2 00001000 00000000 00101011 11100100 10110001 00000010 Each manufacturer is assigned a 24-bit prefix Example: Advanced Micro Devices has been assigned the 24-bit prefix 8:0:20

20 CS380 Int. to Comp. Networks Data Link Networks - Part II20 Ethernet Addresses Ethernet adaptors receive all frames Ethernet adaptors accept: - frames addressed to its own address - frames addressed to the broadcast address - frames addressed to a multicast address - all frames, if placed into promiscuous mode (Note: an adaptor can be programmed to run in promiscuous mode)

21 CS380 Int. to Comp. Networks Data Link Networks - Part II21 Ethernet Transmission Algorithm The sender’s side is where the action is If an adaptor has a frame to send and the line is idle, the frames is transmitted immediately If an adaptor has a frame to send and the line is busy, it waits for the line to go idle then transmits immediately Collision - two adaptors find the line idle do they transmit their packets which collide 96-bit transmission if adaptor detects collision (64b preamble + 32b jamming sequence) Once a collision is detected and stopped the adaptor will wait some time and try again. This time is called exponential backoff - each time it tries to transmit but fails results in doubling the delay interval between tries

22 CS380 Int. to Comp. Networks Data Link Networks - Part II22 Collisions AB AB AB AB

23 CS380 Int. to Comp. Networks Data Link Networks - Part II23 Experience with Ethernet Works well for 30% or less utilization otherwise network capacity is wasted Most Ethernets have fewer than 200 hosts (1024 maximum) Easy to administer, there are no: - switches - routers Easy to add new hosts

24 CS380 Int. to Comp. Networks Data Link Networks - Part II24 Network Adaptors Network Adaptor - framing - error detection - media access protocol ARQ(Automatic Repeat reQuest) algorithm is typically handled one layer up running on the host Device Driver – a collection of OS routines that effectively anchor the protocol graph to the network hardware


Download ppt "CS380 Int. to Comp. Networks Data Link Networks - Part II1 Reliable Transmission How to fix corrupted frames. –Error correcting codes too expensive –Should."

Similar presentations


Ads by Google