Sie sind auf Seite 1von 12

24/07/2018

BUSINESS DATA Outline of objectives – students to understand …


COMMUNICATIONS & • Data Link Layer
– Media Access Control
NETWORKING • Controlled Access
• Contention Access
– Error Control
• Prevention
Chapter 4 • Detection
• Correction
Data Link Layer – Protocols
• Async
• SDLC
• Ethernet
• PPP
• Transmission Efficiency and Throughput
• Implications for Management
FitzGerald ● Dennis ● Durcikova
Prepared by Taylor M. Wells: College of Business Administration, California State University, Sacramento 4-1 4-2
Copyright © 2015 John Wiley & Sons, Inc. All rights reserved. Copyright © 2015 John Wiley & Sons, Inc. All rights reserved.

Data Link Layer Media Access Control


Internet Model
• Layer 2 in the Internet model • Controls which device transmits and when
• Responsible for moving messages from
one device to another
Application • Important on
– Multipoint (shared) circuits
• Controls the way messages are sent on
media
Transport – Half-duplex point-to-point circuits
• Two approaches to control
• Organizes physical layer bit streams into
coherent messages for the network layer Network 1. Contention access
• Major functions of a data link layer 2. Controlled access
protocol Data Link
– Media Access Control
– Error Control
– Message Delineation Physical

4-3 4-4
Copyright © 2015 John Wiley & Sons, Inc. All rights reserved. Copyright © 2015 John Wiley & Sons, Inc. All rights reserved.

1
24/07/2018

Media Access Control Media Access Control


• Contention • Controlled access
– Transmit whenever circuit is available with no – Common in wireless LANs
centralized control – Access Request
• Each device must get “permission” to transmit, similar
– Common in Ethernet LANs to raising a hand
– When devices transmit at the same time, a collision – Polling
occurs • Roll-call polling
– Devices must be “polite” and follow these steps: – Central device (controller) determines which
devices can transmit
1. “Listen” for traffic
– Each client is checked periodically to see if it needs
2. If another device is transmitting, wait to transmit to transmit
3. Otherwise, transmit (and keep listening) • Hub Polling (token passing)
4. If another device begins to transmit, stop and wait – One device begins the poll and then passes it to
another device until it reaches them all

4-5 4-6
Copyright © 2015 John Wiley & Sons, Inc. All rights reserved. Copyright © 2015 John Wiley & Sons, Inc. All rights reserved.

Media Access Control Error Control


With high traffic,
controlled access is • Network errors
better because of the
high collisions of
– Types
With low traffic, the contention. • Corrupted data
higher overhead of
controlled access • Lost data
makes contention
more efficient. – Caused by problems in transmission (not humans)
• Networks should be designed with:
– Error prevention
Cross-over point used to be 20 – Error detection
devices, but very much depends
on devices, protocols, traffic, etc. – Error correction

4-7 4-8
Copyright © 2015 John Wiley & Sons, Inc. All rights reserved. Copyright © 2015 John Wiley & Sons, Inc. All rights reserved.

2
24/07/2018

Sources of Network Errors Error Prevention


Source of Error What Causes It How to Prevent or Fix
• Line noise and distortion
White Noise
– Major reason for errors and caused by several sources Movement of electrons Increase signal strength

– More likely on electrical media Impulse Noise


Sudden increases in electricity (e.g.,
Shield or move the wires
– Undesirable electrical signal lightning)

– Degrades performance of a circuit Cross-talk


Multiplexer guardbands too small or Increase the guardbands or
– Manifestation wires too close together move or shield the wires
• Extra bits Echo
Fix the connections or tune
• “Flipped” bits Poor (misaligned) connections
equipment
• Missing bits
Attenuation Gradual decrease in signal over
Use repeaters
distance
Intermodulation
Signals from several circuits combine Move or shield the wires
noise
4-9 4-10
Copyright © 2015 John Wiley & Sons, Inc. All rights reserved. Copyright © 2015 John Wiley & Sons, Inc. All rights reserved.

Error Detection Error Detection

• Receivers need to know when the data transmitted is not • Both sender and receiver calculate check value
correct • Sender tests whether the check values match
• Add “check value” (error detection value) to message
Sender Receiver

Check
Message Value

• Check value produced by mathematical formula

Check Check
Message Message
Value Value

Mathematical Mathematical
Calculations Calculations
4-11 4-12
Copyright © 2015 John Wiley & Sons, Inc. All rights reserved. Copyright © 2015 John Wiley & Sons, Inc. All rights reserved.

3
24/07/2018

Error Detection
Error Detection Techniques

• Parity checks • Parity check


• Checksum – 1-bit check value
• Cyclic Redundancy Check (CRC) – Based on the number of 1’s in the message
• Even parity: number of 1’s remains even
• Odd parity: number of 1’s remains odd
– Simple, but only detects 50% of errors

