You are on page 1of 12

Dept.

of EEE CS 65 Computer Networks

• A computer network is designed to send/receive information from one


point to another.
• We must transform data into signal to send them from one place to
another.

Direct Link Networks • This requires data needs to be converted to either a digital signal or
analog signal for transmission.

• Digital-to-Digital or Encoding Digital Data :


• Digital Data stored in a computer has to be carried from one place to other (inside or
outside the computer).

• Analog-to-Digital or Digitizing an analog signal:


• Converts analog signal to digital

• Digital-to-Analog or Modulating a digital signal:


• Requires to transmit digital signal through a medium designed for an analog signal

• Analog-to-Analog or Modulating an analog signal :


• no conversion (voice, telephone) simply high frequency signals are carrying our voice.

49

DIGITAL-TO-DIGITAL CONVERSION

• We focus only computer communication where digital data is


Modulation: transmitted in the network digitally.
• A process converting binary data, a sequence of bits, to a
digital signal
• This involves three techniques
• Line coding
• Block coding
• Scrambling
• Line coding is always needed; block coding and scrambling
Encoding: may or may not be needed.

50

Prepared by Dr.S.Muralidharan 1
Dept. of EEE CS 65 Computer Networks

LINE CODING • Line Coding Schemes


• is the process of converting digital data to digital signals • Unipolar
• Converts sequence of digital bits to digital signal • Simple and primitive
• One voltage level
• Two problems: DC component & Lack of synchronization
• Polar
• Two signal levels: positive & negative
• Eliminate DC component
• Biploar
• Three signal levels: positive, zero, and negative

UNIPOLAR SCHEME
Unipolar • 1s are encoded as positive value and 0s are encoded as zero
value
• suffered from two problems : DC component &
synchornization
Digital-to-digital
digital
conversion Polar

BiPolar

Prepared by Dr.S.Muralidharan 2
Dept. of EEE CS 65 Computer Networks

DC Components (undesirable) Self-Synchronization (desirable)


• Average amplitude is non-zero value • For correctly interpret signal
• This creates Direct Current (DC) component • Sending 10110001; receiving 110111000011
• Cannot passing through a transformer
• Unnecessary energy on the line

• A Self-synchronizing digital signal includes timing


information in the data being transmitted. This signal will
reset the receiver’s clock if it is out of synchronization.

• NRZ: Non Return to Zero


• Classified into two :
• NRZ-L(Non-return zero-Level)
NRZ-L • Positive voltage
means 0; Negative
NRZ*
voltage means 1.
NRZ-I • Sync. Problem if long
string of 0s or 1s is
Polar RZ# encountered
• NRZ-I(Non-return zero-Invert)
Manchester • the signal is inverted if
a 1 is encountered
Biphase • A long string of 0s still
Differential
cause sync. problem
Manchester
In NRZ-L the level of the voltage determines the value of the bit.
* NRZ: Non Return to Zero In NRZ-I the inversion or the lack of inversion determines the value of the bit.
#RZ : Return to Zero

Prepared by Dr.S.Muralidharan 3
Dept. of EEE CS 65 Computer Networks

• Biphase :
• Signal changes at the middle of the bit interval but does not return to
• RZ: Return to Zero zero. Instead, it continues to the opposite pole.
• Uses three values: • Mid-interval transition allow synchronization.
positive, zero, negative
• Classified into
• Ensure Sync: a signal
• Manchester
change for each bit
• Differential Manchester
• Main disadvantage: uses
two signal changes to
encode one bit

• Manchester Encoding • Differential Manchester Encoding


– Uses two level signal values: positive, negative • Uses two level signal values: positive, negative
– Sync: Inversion at the middle of each bit • Sync: Inversion at the middle of each bit
– Zero: High -> Low; One: Low -> High • Zero: A transition; One: No transition

Prepared by Dr.S.Muralidharan 4
Dept. of EEE CS 65 Computer Networks

