Encoding, Framing, Error Detecton
Complied by
JUN JIE, NGJUN JIE, NG
Direct Link NetworksDirect Link Networks
Five important issues to note:
1. Encoding (Not to be tested)g ( )
2. Framing
3. Error Detection
4. Reliable Delivery (Next Lecture)
5. Access Mediation (Next Lecture)
CCN Lecture 218 September 2011 2
( )
FramingFraming
Bits flow between adaptor frames between hosts
CCN Lecture 218 September 2011 3
Bits flow between adaptor, frames between hosts.
3 Kinds of Protocols3 Kinds of Protocols
1. Byte Oriented Protocols>Sentinel‐Based Approach
> BISYNC frame format> PPP frame format (recent)
>Byte‐Counting Approach
2. Bit Oriented Protocol (HLDC)
3. Counted Based Framing (SONET)
CCN Lecture 218 September 2011 4
3 Kinds of Protocols3 Kinds of Protocols
1A. Sentinel‐Based Approach: BISYNC frame format
SYN – synchronisation charactersSTX t t f t tSTX – start of textETX – end of textSOH – start of header
li d d h kCRC – cyclic redundancy check
The problem with sentinel‐based approach is that ETX character might appear in
CCN Lecture 218 September 2011 5
the data portion (body) of the frame. BISYNC overcomes this by “escaping” the ETX characters – know as character stuffing.
3 Kinds of Protocols3 Kinds of Protocols
1B. Sentinel‐Based Approach: PPP frame format (recent)
Flag – start of text characters e.g 01111110Add d f lt lAddress – default valueControl – default valueProtocol – used for demultiplexing;
id ifi hi h l l l iidentifies high level protocols i.e IP or xIPPayload size – default 1500 bytes but can be changedChecksum – either 2 or 4 bytes long
CCN Lecture 218 September 2011 6
3 Kinds of Protocols3 Kinds of Protocols
1C. Byte Counting Approach: DDCMP frame format
Count – specifies how many bytes that is contained i th f B din the frame Body
CCN Lecture 218 September 2011 7
3 Kinds of Protocols3 Kinds of Protocols
2. Bit Oriented Approach: HDLC frame format
CCN Lecture 218 September 2011 8
3 Kinds of Protocols3 Kinds of Protocols
3. Clock Based Framing (SONET)‐Synchronous Optical Network‐As with other frame format, SONET has special ways to tell the heading and ending‐No bit stuffing used‐Frame’s length does not depend on the data being sent
9 f 90 b t h‐9 rows of 90 bytes each‐First three bytes of each row are overhead‐First two frames contains
‐Receiver looks for special bit pattern, hoping to see it once every 810 bytes
special bit pattern: to determine where frame start
every 810 bytes
CCN Lecture 218 September 2011 9
Error DetectionError Detection
Cyclic Redundancy Check (CRC)
CCN Lecture 218 September 2011 10
Error DetectionError Detection
Cyclic Redundancy Check (CRC)
We think of sender and receiver exchanging polynomials.
Sender and receiver to agree on a divisor call “C(x)”.
C(x) is a polynomial of degree K Eg) x3 + x2 + 1 –> K=3C(x) is a polynomial of degree K. Eg) x3 + x2 + 1 –> K=3.
We use different degree (or K values) in different situations. See previous’ slide table information on CRC typesslide table information on CRC types.
CCN Lecture 218 September 2011 11
Error DetectionError Detection
Cyclic Redundancy Check (CRC) : The Mathematics…
Let the message to be transmitted be P(x).
IF: P(x) / C(x) = no remainder (or means: exactly divisible) – No ERROR!
IF: P(x) / C(x) = has remainder – There are ERRORs!IF: P(x) / C(x) = has remainder – There are ERRORs!
Note: Special class of polynomial arithmetic to be used here called: Polynomial arithmetic modulo 2 systemPolynomial arithmetic modulo‐2 system.
However, if is better we learn this via an example!
CCN Lecture 218 September 2011 12
Error DetectionError Detection
CCN Lecture 218 September 2011 13
Error DetectionError Detection
Cyclic Redundancy Check (CRC) : The Mathematics…Approach:
CCN Lecture 218 September 2011 14
18 September 2011 ELISS NIQC 15
Error DetectionError Detection
18 September 2011 ELISS NIQC 16
Top Related