Title: ICSA 411: Week 3 Data Communication Contd
1ICSA 411 Week 3Data Communication (Contd)
Transmission Efficiency
- Elizabeth Lane Lawley, Instructor
2Protocols Preview
- ISOs OSI Seven-Layer Model
- While OSI model is increasingly out of favor in
application development, it is still very useful
in understanding networking in a conceptual
context
3ISOs Open Systems Interconnection (OSI) Model
- 7 Application Layer
- 6 Presentation Layer
- 5 Session Layer
- 4 Transport Layer
- 3 Network Layer
- 2 Data Link Layer
- 1 Physical Layer
4Physical Layer
- Refers to transmission of unstructured bits over
physical medium - Deals with characteristics of and access to the
physical medium
5Data Link Layer
- Provides for reliable transfer of information
across physical link - Includes
- transmission of blocks of data (frames)
- synchronization
- error control
- flow control
6Data Flow Simplex
- only transmit in one direction
- rarely used in data communications
- e.g., receiving signals from the radio station or
CATV - the sending station has only one transmitter the
receiving station has only one receiver
7Simplex Illustration
8Data Flow Half Duplex
- data may travel in both directions, but only in
one direction at a time - provides non-simultaneous two-way communication
- computers use control signals to negotiate when
to send and when to receive - the time it takes to switch between sending and
receiving is called turnaround time
9Half Duplex Illustration
10Data Flow Full Duplex
- complete two-way simultaneous transmission
- faster than half-duplex communication because no
turnaround time is needed
11Full Duplex Illustration
12Asynchronous Synchronous Transmission
- Concerned with timing issues
- How does the receiver know when the bit period
begins and ends? - Small timing differences become more significant
over time if no synchronization takes place
between sender and receiver - Synchronization occurs on the data link layer
13Asynchronous Transmission
- Serial communication
- Data transmitted 1 character at a time
- Character format is 1 start 1 stop bit, plus
data of 5-8 bits - Data may include parity bit
- Timing needed only within each character
- Resynchronization at each start bit
- Uses simple, cheap technology
- Wastes 20-30 of bandwidth
14Synchronous Transmission
- Parallel communication
- Large blocks of bits transmitted without
start/stop codes - Synchronized by separate clock signal or clocking
data(e.g. Manchester encoding)
- Data framed by preamble/postamble bit patterns
- More efficient than asynchronous
- Overhead typically below 5
- Used at higher speeds than asynchronous
15Bit Stuffing
- Used to ensure that preamble/postamble patterns
do not occur in transmitted data - Typically, the pattern is 6 consecutive 1s framed
by 0s - Whenever five 1s are found in the data, sending
station inserts a 0 after the fifth 1 - Whenever receiver detects five 1s followed by a
0, the 0 is removed
16Bit Stuffing Example
- Suppose network layer gives 16 1s to the data
link layer for transmission - Data link layer sends the following start/stop
flags and data to physical layer01111110 111110
111110 111110 1 01111110 - Data link layer on receiver removes start/stop
sequences and the stuffed bits - Note Example shows only start/stop flags and
user data
17Synchronization Choices
- Low-speed terminals and PCs commonly use
asynchronous transmission - inexpensive
- burst tendency of communication reduces impact
of inefficiency - Large systems and networks commonly use
synchronous transmission - overhead too expensive efficiency necessary
- error-checking more important
18Digital Interfaces
- The point at which one device connects to another
- Standards define what signals are sent, and how
- Some standards also define physical connector to
be used
19Generic Communications Interface Illustration
20DTE and DCE
21RS-232C (EIA 232C)
- EIAs Recommended Standard (RS)
- Specifies mechanical, electrical, functional, and
procedural aspects of the interface - Used for connections between DTEs and voice-grade
modems, and many other applications
22Mechanical Specifications
- 25-pin connector with a specific arrangement of
leads - DTE devices usually have male DB25 connectors
while DCE devices have female - In practice, fewer than 25 wires are generally
used in applications
23RS-232 DB-25 Connectors
24RS-232 DB-25 Pinouts
25RS-232 DB-9 Connectors
26RS-422 DIN-8
DIN-8 Male
DIN-8 Female
27Electrical Specifications
- Specifies signaling between DTE and DCE
- Uses NRZ-L encoding
- Voltage lt -3V binary 1
- Voltage gt 3V binary 0
- Rated for lt20Kbps and lt15M
- greater distances and rates are theoretically
possible, but not necessarily wise
28RS-232 Signals (Asynch)
Odd Parity
Even Parity
No Parity
29Functional Specifications
- Specifies the role of the individual circuits
- Data circuits in both directions allow
full-duplex communication - Timing signals allow for synchronous transmission
(although asynchronous transmission is more
common) - See Table 5-5 on p. 115 for this spec
30Procedural Specifications
- Multiple procedures are specified
- Simple example exchange of asynchronous data on
private line - Provides means of attachment between computer and
modem - Specifies method of transmitting asynchronous
data between devices - Specifies method of cooperation for exchange of
data between devices
31Limited Distance Modem Example (Point-to-Point)
- Only a few circuits are necessary
- Signal Ground (7)
- Transmitted Data (2)
- Received Data (3)
- Request to Send (4)
- Clear to Send (5)
- DCE Ready (6)
- Received Line Signal Detector (8)
- For exchange over PSTN, additional circuits
necessary - DTE Ready(20)
- Ring Indicator (22)
32Null Modem Cable
- Allows DTE to DTE direct communication
33EIA-232-D
- new version of RS-232-C adopted in 1987
- improvements in grounding shield, test and
loop-back signals - the prevalence of RS-232-C in use made it
difficult for EIA-232-D to enter into the
marketplace
34RS-449
- an EIA standard that improves on the capabilities
of RS-232-C - provides for a 37-pin connection, cable lengths
up to 200 feet, and data transmission rates up to
2 million bps - equates with the functional and procedural
portions of R-232-C - the electrical and mechanical specifications are
covered by RS-422 and RS-423
35Flow Control
- Necessary when data is being sent faster than it
can be processed by receiver - Computer to printer is typical setting
- Can also be from computer to computer, when a
processing program is limited in capacity
36Stop-and-Wait Flow Control
- Simplest form
- Source may not send new frame until receiver
acknowledges the frame already sent - Very inefficient, especially when a single
message is broken into separate frames, or when
the data link is long enough for significant
delays to be introduced
37Sliding-Window Flow Control
- Allows multiple frames to be in transit
- Receiver sends acknowledgement with sequence
number of anticipated frame - Sender maintains list of sequence numbers it can
send, receiver maintains list of sequence numbers
it can receive - ACK (acknowledgement) supplemented with RNR
(receiver not ready)
38Error Control Process
- All transmission media have potential for
introduction of errors - All data link layer protocols must provide method
for controlling errors - Error control process has two components
- Error detection
- Error correction
39Error Detection Parity Bits
- Bit added to each character to make all bits add
up to an even number (even parity) or odd number
(odd parity) - Good for detecting single-bit errors only
- High overhead (one extra bit per 7-bit
character12.5)
40Error Detection Cyclic Redundancy Check (CRC)
- Data in frame treated as a single binary number,
divided by a unique prime binary, and remainder
is attached to frame - 17-bit divisor leaves 16-bit remainder, 33-bit
divisor leaves 32-bit remainder - For a CRC of length N, errors undetected are 2-N
- Overhead is low (1-3)
41Error Correction
- Two types of errors
- Lost frame
- Damaged frame
- Automatic Repeat reQuest (ARQ)
- Error detection
- Positive acknowledgment
- Retransmission after time-out
- Negative acknowledgment and retransmission
42Stop-and-Wait ARQ
- One frame received and handled at a time
- If frame is damaged, receiver discards it and
sends no acknowledgment - Sender uses timer to determine whether or not to
retransmit - Sender must keep a copy of transmitted frame
until acknowledgment is received - If acknowledgment is damaged, sender will know it
because of numbering
43Go-Back-N ARQ
- Uses sliding-window flow control
- When receiver detects error, it sends negative
acknowledgment (REJ) - Sender must begin transmitting again from
rejected frame - Transmitter must keep a copy of all transmitted
frames
44Data Link Layer
- Specifies flow and error control for synchronous
communication - Data link module arranges data into frames,
supplemented by control bits - Receiver checks control bits, if data is intact,
it strips them
45High-Level Data Link Control
- On transmitting side, HDLC receives data from an
application, and delivers it to the receiver on
the other side of the link - On the receiving side, HDLC accepts the data and
delivers it to the higher level application layer - Both modules exchange control information,
encoded into a frame
46HDLC Frame Structure
- Flag 01111110, at start and end
- Address secondary station (for multidrop
configurations) - Information the data to be transmitted
- Frame check sequence 16- or 32-bit CRC
- Control purpose or function of frame
- Information frames contain user data
- Supervisory frames flow/error control (ACK/ARQ)
- Unnumbered frames variety of control functions
(see p.131)
47HDLC Operation
- Initialization S-frames specify mode and
sequence numbers, U-frames acknowledge - Data Transfer I-frames exchange user data,
S-frames acknowledge and provide flow/error
control - Disconnect U-frames initiate and acknowledge
48Transmission Efficiency Multiplexing
- Several data sources share a common transmission
medium simultaneously - Line sharing saves transmission costs
- Higher data rates mean more cost-effective
transmissions - Takes advantage of the fact that most individual
data sources require relatively low data rates
49Transmission Efficiency Data compression
- Reduces the size of data files to move more
information with fewer bits - Used for transmission and for storage
- Often combined with multiplexing to increase
efficiency
50Alternate Approaches to Terminal Support
- Direct point-to-point links
- Multidrop line
- Multiplexer
- Integrated MUX function in host
51Direct Point-to-Point
52Multidrop Line
53Multiplexer
54Integrated MUX in Host
55Frequency Division Multiplexing
- Requires analog signaling transmission
- Total bandwidth sum of input bandwidths
guardbands - Modulates signals so that each occupies a
different frequency band - Standard for radio broadcasting, analog telephone
network, and television (broadcast, cable,
satellite)
56Synchronous Time-Division Multiplexing (TDM)
- Used in digital transmission
- Requires data rate of the medium to exceed data
rate of signals to be transmitted - Signals take turns over medium
- Slices of data are organized into frames
- Used in the modern digital telephone system
- US, Canada, Japan DS-0, DS-1 (T-1), DS-3 (T-3),
... - Europe, elsewhere E-1, E3, ...
57Statistical Time Division Multiplexing
- Intelligent TDM
- Data rate capacity required is well below the sum
of connected capacity - Digital only, because it requires more complex
framing of data - Widely used for remote communications with
multiple terminals
58Data Compression
- Works on the principle of eliminating redundancy
- Codes are substituted for compressed portions of
data - Lossless reconstituted data is identical to
original (ZIP, GIF) - Lossy reconsituted data is only perceptually
equivalent (JPEG, MPEG)
59Run Length Encoding
- Replace string of anything with flag, character,
and count
60Huffman Encoding
- Length of each character code based on
statistical frequency in text - Modified Group III Fax
- Encodes runs of black or white
- 4 million pixels to lt .5 million bits
- full page lt 1 minute _at_ 9.6kb/s
61Lempel-Ziv Encoding
- Used in V.42 bis, ZIP
- buffer strings at transmitter and receiver
- replace strings with pointer to location of
previous occurrence - algorithm creates a tree-based dictionary of
character strings
62Lossy Algorithms (JPEG/MPEG)
- Scaling and color conversion (to YUV)
- Color subsampling (reduces hue info)
- Discrete cosine transformation
- Quantization
- Run-length encoding
- Huffman coding (lossless compression)
- Interframe compressions (MPEG only)