Comparison of various Polar techniques

Alternate Mask
Inversion
(AMI)

Bipolar 8-Zero
RZ
BiPolar Substitution
(B8ZS)

High Density Bipolar 3


(HDB3)

64

• Biploar Alternate Mark Inversion (AMI) Encoding Bipolar 8-Zero Substitution(B8ZS)


• Uses three level signal values: positive, zero, negative • Whenever 8 or more zeros are encountered in the data
• 0: Zero level; 1: Alternating positive and negative voltages stream, an artificial signal change called “violation”
• DC component is zero • Encoding Rules
• Long sequence of 1s synchronized but not 0s • If 8 zeros occur and the last voltage pulse preceding was positive
encode as 000+-0-+
• To synchronizing sequential 0s,
• If 8 zeros occur and the last voltage pulse preceding was
• Bipolar 8-zero substitution(B8ZS) : suggested in North America negative encode as 000-+0+-
• High Density bipolar 3 (HDB3) : used in Europe and Japan
• Solve the problem of bipolar AMI code where sequence of
zero was problem.
• Example of scrambling technique

Prepared by Dr.S.Muralidharan 5
Dept. of EEE CS 65 Computer Networks

Scrambling
• Use special pattern to replace sequences that would produce
10000000001 +000+-0-+01 in general 00000000 000V(-V)0(-V)V
constant voltage
1 0 0 0 0 0 0 0 0 0 1
• Use scrambling to replace sequences that would produce Amplitude

constant voltage Time


• Filling sequence
• Must produce enough transitions to sync
• Must be recognized by receiver and replace with original Violation Violation

• Same length as original


• No dc component Two cases of B8ZS scrambling technique
• No long sequences of zero level line signal
• No reduction in data rate
• Error detection capability

High Density Bipolar 3 (HDB3)


• Followed in Europe & Japan to solve sync. Problem
• Goal like B8ZS to improve Sync of AMI
• Just like AMI except 4 0’s are replaced by code
• As in B8ZS, the pattern of violations in HDB3 is baed on
the polarity of the previous 1 bit.
• But unlike B8ZS, HDB3 also looks at the number of 1s that
have occurred in the bit stream since the last substitution.
• Replaces every four consecutive 0s based on
• Number of pulses since last substitution
If 8 zeros occur and the last voltage pulse preceding was • Polarity of last logical 1
negative encode as 000-+0+- where V = -ve and B= +ve

Prepared by Dr.S.Muralidharan 6
Dept. of EEE CS 65 Computer Networks

• For 0000 use 000V or B00V Example:


• Where B and V are + or – • Number of 1s since last substitution is even, last 1 Positive
• And V is AMI violation, B is Balance Bit (before this string)
• Use 000V if EVEN number of + and – pulses so far • Encode 100000000001
• Use B00V if ODD, and B is opposite last pulse

Last 1 polarity Amplitude


1 0 0 0 0 0 0 0 0 0 0 1

# of 1s + -
Time

Odd 0000 000+ 0000 000-

Even 0000 -00- 0000 +00+

SUMMARY
Different situations in HDB3 scrambling technique

Prepared by Dr.S.Muralidharan 7
Dept. of EEE CS 65 Computer Networks

Data Link Protocol

• is a set of specifications used to implementation the data link layer ASYNCHRONOUS PROTOCOL :

• Treat each character in a bit stream independently


• Used primarily in modems,
• Featured with start and stop bits and variable length gaps between characters
• Not complex and are inexpensive to implement.
• A data unit is transmitted with no timing coordination between sender and
receiver.
• A receiver does not need to know exactly when a data unit is sent; it only needs to
recognize the beginning and the end of the unit. This is done by using extra bits
(start and stop bits) to frame the data unit
ASYNCHRONOUS

76 77

SYNCHRONOUS PROTOCOL : • Synchronous transmission protocols can be:


