Presentation is loading. Please wait.

Presentation is loading. Please wait.

Spring 2004 EE4272 Direct Link Networks (I) Hardware Building Blocks (nodes & links) 5 Issues before Exchanging Packets  Encoding  Framing  Error Detection.

Similar presentations


Presentation on theme: "Spring 2004 EE4272 Direct Link Networks (I) Hardware Building Blocks (nodes & links) 5 Issues before Exchanging Packets  Encoding  Framing  Error Detection."— Presentation transcript:

1 Spring 2004 EE4272 Direct Link Networks (I) Hardware Building Blocks (nodes & links) 5 Issues before Exchanging Packets  Encoding  Framing  Error Detection  Reliable Transmission  Medial Access Control

2 Spring 2004 EE4272 Hardware Building Blocks: Nodes  Assume general-purpose (programmable) computers; e.g.,. Sometimes replaced with special- purpose hardware. Finite memory (implies limited buffer space) Connects to network via a. Fast processor, slow memory (bottleneck of computer)

3 Spring 2004 EE4272 Hardware Building Blocks: Links Sometimes you install your own Sometimes leased from the phone company Reading Assignment: P67-P75

4 Spring 2004 EE4272 Encoding propagate over a physical medium  modulate electromagnetic waves  e.g., vary voltage

5 Spring 2004 EE4272 Encoding (Cont): NRZ Encode binary data onto signals  e.g., 0 as low signal and 1 as high signal  known as Non-Return to zero (NRZ) Problem of NRZ code:.  Low signal (0) may be interpreted as no signal  High signal (1) leads to.  Unable to recover.

6 Spring 2004 EE4272 Alternatives: NRZI and Manchester Non-return to Zero Inverted (NRZI):  Make a transition from the current signal to encode a 1, and stay at the current signal to encode a 0;. Manchester:  Transmits the XOR of the encoded data and the clock; only 50% efficient (baud rate=modulation rate).

7 Spring 2004 EE4272 4B/5B Encoding  every 4 bits of data encoded in a code  5-bit codes selected to have no more than one leading 0 and no more than two trailing 0s  thus, never get more than.  resulting 5-bit codes are transmitted using.  achieves 80% efficiency

8 Spring 2004 EE4272 Framing Break sequence of bits into a. Typically implemented by network.

9 Spring 2004 EE4272 HeaderBody 816 8 CRC Beginning sequence Ending sequence Framing Approaches: determine where the frame begins & ends Sentinel-based  delineate frame with special pattern: 01111110  e.g., HDLC, SDLC, PPP  problem: special pattern appears in the payload  solution:. sender: insert 0 after five consecutive 1s receiver: delete 0 that follows five consecutive 1s  if next bits are 10: end-of-frame marker  if next bits are 11: error

10 Spring 2004 EE4272 Framing Approaches (cont) Counter-based  include payload length in header  e.g., DDCMP  problem:.  solution: catch when CRC fails

11 Spring 2004 EE4272 Framing Approaches (cont) Clock-based  each frame is long  e.g., SONET: Synchronous Optical Network  STS-n (STS-1 = )

12 Spring 2004 EE4272 Error Detection:Two-Dimensional Parity

13 Spring 2004 EE4272 Error Detection: Internet Checksum Algorithm Basic Idea:  Add up all the words that are transmitted and then transmit the result of that with the data. The receiver the same way and the result with the received data. One of the implementations:  view message as a. Add these integers together using 16-bit, and then take the ones complement of the result. That 16-bit number is the.

14 Spring 2004 EE4272 Cyclic Redundancy Check Theoretical Foundation: a branch of mathematics called. Add k bits of redundant data to an n-bit.  want k << n  e.g., k = 32 and n = 12,000 (1500 bytes) Represent n-bit message as n-1 degree.  e.g., MSG=10011010 as M(x) = x 7 + x 4 + x 3 + x 1 Let k be the degree of some.  e.g., C(x) = x 3 + x 2 + 1

15 Spring 2004 EE4272 CRC (cont) Transmit polynomial P(x) that is by C(x)  shift left k bits ( k is the degree of C(x) ), i.e., M(x).k  subtract remainder of M(x).k/C(x) from M(x).k Receiver polynomial P(x) +.  E(x) = 0 implies no errors Divide (P(x) + E(x)) by C(x); remainder zero if:  E(x) was,or  E(x) is exactly by C(x)

16 Spring 2004 EE4272 Selecting C(x) All single-bit errors, as long as the x k and x 0 terms have. All, as long as C(x) contains a factor with at least. Any, as long as C(x) contains the factor (x + 1) Any error (i.e., sequence of consecutive error bits) for which the length of the burst is less than k bits. Most burst errors of larger than k bits can also be detected See Table 2.5 on page 96 for common C(x)

17 Spring 2004 EE4272 Reliable Transmission Recover from Corrupt Frames  ;also called Forward Error Correction (FEC)  and Timeouts; also called Automatic Repeat Request (ARQ)

18 Spring 2004 EE4272 Stop-and-Wait Problem: only one at a time (one frame per RTT) can not keep the pipe full Example  1.5Mbps link x 45ms RTT = 67.5Kb (8KB) (delay X bandwidth product)  1KB frames implies 1/8th link utilization SenderReceiver

19 Spring 2004 EE4272 Sliding Window SenderReceiver T ime … … 1 2 3 … N Basic Idea:  Allow sender to transmit before receiving an, thereby keeping the pipe full. There is an upper limit (called ) on the number of (un-ACKed) frames allowed.

20 Spring 2004 EE4272 SW: Sender Assign sequence number to each frame (SeqNum) Maintain three state variables:  send window size (SWS)  sequence # of last acknowledgment received (LAR)  sequence # of last frame sent (LFS) Maintain invariant: LFS - LAR <= SWS at all time Advance/update LAR when ACK arrives to allow a new frame be sent Buffer up to SWS frames for retransmission if needed  SWS LAR LFS ……

21 Spring 2004 EE4272 SW: Receiver Maintain three state variables  (RWS): upper bound on the # of out-of-order frames  sequence # of (LAF)  sequence # of (LFR) Maintain invariant: LAF - LFR <= RWS Frame arrives:  if LFR < SeqNum < = LAF accept  if SeqNum LFA discarded Mechanism of Sending cumulative.  LFR = SeqNumtoAck  LAF = LFR + RWS  RWS LFR LAF ……

22 Spring 2004 EE4272 SeqNum field is ; sequence numbers wrap around (reuse) Sequence number space must be than 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 when. Sequence Number Space


Download ppt "Spring 2004 EE4272 Direct Link Networks (I) Hardware Building Blocks (nodes & links) 5 Issues before Exchanging Packets  Encoding  Framing  Error Detection."

Similar presentations


Ads by Google