490 likes | 690 Views
Data and Computer Communications. Chapter 6 – Digital Data Communications Techniques. Ninth Edition by William Stallings. Digital Data Communications Techniques.
E N D
Data and Computer Communications Chapter 6 – Digital Data Communications Techniques Ninth Edition by William Stallings Data and Computer Communications, Ninth Edition by William Stallings, (c) Pearson Education - Prentice Hall, 2011
Digital Data Communications Techniques A conversation forms a two-way communication link; there is a measure of symmetry between the two parties, and messages pass to and fro. There is a continual stimulus-response, cyclic action; remarks call up other remarks, and the behavior of the two individuals becomes concerted, co-operative, and directed toward some goal. This is true communication. —On Human Communication, Colin Cherry
Asynchronous and Synchronous Transmission • timing problems require a mechanism to synchronize the transmitter and receiver • receiver samples stream at bit intervals • if clocks are not precisely aligned, drifting will sample at wrong time after sufficient bits are sent • two solutions to synchronizing clocks:
Asynchronous Transmission • data are transmitted one character at a time • each character is 5 to 8 bits in length • receiver has the opportunity to resynchronize at the beginning of each new character • simple and cheap • requires overhead of 2 or 3 bits per character (~20%) • the larger the block of bits, the greater the cumulative timing error • good for data with large gaps (keyboard)
Synchronous Transmission • block of bits transmitted in a steady stream without start and stop codes • clocks must be synchronized to prevent drift • can use separate clock line • embed clock signal in data • need to indicate start and end of block • use preamble and postamble bit patterns • frame is data plus preamble, postamble, and control information • more efficient than asynchronous for large blocks of data
Types of Error • an error occurs when a bit is altered between transmission and reception • binary 1 is transmitted and binary 0 is received or binary 0 is transmitted and binary 1 is received
Error Detection • regardless of design you will have errors • can detect errors by using an error-detecting code added by the transmitter • code is also referred to as check bits • recalculated and checked by receiver • still chance of undetected error • parity • parity bit set so character has even (even parity) or odd (odd parity) number of ones • even number of bit errors goes undetected
Parity Check • the simplest error detecting scheme is to append a parity bit to the end of a block of data • if any even number of bits are inverted due to error, an undetected error occurs
Cyclic Redundancy Check (CRC) • one of most common and powerful checks • for block of k bits transmitter generates an n bit frame check sequence (FCS) • transmits k+n bits which is exactly divisible by some predetermined number • receiver divides frame by that number • if no remainder, assume no error
Error Correction • correction of detected errors usually requires data block to be retransmitted • not appropriate for wireless applications • bit error rate is high causing lots of retransmissions • propagation delay long (satellite) compared with frame transmission time, resulting in retransmission of frame in error plus many subsequent frames • need to correct errors on basis of bits received • codeword • on the transmission end each k-bit block of data is mapped into an n-bit block (n > k) using a forward error correction (FEC) encoder
How Error Correction Works • adds redundancy to transmitted message • redundancy makes it possible to deduce original message despite some errors • block error correction code
Line Configuration - Duplex data exchanges classified as half or full duplex • half duplex (two-way alternate) • only one station may transmit at a time • requires one data path • full duplex (two-way simultaneous) • simultaneous transmission and reception between two stations • requires two data paths • separate media or frequencies used for each direction
Summary • asynchronous & synchronous transmission • asynchronous • data transmitted one character at a time • synchronous • block of bits transmitted in steady stream without start and stop codes • error detection and correction • single bit error and error burst • error detecting codes • parity and cyclic redundancy check (CRC) • line configurations • topology • full duplex and half duplex
Data and Computer Communications Chapter 7 – Data Link Control Protocols Ninth Edition by William Stallings Data and Computer Communications, Ninth Edition by William Stallings, (c) Pearson Education - Prentice Hall, 2011
Data Link Control Protocols “Great and enlightened one,” said Ten-teh, as soon as his stupor was lifted, “has this person delivered his message competently, for his mind was still a seared vision of snow and sand and perchance his tongue has stumbled?” “Bend your ears to the wall,” replied the Emperor, “and be assured.” —Kai Lung's Golden Hours, Earnest Bramah
Data Link Control Protocols • when sending data, to achieve control, a layer of logic is added above the Physical layer • data link control or a data link control protocol • to manage exchange of data over a link: • frame synchronization • flow control • error control • addressing • control and data • link management
Flow Control • ensure sending entity does not overwhelm receiving entity • prevent buffer overflow • influenced by: • transmission time • time taken to emit all bits into medium • propagation time • time for a bit to traverse the link • assumption is all frames are successfully received with no frames lost or arriving with errors
Stop and Wait • simplest form of flow control • works well for a message sent in a few large frames • stop and wait becomes inadequate if large block of data is split into small frames by source
Sliding Windows Flow Control • allows multiple numbered frames to be in transit • receiver has buffer W long • transmitter sends up to W frames without ACK • ACK includes number of next frame expected • sequence number is bounded by size of field (k) • frames are numbered modulo 2k • giving max window size of up to 2k – 1 • receiver can ACK frames without permitting further transmission (Receive Not Ready) • must send a normal acknowledge to resume • if have full-duplex link, can piggyback ACKs
Error Control Techniques • detection and correction of errors such as: • lost frames • -a frame fails to arrive at the other side • damaged frames • -frame arrives but some of the bits are in error
Automatic Repeat Request (ARQ) • collective name for error control mechanisms • effect of ARQ is to turn an unreliable data link into a reliable one • versions of ARQ are: • stop-and-wait • go-back-N • selective-reject
Stop and Wait ARQ • source transmits single frame • waits for ACK • no other data can be sent until destination’s reply arrives • if frame received is damaged, discard it • transmitter has timeout • if no ACK within timeout, retransmit • if ACK is damaged, transmitter will not recognize • transmitter will retransmit • receiver gets two copies of frame • use alternate numbering and ACK0 / ACK1
Data and Computer Communications Chapter 12 – Routing in Switched Data Networks Ninth Edition by William Stallings Data and Computer Communications, Ninth Edition by William Stallings, (c) Pearson Education - Prentice Hall, 2011
Routing in Switched Data Networks "I tell you," went on Syme with passion, "that every time a train comes in I feel that it has broken past batteries of besiegers, and that man has won a battle against chaos. You say contemptuously that when one has left Sloane Square one must come to Victoria. I say that one might do a thousand things instead, and that whenever I really come there I have the sense of hairbreadth escape. And when I hear the guard shout out the word 'Victoria', it is not an unmeaning word. It is to me the cry of a herald announcing conquest. It is to me indeed 'Victoria'; it is the victory of Adam." —The Man Who Was Thursday, G.K. Chesterton
Routing in Packet Switching Networks • key design issue for (packet) switched networks • select route across network between end nodes • characteristics required: • correctness • simplicity • robustness • stability • fairness • optimality • efficiency
Performance Criteria • used for selection of route • simplest is to choose “minimum hop” • can be generalized as “least cost” routing • because “least cost” is more flexible it is more common than “minimum hop”
Elements of Routing Techniques for Packet-Switching Networks
Network Information Source and Update Timing • routing decisions usually based on knowledge of network, traffic load, and link cost • distributed routing • using local knowledge, information from adjacent nodes, information from all nodes on a potential route • central routing • collect information from all nodes
Routing Strategies - Fixed Routing • use a single permanent route for each source to destination pair of nodes • determined using a least cost algorithm • route is fixed • until a change in network topology • based on expected traffic or capacity • advantage is simplicity • disadvantage is lack of flexibility • does not react to network failure or congestion
Routing Strategies - Flooding • packet sent by node to every neighbor • eventually multiple copies arrive at destination • no network information required • each packet is uniquely numbered so duplicates can be discarded • need to limit incessant retransmission of packets • nodes can remember identity of packets retransmitted • can include a hop count in packets
Routing Strategies - Random Routing • simplicity of flooding with much less traffic load • node selects one outgoing path for retransmission of incoming packet • selection can be random or round robin • a refinement is to select outgoing path based on probability calculation • no network information needed • random route is typically neither least cost nor minimum hop
Routing Strategies - Adaptive Routing • used by almost all packet switching networks • routing decisions change as conditions on the network change due to failure or congestion • requires information about network • Disadvantages: • decisions more complex • tradeoff between quality of network information and overhead • reacting too quickly can cause oscillation • reacting too slowly means information may be irrelevant