• In synchronous transmission • bit-oriented:
• data is sent in a large block called a frame • Bit-oriented protocol is a communications protocol that sees the
• Synchronous transmission is used on both transmitted data as an opaque stream of bits with no semantics, or
• point-to-point meaning. In simple terms, it interpret a transmission frame as a
succession of individual bits.
• multipoint circuits
• Bit oriented protocol can transfer data frames regardless of frame contents. It
• In multipoint circuits, addressing information needs to be included in the can also be stated as "bit stuffing" .This technique allows the data frames to
frame. contain an arbitrary number of bits and allows character codes with arbitrary
• Synchronous packets sometimes begin and end with a series of synchronization number of bits per character.
(SYN) characters that are used to help the receiver recognize incoming data. • May work like this : each frame begins and ends with a special bit pattern
• Synchronization refers to the fact the receiver must know when the data begins 01111110, called a flag byte. whenever the sender's data link layer
encounters 5 consecutive ones in the data, it automatically stuffs 0 into
and when it ends and also the receiver should be able to distinguish between each
the outgoing stream.
bit in the frame of data. SYNCHRONOUS
• Control information in a bit-oriented protocol can be one or multiple bits
depending on the information embodied in the pattern

78 79

Prepared by Dr.S.Muralidharan 8
Dept. of EEE CS 65 Computer Networks

Framing
• character-oriented: • The main tasks of the data link layer are:
• Also known as byte-oriented protocols • Transfer data from the network layer of one machine to the network
• Byte-oriented framing protocol is similar to bit-oriented layer of another machine
protocol except that instead of viewing the frame as a collection of
bits, byte-oriented framing views the frame as a collection of bytes.
• Convert the raw bit stream delivered by the physical layer into groups
of bits (“frames”)
• In simple way Interpret a transmission frame as a succession of characters
• are not as efficient as bit-oriented protocols and therefore now seldom used • It is the network adaptor that enables the nodes to exchange frames.
• Popular protocol : BSC(Binary synchronous communication) • When node A wishes to transmit a frame to node B, it tells its adaptor to
transmit a frame from the node’s memory. This results in a sequence of bits
being sent over the link. The adaptor on node B then collects together the
sequence of bits arriving on the link and deposits the corresponding frame in
B’s memory. Recognizing exactly what set of bits constitute a frame—that is,
determining where the frame begins and ends—is the central challenge faced
by the adaptor.

Bits
Node A Adaptor Adaptor Node B

Frames
80 81

• Upper-layer protocols also divide data into distinct “packets” of • Advantages of Framing
information, but the terminology used to define packets at each layer is • Synchronization recovery
different: • Multiplexing of link
• Message The actual application data,
command, or instruction encapsulated • Efficient error detection
within a TCP segment assuming TCP is
used.
• How can one determine the beginning/end of a frame?
• Segment The packet of information
exchanged between two peers that contains • Solutions:
TCP information. TCP exchanges • Character-based framing (use special control characters)
segments. • BInary SYNchronous Communication (BISYNC)

• Datagram The packet of information • Bit-oriented framing with flags


exchanged between two peers containing • Sentinel-based
network layer protocol information. IP • Length counts
exchanges datagrams. • Digital Data Communication Message Protocol

• Frame The packet of information at the • Clock based


data link layer. Frames encapsulate • SONET: Synchronous Optical Network
datagrams.
82 83

Prepared by Dr.S.Muralidharan 9
Dept. of EEE CS 65 Computer Networks

Various Framing Approaches… Various Framing Approaches…


