Presentation is loading. Please wait.

Presentation is loading. Please wait.

Prof. Athirai Irissappane

Similar presentations


Presentation on theme: "Prof. Athirai Irissappane"— Presentation transcript:

1 Prof. Athirai Irissappane
CSS432 (Link Level Protocols) Point-to-Point Links Textbook Ch2.1 – 2.4 Prof. Athirai Irissappane CSS 432

2 Outline Link Level Protocols (Physical & Data Link) Issus
Point-to-Point Links Multiple Access Links Wireless Links Issus Encoding, Framing, Error Detection Reliable transmission, Media Access Control CSS 432

3 Links Links Point-To-Point Links Wired
Typically copper wire in some form (as in coaxial cable), Optical fiber (as in both commercial fiber-to-the home services and many long-distance links in the Internet’s backbone), or Wireless Air/free space (for wireless links) Point-To-Point Links CSS 432

4 Links Full-duplex versus Half-duplex Full Half at time t at time u
In networking, the term ‘duplex’ signifies the ability for two points or devices to communicate with each other, as opposed to ‘simplex’ which refers to unidirectional communication Full-duplex communication between two components means that both can transmit and receive information between each other simultaneously. Telephones are full-duplex systems so both parties on the phone can talk and listen at the same time. In half-duplex systems, the transmission and reception of information must happen alternately. While one point is transmitting, the other must only receive. Walkie-talkie radio communication is a half-duplex system, this is characterised by saying “over” at the end of a transmission to signify that the party is ready to receive information Tranfer of info -> electromagnetic waves; v=flambda; v-> velo; f-frequency; lam-wavelength  em waves created by the vibration of an electric charge hence have frequency; synchronized oscillations of electric and magnetic fields that propagate at the speed of light through a vacuum Wavelength: dist bet pair of maxima, minima of wae Wired: Twisted pair: 4 pairs of twisted cables of copper wire; twisted to avoid em interference (shielded (less interference)/unshielded) Coaxial: single copper wire: more bandwidth and less interference Fiber optics: cable has optical fibers(glass) transferring light; information transferred by sending pulses of light No em interference; less loss Optical fiber: cylindrical guide with a core surrounded by cladding: light is transmitted through the core by total internal reflection Light should enter > than critical angle to be refected inside without leaking and thereby reaching destination: Mutimode: greater diameter; greater critical angle: multiple light modes (wave) to be propagated Modal dispersion: because the propagation velocity of the optical signal is not the same for all modes; as rays at different angles have different path lengths and therefore take different times to traverse the fiber Multi mode: short distance communication; multiple light modes to be propagated and limits the maximum length of a transmission link Led for light pulse; bandwidth low Single mode: laser for pulse; longer distance; larger bandwidth; costly A carrier system is a telecommunications system that transmits information; T-carrier is a member of the series of carrier systems developed by AT&T Bell Laboratories; DS1 is the primary digital telephone standard used in the United States and Japan and is able to transmit up to 24 multiplexed voice and data calls over telephone lines (physical/wireless/of) A Digital Signal 3 (DS3) is a digital signal level 3 T-carrier; This level of carrier can transport 28 DS1 level signals within its payload.(physical, wireless, optical) Sts-1: optical fibre; Optical Carrier transmission rates are a standardized set of specifications of transmission bandwidth for digital signals that can be carried on Synchronous Optical Networking (SONET) fiber optic networks. OC-1 is a SONET line with transmission speeds of up to Mbit/s ; OC-3 is a network line with transmission data rate of up to Mbit/s Data transfer method in which a continuous stream of data signals is accompanied by timing signals (generated by an electronic clock) to ensure that the transmitter and the receiver are in step (synchronized) with one another. The data is sent in blocks (called frames or packets) spaced by fixed time intervals. In contrast, asynchronous transmission works in spurts and must insert a start bit before each data character and a stop bit at its termination to inform the receiver where it begins and ends. Most network protocols (such as Ethernet, SONET, Token Ring) use synchronous transmission whereas asynchronous transmission is used commonly for communications over telephone lines. Read more: CSS 432

5 Links Electromagnetic waves propagate through a medium/free space
Transmitters generate EM signals; Data is encoded in the signal CSS 432

6 Links Frequency Measured in hertz, rate with which the electromagnetic waves oscillate, number of cycles per unit time. Frequency on a copper cable range from 300Hz to 3300Hz; Bandwidth: width of frequency band ( = 3000 Hz) The number of crests that pass a given point within one second is described Distance between the adjacent pair of maxima or minima of a wave measured in meters is called wavelength Speed of light divided by frequency gives the wavelength. Wavelength for 300Hz wave through copper is (speed of light on a copper / frequency) 2/3 x 3 x 108 /300 = 667 x 103 meters. Modulation involves modifying the signals in terms of their frequency, amplitude, etc. CSS 432

7 Encoding Placing binary data on a signal is called encoding.
Signals travel between signaling components; bits flow between adaptors Signals propagate over a physical medium modulate electromagnetic waves e.g., vary frequency, amplitude CSS 432

