Title: Computer Network and Infrastructure Communication Interface and Flow Control
1Computer Network and InfrastructureCommunication
Interface and Flow Control
2Section Objectives
- To understand the necessity of Interfacing and
Flow Control in Data Communications. - Synchronous and Asynchronous transmission
techniques - Line configurations and topologies
- Data link control and flow control techniques
- Overview of Error detection and control
- Now we shift to data communication from data
transmission.
3Interfacing and Flow Control
- To communicate any device should interface with
the transmission system. - The interfacing has to be designed so that it has
characteristics in the following areas - Mechanical
- Electrical
- Functional
- Procedural
- Flow control is required to assure that the
source thus interfaced does not overwhelm the
destination by sending data faster than they can
be processed and absorbed.
4Synchronization
- For the sender and receiver to be able to
communicate successfully they must know - What a BIT is
- What a BYTE is
- What a FRAME is
- that is they must synchronize at the Bit, Byte,
and Frame level
5Synchronization
- Without Synchronization the bits/bytes/frames
cannot be identified at the proper sampling time.
- If no transmission impairments exists then the
problem is less. - There are two ways in which these bits can be
identified. - To identify the transmitter clock.
- To identify the line state change.
6Synchronous Communication
- Receiver clock operates in synchronism with the
received signal - The clocking signal is embedded into the
transmitted bit stream and subsequently extracted
by the receiver (SYN characters) - Example implementation The carrier frequency can
be used to synchronize the receiver based on the
phase of the carrier.
7Synchronous - Bit Level
- Block of data transmitted without start or stop
bits - Clocks must be synchronized
- Can use separate clock line
- Good over short distances
- Subject to impairments
- Embed clock signal in data
- Manchester encoding
- Carrier frequency (analog)
8Synchronous - Block Level
- Need to indicate start and end of block
- Use preamble and postamble
- e.g. series of SYN (hex 16) characters
- e.g. block of 11111111 patterns ending in
11111110 - More efficient (lower overhead) than asynchronous
transmission. - For a sizable block of data synchronous
transmission is more efficient than asynchronous
transmission. Because of low overhead.
9Synchronous (diagram)
10Asynchronous Transmission
- The receivers clock runs asynchronously with
respect to incoming signal - To avoid timing problems character at a time is
transmitted rather than a block of data. - A Byte is framed by a START and STOP bit.
- The START bit changes the signal to Non-Idle
state, this warns receiver a byte is
arriving.Then 8 data bits follow - The STOP bit follows the data bits and returns
the signal to the Idle state.
11Asynchronous (diagram)
12Asynchronous - Behavior
- In a steady stream, interval between characters
is uniform (length of stop element) - In idle state, receiver looks for transition 1 to
0 - Then samples next seven intervals (char length)
- Then looks for next 1 to 0 for next char
- Simple
- Cheap
- Overhead of 2 or 3 bits per char (20)
- Good for data with large gaps (keyboard)
13Line ConfigurationTopology
- Topology of a data link refers to the physical
arrangement of stations on transmission medium. - Point-to-Point
- Two communication stations
- Eg. Two computers communicating through serial
link - Multi-point
- More than two stations in transmission link
- This configuration is possible only when the
terminals are transmitting a fraction of the
time.
14Traditional Line Configurations
15Line ConfigurationData Exchange
- Simplex transmission
- One sided transmission, does not fall into data
exchange. - Half-duplex transmission
- Requires one data path for data exchange.
- Full-duplex transmission
- Requires two separate data paths. Eg. Two twisted
pairs - If Rx and Tx are two different frequencies, one
path is sufficient.
16Interfacing
- Data processing devices (or data terminal
equipment, DTE) do not (usually) include data
transmission facilities - Need an interface called data circuit terminating
equipment (DCE) - e.g. modem, NIC
- DCE transmits bits on medium
- DCE communicates data and control info with DTE
- Done over interchange circuits
- Clear interface standards required
17Data Communications Interfacing
18Interface Characteristics
- Mechanical
- connectors, pins, cables, etc.
- Electrical
- voltage levels, timing, etc.
- Functional
- data, control, synchronization, etc.
- Procedural
- the sequence various circuits are used
19Data Link Control
- Synchronization and interfacing alone may not be
enough to regulate the rate at which the data
arrives at the receiving DTE. - Flow control will add this additional
functionality to the data link control layer. - The data link control protocols are added above
the physical interfacing discussed previously. - When such as layer is used the transmission
medium is then referred to as a data link.
The need, pp 208
20Flow Control
- Ensuring the sending entity does not overwhelm
the receiving entity - Preventing buffer overflow
- Propagation Delay
- Time for a bit to traverse the link
- Transmission Delay
- Time taken to emit all bits into medium
21Model of Frame Transmission
22Stop and Wait Flow Control
- Source transmits frame
- Destination receives frame and replies with
acknowledgement - Source waits for ACK before sending next frame
- Destination can stop flow by not sending ACK
- This procedure works well for a few large frames
and needs no improvement. - Only one frame can be in transit in the link at
one time since to transmit the next frame an ACK
should be received
23Fragmentation of Data
- In most cases the source will split large blocks
of data and transmit in several frames. - The reasons for having data fragmented to small
frames is due to - Limited buffer size
- Errors detected sooner (when whole frame
received) - On error, retransmission of smaller frames is
needed - Prevents one station occupying medium for long
periods - For very high data rates, for very long distances
between sender and receiver, the Stop and wait
provides inefficient line utilization.
24Stop and Wait Link Utilization
25Stop and Wait Link Utilization ..
- Blength of link in bits
- Lnumber of bits in the frame
- agt1 the link is under utilized and hence not
efficient - alt1 when the first bit is received at the
receiving DTE, the last bit of the frame has not
left the source DTE. Hence the acknowledge will
not come till the entire message is received,
till them the link is inefficiently used.
26Problems with Stop-and-Wait
- It is inefficient for long links (agt1) the link
is under utilized for a long time till the ack
comes. - It is also inefficient for high data rates (alt1)
again the link is held up will all the data
arrives at the receiving DTE and then it can be
acknowledged. - The primary problem in SAW is inefficient link
utilization.
27Sliding Window Flow Control
- Allow multiple frames to be in transit, hence the
issues of stop-and-wait is taken care of. - Receiver has buffers for W frames long
- Transmitter can send up to W frames without ACK
- Each frame is numbered
- ACK includes number of next frame expected
- Sequence number bounded by size of field (k)
- Frames are numbered modulo 2k
28Sliding-Window Flow Control
- The sequence number occupies a field in the frame
and hence the number is bounded. Eg. For a 3 bit
field, the sequence number can range from 0 to 7 - The next example uses a 3-bit sequence number.
- In the example the sender can send only 5 frames
at a time. - The shaded are can shrink from the left and
expand from the right when frames are sent and
received respectively (from the senders point of
view)
29Sliding Window Diagram
30Example Sliding Window
31Sliding Windows Enhancements
- Receiver can acknowledge frames without
permitting further transmission (Receive Not
Ready) - Must send a normal acknowledge to resume
- If duplex, use piggybacking
- If no data to send, use acknowledgement frame
- If data but no acknowledgement to send, send last
acknowledgement number again, or have ACK valid
flag (TCP)
32Review Questions
- How is the transmission of a single character
differentiated from the transmission of the next
character in asynchronous transmission? - The beginning of a character is signaled by a
start bit but with a value of binary zero. A stop
(binary one) follows the character. - What is a major disadvantage of asynchronous
transmission? - Asynchronous transmission requires an overhead of
two or three bits per character, and is,
therefore, significantly less efficient than
synchronous transmission.
33Review Questions
- Suppose that a sender and receiver use
asynchronous transmission and agree not to use
any stop elements. Could this work? If so,
explain any necessary conditions. - No it will not work. The stop bit is needed so
that the start bit can be recognized as such. The
start bit is the synchronization event, but it
must be recognizable. The start bit is always a
0, and the stop bit is always a 1, which is also
the idle state of the line. When a start bit
occurs, it is guaranteed to be different from the
current state of the line.
34Review Questions
- List and briefly define some of the requirements
for effective communications over a data link. - Frame synchronization The beginning and end of
each frame must be recognizable. Flow control
The sending station must not send frames at a
rate faster than the receiving station can absorb
them. Error control Bit errors introduced by the
transmission system should be corrected.
Addressing On a multipoint line, such as a local
area network (LAN), the identity of the two
stations involved in a transmission must be
specified. Control and data on same link The
receiver must be able to distinguish control
information from the data being transmitted. Link
management The initiation, maintenance, and
termination of a sustained data exchange require
a fair amount of coordination and cooperation
among stations. Procedures for the management of
this exchange are required.
35Review Questions
- What is the advantage of sliding-windows flow
control compared to stop-and-wait flow control? - The stop wait approach requires acknowledgments
after each frame. The sliding window flow control
technique can send multiple frames before waiting
for an acknowledgment. Efficiency can be greatly
improved by allowing multiple frames to be in
transit at the same time.
36Review Problems
- Consider a half-duplex point-to-point link using
a stop-and-wait scheme, in which a series of
messages is sent, with each message segmented
into a number of frames. Ignore errors and frame
overhead. - What is the effect on line utilization of
increasing the message size so that fewer
messages will be required? Other factors remain
constant. - What is the effect on line utilization of
increasing the number of frames for a constant
message size? - What is the effect on line utilization of
increasing frame size?
37Review Problems ..
- a. Because only one frame can be sent at a time,
and transmission must stop until an
acknowledgment is received, there is little
effect in increasing the size of the message if
the frame size remains the same. All that this
would affect is connect and disconnect time. - b. Increasing the number of frames would decrease
frame size (number of bits/frame). This would
lower line efficiency, because the propagation
time is unchanged but more acknowledgments would
be needed. - c. For a given message size, increasing the frame
size decreases the number of frames. This is the
reverse of (b).