Example (Even Parity)

Character: ‘A’ Character: ‘C’


Binary: 01000001 Binary: 01000011
Parity Bit:0 Parity Bit:1

4 - 13
4-13 4-14
Copyright © 2015 John Wiley & Sons, Inc. All rights reserved. Copyright © 2015 John Wiley & Sons, Inc. All rights reserved.

Error Detection
Examples of Using Parity
To be sent: Letter V in 7-bit ASCII: 0110101
• Checksum
– 1-byte (typically) check value
EVEN parity sender receiver
– Checksum algorithms vary in the creation of check
01101010 values
number of all
transmitted 1’s – Detects 95% of errors
remains EVEN parity

• Method:
sender receiver • Add decimal values of each character in the message
ODD parity
01101011 • Divide the sum by 255
• The remainder is the checksum value
number of all transmitted
1’s remains ODD parity
4 - 15
4-15 4-16
Copyright © 2015 John Wiley & Sons, Inc. All rights reserved. Copyright © 2015 John Wiley & Sons, Inc. All rights reserved.

4
24/07/2018

Error Detection
Cyclic Redundancy Check (CRC)
Example:
P = 58
• Cyclic redundancy check (CRC) P/G=Q+R/G G=8
Q=7
– Treats message as a single binary number R =2
– Divides by a preset number Message Quotient Remainder:
(treated as (whole –added to the
– Uses remainder as the check value one long number) message as EDV
• Preset number is chosen so that remainder is the correct binary A fixed number –could be 8 bits, 16
number of bits number) (determines the bits, 24 bits, or 32
length of the R) bits long
• Modes: –CRC16 has R of 16
– CRC-16 (~99.998% error detection rate) bits
– Most powerful and most common
– CRC-32 (>99.99999% error detection rate)
– Detects 100% of errors (if number of errors <= size of R)
–Otherwise: CRC-16 (99.998%) and CRC-32 (99.9999%)

4-17 4 - 18
4-18
Copyright © 2015 John Wiley & Sons, Inc. All rights reserved. Copyright © 2015 John Wiley & Sons, Inc. All rights reserved.

Error Correction Error Correction

• Once detected, errors must be corrected • Stop-and-wait ARQ


• Error correction techniques
1. Receiver receives
– Retransmission (or backward error correction) Frame 1
frame and sends:
• Retransmission is simple and most common ACK
• Automatic Repeat reQuest (ARQ) • Acknowledgement
– Stop-and-wait ARQ (ACK) if no error Frame 2

– Continuous ARQ • Negative NAK


• This can also provide flow control by limiting the acknowledgement
Frame 2
number of messages sent (NAK) if error
– Forward error correction 2. If NAK, sender re- ACK
• Receiving device can correct messages without sends data
retransmission

4-19 4-20
Copyright © 2015 John Wiley & Sons, Inc. All rights reserved. Copyright © 2015 John Wiley & Sons, Inc. All rights reserved.

5
24/07/2018

Error Correction Error Correction


Sender Receiver
No errors
Frame 1
• Stop-and-wait ARQ • Continuous ARQ detected

No errors
Frame 2
3. If no ACK or NAK, – Sender does not wait for detected

Frame 3 ACK 1
Sender retransmits ACKs before sending
Errors
frame after Frame 3 more data Frame 3 detected

“timeout” ACK – “Sliding window” is ACK 2

4. If no ACK, sender number of frames allowed Frame 4


No errors
detected
Frame 4
re-sends data, to be unacknowledged by NAK 3
receiver sends ACK ACK receiver No errors
Frame 3
and deletes duplicate Frame 4 – Agreed upon by sender
detected

frame Duplicate Deleted


and receiver ACK 4
ACK
ACK 3

4-21 4-22
Copyright © 2015 John Wiley & Sons, Inc. All rights reserved. Copyright © 2015 John Wiley & Sons, Inc. All rights reserved.

Error Correction
Flow Control Example
window size =4 sender receiver
...3 2 1 0 • Forward error correction
0123456789
ACK 0... – Includes a certain level of redundancy in transmitted
(slide window) data so that receiving device can correct errors
...4
0123456789 – Does not require retransmission
ACK 4...
(slide window) – Used only when retransmission is impossible, very
…8 7 6 5
0123456789 costly, or time consuming (e.g., satellite connections)
ACK 7.. set window
(slide window) size to 2
..9
0123456789

(timeout)
...9 8
0123456789

4 - 23
4-23 4-24
Copyright © 2015 John Wiley & Sons, Inc. All rights reserved. Copyright © 2015 John Wiley & Sons, Inc. All rights reserved.

6
24/07/2018

Error Correction
Error Correction - Hamming Code

• Error control in practice