8 Encoding Encode binary data onto signals Consecutive 1s and 0s
e.g., 0 as low signal and 1 as high signal known as Non-Return to zero (NRZ) Consecutive 1s and 0s Baseline wander: if the receiver averages signals to decide a threshold Clock recovery: both sides must be strictly synchronized Bits NRZ 1 CSS 432

9 Encoding Problem with NRZ Baseline wander
The receiver keeps an average of the signals it has seen so far Receiver uses the average to distinguish between low and high signal When a signal is significantly low than the average, it is 0, else it is 1 Too many consecutive 0’s and 1’s cause this average to change, making it difficult to detect CSS 432

10 Encoding Problem with NRZ Clock recovery
Both encoding, decoding is driven by a clock Clock is an internal signal that alternates from low to high, a low/high pair one clock cycle Every clock cycle, the sender transmits a bit and the receiver recovers a bit Sender and receiver must be synchronized Receiver re-synchronizes its clock when signal changes (clock recovery) Frequent transition from high to low or vice versa are necessary to enable clock recovery Clock cycle: low high pair of the clock CSS 432

11 Alternative Encodings
Non-return to Zero Inverted (NRZI) Encode 1: make a transition from current signal Encode 0: stay at current signal to encode a zero solves the problem of consecutive 1s Signal flips every 1 is encountered. Manchester Transmit XOR of the NRZ encoded data and the clock Only 50% efficient. Used by Ethernet/Token Ring Ethernet /ˈiːθərnɛt/ is a family of computer networking technologies commonly used in local area networks (LANs) and metropolitan area networks (MANs) Token ring local area network (LAN) technology is a communications protocol for local area networks. It uses a special three-byte frame called a "token" that travels around a logical "ring" of workstations or servers. This token passing is a channel access method providing fair access for all stations, and eliminating the collisions of contention-based access methods. 1 CSS 432

12 Encoding Example Bits NRZ Clock Manchester NRZI 1 CSS 432

13 Alternative Encodings
Problem with Manchester encoding Doubles the rate at which the signal transitions are made on the link Which means the receiver has half of the time to detect each pulse of the signal The rate at which the signal changes is called the link’s baud rate Bit rate is the no.of of data bits transmitted in one second; Here Bit rate is half the baud rate CSS 432

14 4B/5B Encoding Address inefficiency, repeated high/low signals
Insert extra bits into bit stream so as to break up the long sequence of 0’s and 1’s Every 4-bits of actual data are encoded in a 5- bit code that is transmitted to the receiver 5-bit codes are selected in such a way that each one has no more than one leading 0(zero) and no more than two trailing 0’s. No pair of 5-bit codes results in more than three consecutive 0’s NRZI encoding for transmission (repeated 1’s) Achieves 80% efficient: bit rate = 80% (4/5*100) baud rate) CSS 432

15 Framing We are focusing on packet-switched networks, which means that blocks of data (called frames at this level), not bit streams, are exchanged between nodes. It is the network adaptor that enables the nodes to exchange frames. Bits Node A Adaptor Adaptor Node B Frame Bits flow between adaptors, frames between hosts CSS 432

16 Framing 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 CSS 432

17 Sentinel approach: PPP, HDLC
Delineate frame (beginning sequence/end sequence) with special pattern: problem: ending sequence appears in the payload/actual data solution: bit stuffing sender: insert 0 after five consecutive 1s receiver: delete 0 that follows five consecutive 1s Other classification: Byte Oriented (PPP), frames are collection of bytes Character stuffing instead of bit stuffing Bit Oriented (HDLC) frames are collection of bits Frame error Header Body 8 16 CRC Beginning sequence Ending BISYNC (Binary Synchronous Communication) Protocol PPP – Point-to=point : IP protocol DDCMP (Digital Data Communication Protocol) CRC – cyclic redundancy check HDLC – High level data link control CSS 432

18 Counter Based: DDCMP include payload length in header
problem: count field corrupted (frame error) solution: Wait for the next beginning sequence Catch when CRC fails Frame error BISYNC (Binary Synchronous Communication) Protocol PPP – Point-to=point : IP protocol DDCMP (Digital Data Communication Protocol) CRC – cyclic redundancy check Accumulate bytes as count specifies: verify with CRC and detect framing error Wait till next beginning of sequence CSS 432

19 Error Detections Bit errors are introduced into frames Detecting Error
Because of electrical interference and thermal noises Detecting Error Correction Error when the recipient detects an error Notify the sender that the message was corrupted, so the sender can send again. If the error is rare, then the retransmitted message will be error-free Using some error correct detection and correction algorithm, the receiver reconstructs the message CSS 432

20 Error Detections Add k bits of redundant data to an n-bit message
want k << n (i.e. k is extremely small as compared to n) e.g., k = 32 and n = 12,000 (1500 bytes) in CRC-32 Extra bits are redundant They add no new information to the message Derived from the original message using some algorithm Both the sender and receiver know the algorithm Parity Bit Internet Checksum Algorithm Cyclic Redundancy Check CSS 432