BISYNC: BInary SYNchronous Communication • Sentinel-based
• Delimiter for frame is with special pattern: 01111110
SYN SYN SOH Header STX Body ETX BCC SYN
• e.g., HDLC, SDLC, PPP, IEEE 802.4 (Token Bus)
• SYN : These characters alert the receiver to the arrival of a new frame 8 16 16 8
and provide a bit pattern used by the receiving device to synchronize. Beginning Header Body CRC Ending
sequence sequence
• SOH: Start of Header
• STX : This signals the receiver that the control information is ending and • problem: if the above special pattern (ie.01111110 )appears in
the next byte will be data. the payload, it will be misinterpreted as delimiter.
• ETX : This indicates the end of data • solution: bit stuffing
• BCC : Block Check Count(BCC) are included for error detection. It • Bit stuffing used to avoid confusion with data containing 01111110
could be either LRC or CRC. • 0 inserted after every sequence of five 1s
• If receiver detects five 1s it checks next bit
• If 0, it is deleted
• If 1 and seventh bit is 0, accept as flag
• If sixth and seventh bits 1, sender is indicating abort

84 85

Example for bit stuffing :

A frame before bit stuffing:


01111110 01111100 101101111 110010

After
011111010 011111000 101101111 1010010

@ receiver end
• Receiver reads incoming bits and counts 1’s. Example with possible
• When number of consecutive 1s after a zero is 5, it checks the next bit (7th bit).
• If 7th bit = zero receiver recognizes it as a stuffed bit, discard it and resets the counter. errors
• If the 7th bit = 1 then the receiver checks the 8th bit; If the 8th bit = 0, the sequence is
recognized as a flag.

01111010 011111000 101101111 1010010

• Disadvantage: potentially increases the length by 20%

86 87

Prepared by Dr.S.Muralidharan 10
Dept. of EEE CS 65 Computer Networks

Various Framing Approaches… Various Framing Approaches…

• Counter-based • Clock-based
• include payload length in header • Continuous stream of fixed-length frames
• e.g., DDCMP(Digital Data Communication Message Protocol) • each frame is 125Ss long (all STS formats)
8 8 8 14 42 16 • Clocks must remain synchronized
• e.g., SONET: Synchronous Optical Network
SYN SYN Class Length Header Body CRC • Synchronous Optical Network Standard developed for
transmission over fiber.
• problem: count field corrupted
• solution: catch when CRC fails • SONET frame has special information that tells receiver
• One danger with this approach is that a transmission error could where frame starts and ends -- no bit stuffing.
corrupt the count field, in which case the end of the frame would not be
correctly detected. Should this happen, the receiver will accumulate as
• No Bit stuffing is used. Hence the frame length doesnot
many bytes as the bad COUNT field indicates and then use the error depend on the bits being sent.
detection field to determine that the frame is bad. This is sometimes
called a framing error. The receiver will then wait until it sees the next
SYN character to start collecting the bytes that make up the next
frame.

88 89

SONET or STS-1 Frames


• First three bytes overhead • Time is the same but now, a different amount of data is transmitted.
• In each STS-3 frame we have 3x810 = 2430 bytes.
• Total 810 bytes. • Interleave bytes --1st byte of first STS-1, 1st byte of 2nd STS-1 and so on.
• 2 byte pattern at beginning -- receiver has to see this every • Ensures that bytes from each STS-1 are evenly paced and arrive at a smooth 51 Mbps
rate at receiver.
810 bytes -- if it does it concludes that it is in sync.
Overhead Payload
• Bottomline: STS-3 channel could contain multiple low-data rate STS-1 channel

STS-1 STS-1 STS-1

9 rows

Hdr STS-3c
90 columns

90 91

Prepared by Dr.S.Muralidharan 11
Dept. of EEE CS 65 Computer Networks

• Payloads linked together instead of interleaving. • Bit rate is bits per second
• Concatenation instead of multiplexing. • Baud rate is “symbols” per second
• Cannot be multiplexed from different streams. • If each symbol contains 4 bits then data rate is 4 times the
• Called STS-Nc (As an example STS-3c). baud rate
• One of the fields in header used to denote
concatenation.
• Read rest of stuff on SONET from book.

92 93

Prepared by Dr.S.Muralidharan 12

You might also like