– On wired connections, errors are quite rare
– Most data link layer software today does not correct
Each data bit errors, only detect them and discard frames with errors
figures into three – Error correction must then be done at a higher layer
EVEN parity bit (Transport)
calculations
If any one bit Only
(parity or data) works for
changes  one bit
change in data errors
bit can be
detected and
corrected
4 - 4-25
25 4-26
Copyright © 2015 John Wiley & Sons, Inc. All rights reserved. Copyright © 2015 John Wiley & Sons, Inc. All rights reserved.

Data Link Protocols Asynchronous transmission


• Asynchronous serial transmission (async)
• Classification – Old protocol (e.g., used in teletype)
– Asynchronous transmission – Transmits one character at a time
– Synchronous transmission – Delineation indicated by start and stop bits
• Protocols differ by • Used
– Point-to-point full-duplex circuits
– Message delineation
– Typically over phone lines via modem
– Frame length – Computer to computer for transfer of data files
– Frame field structure – Example: Telnet connection
• Sometimes called Start/Stop Transmission
• What about media access control???

4-27 4-28
Copyright © 2015 John Wiley & Sons, Inc. All rights reserved. Copyright © 2015 John Wiley & Sons, Inc. All rights reserved.

7
24/07/2018

Asynchronous transmission Asynchronous transmission Protocols


• One of the oldest async file transfer protocol
Xmodem: • Uses stop-and-wait ARQ.
Start Bit Message Parity Stop Bit
(1 bit) (7 or 8 bits) (1 bit) (1 bit)
Start
of
Header
SOH Packet # Packet # compl. Checksum
(128 bytes)

Xmodem-CRC: uses 1 byte CRC (instead of checksum)

Xmodem-1K: Xmodem-CRC + 1024 byte long message field

Zmodem: • Uses CRC-32 with continuous ARQ


• Dynamic adjustment of packet size

4-29 4 - 30
4-30
Copyright © 2015 John Wiley & Sons, Inc. All rights reserved. Copyright © 2015 John Wiley & Sons, Inc. All rights reserved.

Synchronous transmission Synchronous transmission Protocols

• SDLC
• Synchronous transmission
• HDLC
– Data sent in a large block called a frame
• Ethernet
– Includes addressing information
• PPP
• Especially useful in multipoint circuits
– Includes synchronization characters to let the receiver
know when data transmission begins
– Example protocols: SDLC, HDLC, Ethernet, PPP

4-31 4-32
Copyright © 2015 John Wiley & Sons, Inc. All rights reserved. Copyright © 2015 John Wiley & Sons, Inc. All rights reserved.

8
24/07/2018

Synchronous transmission Protocols …the data frame


Flag Address Control Data CRC-32 Flag
(8 bits) (8 bits) (8 bits) (variable) (32 bites) (8 bits)
• Synchronous Data Link Control (SDLC)
– Synchronous bit-oriented protocol developed by IBM
– Uses Control Access media protocol Beginning
(01111110)
– Uses bit stuffing (zero insertion) to overcome
transparency problem
data CRC-32
Flag Address Control Data CRC-32 Flag
(8 bits) (8 bits) (8 bits) (variable) (32 bites) (8 bits)

Destination
Address (8 Identifies frame type;
or 16 bits) • Information (for transferring of user data)
• Supervisory (for error and flow control)
4-33 4-34
Copyright © 2015 John Wiley & Sons, Inc. All rights reserved. Copyright © 2015 John Wiley & Sons, Inc. All rights reserved.

Transparency Problem of SDLC HDLC – High-Level Data Link Control