21 Parity One dimensional Parity Two-dimensional parity
1 Parity bits byte Data One dimensional Parity adding one extra bit to a 7-bit code to balance the number of 1s in the byte. Odd parity: add 1 to get odd number of 1s in the byte Even parity: add 1 to get even number of 1s in the byte Two-dimensional parity similar calculation for each bit position across each of the bytes in the frame extra parity byte for the entire frame, in addition to a parity bit for each byte CSS 432

22 Internet Checksum Algorithm
View message as a sequence of 16-bit integers; ( ) Convert each 16-bit integer into a ones-complement arithmetic Sum up each integer Increment the result upon a carryout Example: 5: 3: -5: -3: -5 + (-3): w/ carry: This corresponds to -8 Ones-complement arithmetic: a negative integer −x is represented as the complement of x; When adding numbers in ones complement arithmetic, a carryout from the most significant bit needs to be added to the result. Sender and receiver need to get the same checksum Count: number of 16bit integers Buf: their 1’s complement Int * p =&a (points to 1 value) Int* p = a (a is also a pointer; int[] as) 0x – hexa decimal integers U_short is 32 bits U_long 8 bytes: 64 bits ( ) ( ) : 32 bits (FFFF); F = (1byte=8 bit)(lowest data handled by computer is byte) ( ) ( ): 32 bits (0000) FFFF0000 -> 32 bits of 1 and 32 bits of 0 Sum (32 bits) & (32bits of 1; 32 bits of 0) = 1 if sum has a carry bit Sum(32 bits) & (32 bits of 1) : get the sum bits Add 1; Return original number CSS 432

23 Cyclic Redundancy Check (CRC)
Reduce the number of extra bits and maximize protection Represent n-bit message as n-1 degree polynomial e.g., MSG= as M(x) = x7 + x4 + x3 + x1 Let k be the degree of some divisor polynomial e.g., C(x) = x3 + x2 + 1 Create P(x) from M(x) such that P(x) % C(x) = 0 T(x) = M(x) * x^k ; P(x) = T(x) – T(x) % C(x) Transmit P(x); sender and receiver know C(x) If P(x) % C (x) =0 at receiver; no transmission error

24 Modulo 2 arithmetic Modulo 2
Modulo 2 multiplication is no different than for decimal numbers, except that modulo 2 addition must be used when computing the final sum. 111 *101 111 (mul 111 by 1) 000 (mul 111 by 0) (mul 111 by 1) 11011 (perform XOR addition)

25 CRC (cont) Sender polynomial M(x) Noise polynomial E(x)
eor 1101 1001 1000 1011 1100 101 Sender polynomial M(x) M(x) = , C(x) = 1101, thus k = 3 T(x) = M(x) * x3 = (<< 3) T(x) % C(x) = 101 T(x) – T(x) % C(x) = = P(x) Noise polynomial E(x) Receiver polynomial P(x) + E(x) E(x) = 0 implies no errors (P(x) + E(x)) % C(x) == 0 if: E(x) was zero (no error), or E(x) is exactly divisible by C(x) To retrieve M(x): P(x)/ x3, (truncate the last 3 bits) Just appended The most significant bit (MSB) is the bit in a multiple-bit binary number with the largest value. (big endian) This is usually the bit farthest to the left, or the bit transmitted first in a sequence. For example, in the binary number 1000, the MSB is 1, and in the binary number 0111, the MSB is 0. The most significant byte, also abbreviated MSB, is the byte in a multiple-byte word with the largest value. As with bits, the MSB (byte) is normally the byte farthest to the left, or the byte transmitted first in a sequence CSS 432

26 CRC Calculation Using Shift Register
XOR C(x) = 1101 CRC x0 x1 x2 M(x) * x^k from left

27 CRC Calculation Using Shift Register
sender receiver M(x) * x^k CRC M(x) + CRC M(x) CRC’ P(x)% C(x) == 0 // CRC == CRC’, no errors x0 x1 x2 Example: M(x) = C(x) = 1101 1 1 000 01 1 1 1 000 0 1 1 101 will be transferred. 000 1 1 00 1 1 CSS 432

28 Reliable Transmission
The University of Adelaide, School of Computer Science 26 May 2018 Reliable Transmission CRC is used to detect errors. Some error codes are strong enough to correct errors. The overhead is typically too high. Corrupt frames must be discarded. A link-level protocol that wants to deliver frames reliably must recover from these discarded frames. Protocols use Acknowledgements and Timeouts Chapter 2 — Instructions: Language of the Computer

29 Reviews Exercises in Chapter 2
Encoding (NRZ, NRZI, Manchester, and 4B/5B) Framing (Sentinel and counter-based) Error Detections (Parity, Internet checksum, and CRC) Exercises in Chapter 2 Ex. 18 (CRC + draw the shift register) Ex. 19 (CRC + draw he shift register) CSS 432


Download ppt "Prof. Athirai Irissappane"

Similar presentations


Ads by Google