• Problem: Transparency • Same as SDLC, except
– User data may contain the same bit pattern as the flags – Longer address and control fields
• Example: actual data bit patterns may be the same as the flag – Larger sliding window size
bit pattern. Example: (01111110)
– And more
– Receiver may interpret it as the end of the frame and ignores the
rest • Basis for many other Data Link Layer protocols
• Solution: Bit stuffing (aka, zero insertion) – LAP-B (Link Access Protocol – Balanced)
– Sender inserts 0 anytime it detects 11111 (five 1’s) • Used by X.25 technology
– If receiver sees five 1's, checks next bit(s) – LAP-D (Link Access Protocol – Balanced)
• if 0, remove it (stuffed bit) • Used by ISDN technology
• if 10, end of frame marker (01111110) – LAP- F
• if 11, error (7 1's cannot be in data)
• Used by Frame Relay technology
– Works but increases complexity

4 - 35
4-35 4 - 36
4-36
Copyright © 2015 John Wiley & Sons, Inc. All rights reserved. Copyright © 2015 John Wiley & Sons, Inc. All rights reserved.

9
24/07/2018

Synchronous transmission Protocols Synchronous transmission Protocols

• Ethernet • Point-to-point protocol (PPP)


– IEEE 802.3 standard and Ethernet II – Common WAN protocol
– Most widely used LAN protocol
– Uses contention media access control Inter-frame
Gap Flag Address Control Protocol Data CRC Flag
(1 byte) (1 byte) (1 byte) (2 bytes) (variable) (2 or 4 bytes) (1 byte)
(12 bytes)

Example of Ethernet II Frame


Preamble
Destination
& Source Address Type Data CRC
Address
Delimiter (6 bytes) (2 bytes) (46-1500 bytes) (4 bytes)
(6 bytes)
(8 bytes)

38 Total Bytes of Overhead


4-37 4-38
Copyright © 2015 John Wiley & Sons, Inc. All rights reserved. Copyright © 2015 John Wiley & Sons, Inc. All rights reserved.

Transmission Efficiency Transmission Efficiency of Protocols


Async Transmission:
• An objective of the network: 7-bit ASCII (info bits), 1 parity bit, 1 stop bit, 1 start bit
– Move as many bits as possible with minimum errors Transmission Efficiency = 7 / 10  70%
 higher efficiency and lower cost e.g., V.92 modem with 56 Kbps  39.2 Kbps effective rate
• Factors affecting network efficiency:
– Characteristics of circuit (error rate, speed) SDLC Transmission
– Speed of equipment, Error control techniques Assume 100 info characters (800 bits), 2 flags (16 bits)
Address (8 bits), Control (8 bits), CRC (32 bits)
– Protocol used
Transmission Efficiency = 800 / 864  92.6%
• Information bits (= actual user information)
e.g., V.92 modem with 56 Kbps  51.9 Kbps effective rate
• Overhead bits ( used for error checking, frame delimiting,
etc.)

Bigger the message length, better the efficiency


Total number of info bits to be transmitted
= Total number of bits transmitted
However, large packets likely to have more errors and are
more likely to require retransmission  wasted capacity

4 - 39
4-39 4 - 40
4-40
Copyright © 2015 John Wiley & Sons, Inc. All rights reserved. Copyright © 2015 John Wiley & Sons, Inc. All rights reserved.

10
24/07/2018

Optimum Packet Size


Throughput
Trade-off between packet size and throughput
A more accurate definition of efficiency Acceptable range

• Total number of information bits received per second;


takes into account:
– Overhead bits (as in transmission efficiency)
– Need to retransmit packets containing errors
• Complex to calculate; depends on:
– Transmission efficiency
– Error rate
– Number of retransmission (more costly in terms of circuit
capacity to retransmit if there
• Transmission Rate of Information Bits (TRIB) is an error)
– Used as a measurement of throughput (less likely to contain errors)
Smaller packets Larger packets
4 - 41
4-41 4 - 42
4-42
Copyright © 2015 John Wiley & Sons, Inc. All rights reserved. Copyright © 2015 John Wiley & Sons, Inc. All rights reserved.

Transmission Efficiency
Throughput
• Protocol design contributes to network efficiency • More complicated than simple protocol efficiency because
• Transmission Efficiency it depends on the retransmission rate, transmission rate,
#  
    
and delay
= • Transmission Rate of Information Bits (TRIB) is a
#  
 + ℎ
  (   )
measure of the effective # of bits transmitted in a unit of
• Async Effiency = 8/(8+3) = 0.73 = 73% time
• How can we increase efficiency?
– Increase Data bits
– Decrease Overhead bits

• What is the efficiency if you send 342 bytes over Ethernet II?
• What is the efficiency if you send 722 bytes over Ethernet II?

4-43 4-44
Copyright © 2015 John Wiley & Sons, Inc. All rights reserved. Copyright © 2015 John Wiley & Sons, Inc. All rights reserved.

11
24/07/2018

Implications for Management


Questions to consider
• Industry has seen a rapid consolidation in the number of
data link layer protocols • Under what conditions is media access control unimportant?
– Upgrade to newer protocols Briefly explain why.
• Under what conditions would you use controlled access rather
– Use fewer, well-established protocols than contention? Explain.
• Use appropriate protocol depending on size of network • Which is better, controlled access or contention? Explain.
• Have trained expertise • Are large frame sizes better than small frame sizes? Explain.
• Less expensive, off-the-shelf equipment • Smith, Smith, Smith, and Smith is a regional accounting firm
that is building a new headquarters building. The building will
• Minimize costly customization have a backbone network that connects eight LANs (two on
• Etc. each floor). They are very concerned with network errors.
What general advice would you give them in the design of the
building and network cable planning that would help reduce
network errors?

4-45 4-46
Copyright © 2015 John Wiley & Sons, Inc. All rights reserved. Copyright © 2015 John Wiley & Sons, Inc. All rights reserved.

Read chapter 4

4-47
Copyright © 2015 John Wiley & Sons, Inc. All rights reserved.

12

Das könnte Ihnen auch gefallen