z Today y Finish cable modem y Cell
z. Today y. Finish cable modem y. Cell phones z. Start link layer! University of Delaware CPEG 419 1
TDM vs FDM TDM University of Delaware CPEG 419 2
Time Division Multiplexing (TDM) channel 1 channel 2 University of Delaware CPEG 419 channel n 3
FDM Channel 1 Channel 2 Channel n University of Delaware CPEG 419 4
Internet over Cable very high bandwidth (fiber) Head end coaxial A group of homes share the cable. (As oppose to DSL. ) The number of homes per group is around 500 -2000. fiber University of Delaware CPEG 419 5
Cable Spectrum Upstream 5 – 42 MHZ 108 MHz TVFM 550 MHz shopping HBO TV 750 MHz Downstream data 54 MHz 88 MHz Each TV channel gets its own frequency. This is called frequency multiplexing University of Delaware CPEG 419 6
Cable Modem z Why put downstream data at highend of spectrum? y When they made the system they put in amplifiers that could work at these high frequencies (why? ) y So the downstream was all set to go. But upstream amplifiers had to be installed. z Downstream data also uses FDM: 6 MHz or 8 MHz channel width with QAM-64 (what is the data rate? ) (This should be 6 Mbaud – 8 Mbaud) z But with overhead you only get 27 Mbps. z The upstream also uses FDM, but with QPSK (2 bits per symbol). University of Delaware CPEG 419 7
How fast is V 32? The phone system transmits 300 to 3400 Hz So what bandwidth can we use. How fast can we send symbols? We can send signals at 3100*2 = 6200 baud. We need to send signal two ways, so we can at most send 3100 baud. But there needs to be a guard band (so they don’t overlap). So 2400 baud is used. Use 2400 sample each way - duplex Definition: a duplex connection means that we can send data in both directions at the same time. A simplex or half-duplex connection only sends data in one direction at a time. So 2400 * 6 = 14400 bps What is the baud rate? V. 34 2400 baud - with 12 data bits/symbol V. 34 bis 2400 baud – with 14 data bits/symbol That’s the fastest there is! To get 56 K you send at 4000 baud (if the phone system can handle it) University of Delaware CPEG 419 8
DSL empty A total of 256 4 k. Hz channels so 8 k. Baud per channel Upstream downstream 25 k. Hz (channel 6) Voice POTS (stands for ? ) (channel 0) channel 6+32 250 parallel channels: Each data channel uses QAM 16 (with 1 parity bit). The quality of each channel is monitored and adjusted. So channels may transmit at different speeds What is the maximum data rate? University of Delaware CPEG 419 9
Cable modems z. On modem boot-up, the head-end tells the modem which channel (time and frequency) to use for upstream and downstream transmission. z. Many users may share the same channel. z. To share the same channel, cable uses time division multiplexing (TDM) and media access control (MAC). University of Delaware CPEG 419 10
Back to Cable z Downstream is easy. The head-end just transmits packets as it wants. Each packet has a label, so the modem can detect that the packet belongs to it. z Upstream is hard. y. The upstream channel is shared. y. TDM is used, but still each TDM slot is shared by many users. y. What happens if two users try to send upstream data on the same channel? University of Delaware CPEG 419 11
Cable: Upstream Media Access (link layer) z Time is divided into minislot. It is possible to transmit 8 bytes in one minislot. z The modem asks the headend if it can transmit a packet. z The headend responds with an acknowledgment and tells the modem which minislots it can use. z Problem: How can the modem sent the request without permission to use minislots? z Solution: on boot-up, the headend tells the modem which minislots it can use for requesting minislots and the headend never allocates these minislots for upstream data. z Problem: These special control minislots are shared by many users (why? ), so what happens if two users make a request at the same time? z Solution: If two users transmit at the same time, the signal cannot be understood by the headend and is ignored. Thus, no acknowledgement is made. The competing modems then wait a random amount of time and try again. It if fails again, then they wait a random amount of time again, but the maximum time they might wait is doubled. University of Delaware CPEG 419 12
Cable MAC (media access control ) modem sends a request for upstream minislots modem sends data upstream request for bandwidth minislots headend } minislot Headend gets request. Thinks about it. And sends acknowledgement with which minislots to use. data does not overlap with request minislot time University of Delaware CPEG 419 13
Cable MAC: Contention Two modems send request for bandwidth at the same time. The modems wait for the acknowledgement that will never arrive. The amount of time they wait is random. The headend can figure out what was transmitted and ignores it This time the red modem gets through. The blue modem tries again, but the green modem also sends a request. Now the blue doubles the maximum random amount of time it waits before sending another request. Green gets through University of Delaware CPEG 419 14
Cable vs. DSL z Cable could give higher bandwidth, but it might give less. It depends on the number of users. z If there are too many users in a group, the cable operator has to put in a fiber and headend. That cost money, so they try not to do it. z DSL can promise 1 Mbps down and 256 kbps up, and you will likely get it. z Note that sharing bandwidth is much more efficient than assigning each user a fixed chunk. z The telephone system is very reliable. When was the last time you picked up the phone and there was no dial tone (major earthquake or huge storm). Cable will go down when the power goes out. University of Delaware CPEG 419 15
Mobile Phone • One transmitter/receiver in each cell. • The base station transmit at very high power and has sensitive receivers. This way the cell phone can broadcast at low power and have a simply receiver. • The size of the cell depends on the transmitting power of the base station. • In first generation phones, there were 832 channels. Each channel was 30 k. Hz. (which kind of multiplexing? ) • Multipath reflections are a problem. • Each cell uses a different set of channels (why? ) • What to do if there are more users in a cell? A E C University of Delaware CPEG 419 D G F F B A E E C D G F 16
2 nd Generation Mobile Phones z Types of 2 nd generation phone systems: D-AMPS, GSM, CDMA and PDC. (PCS is second generation, but not a standard like these, just mean second generation) z All Digital z Phone is recorded by phone, converted to digital and compressed. The compressed signal (numbers) are sent to the base station. z Now a single 30 KHz channel can be shared by 3 users using TDM. from mobile to base 1850. 01 MHz from base to mobile 1930. 05 MHz 40 ms 1 2 3 4 5 6 1 slot: 324 bits 64 bits control 101 bits of error correction 159 bits of data University of Delaware CPEG 419 17
GSM z Widely used outside the US (but some here as well). z Similar to the D-AMPS, but much higher bandwidth, 200 k. Hz vs. 30 k. Hz. z There are 992 time slots. z Max data rate is 33. 854 kbps. After overhead and error correction, there is 13 kbs of speech data. z D-AMPS is 8 kbs of speech data. University of Delaware CPEG 419 18
CDMA – Code Division Multiple Access z Verizon and Sprint uses CDMA. AT&T uses D-AMPS. z D-AMPS and GSM use FDM and TDM. CDMA is totally different. And is the best. z All users transmit over the same frequencies at the same time!? ! z Idea: each phone uses a different code. z If you listen on the wrong code, it sounds like noise. If you listen on the right code it sounds like the right signal (with the other transmissions sounding like noise). University of Delaware CPEG 419 19
CDMA z Each bit is transmitted into m short time intervals called chips. z Each user has a unique m-bit chip sequence. z To send a 1, the user sends the sequence. To send a 0, the user sends the complement. A: -1 -1 -1 +1 +1 A (zero): +1 +1 +1 -1 -1 A (one): -1 -1 -1 +1 +1 University of Delaware CPEG 419 20
CDMA codes A: -1 -1 -1 +1 +1 B: -1 -1 +1 +1+1 -1 C: -1 +1 +1 +1 -1 -1 D: -1 +1 -1 Send: A=1, B=1, C=0, D=1 A(1): -1 -1 -1 +1 +1 B(1): -1 -1 +1 +1+1 -1 C(0): +1 -1 -1 -1 +1 +1 D(1): -1 +1 -1 -1 +1 – 1 Total: -2 – 2 0 -2 +4 0 received signal University of Delaware CPEG 419 21
CDMA Total: S = [-2 – 2 0 -2 +4 0] (S A)/8 =(-2*-1 + 0*-1 + -2*+1 + 0*+1 + -2*-1 + 4*+1 + 0*+1)/8 =(2+2 -2+2+4)/8=1 Idea: A, B, C and D are orthonormal set of vectors: orthogonal (A B)/8 = 0, (A C)/8 = 0, (A D)/8 = 0, (B C)/8 = 0, (B D)/8 = 0, (C d)/8 = 0, normalized (A A)/8 = 1, (B B)/8 = 1, (C C)/8 = 1, (D D)/8 = 1 University of Delaware CPEG 419 22
FDM Code is sin(wi t) Send code*Value. (e. g. , 14. 967384 sin (wi t)) Total sent signal = How to decode? The Fourier expansion is an orthogonal decomposition. Each channel sends one (or a few) elements in the decomposition. The Fourier transform can decompose the signal to get the components (channels). University of Delaware CPEG 419 23
3 G (third generation phones) z They expect ymore data than voice (we’ll see) y. Upper maximum data rates: 2 Mbps while stationary, 384 kbps while walking, and 144 kbps while driving. (we’ll see). y. High-quality voice transmission (never! – blade runner) y. Messaging (no sweat) y. Web surfing (ok) y. Multimedia (at 144 kbps? ) University of Delaware CPEG 419 24
3 G ideas z. Seamlessly move from cell to cell. Currently, when you leave a cell, you are dropped but the transmitter and quickly find a new one (maybe). z. GPRS (general packet radio service) Packet network over the network. University of Delaware CPEG 419 25
Packet Switched Network vs Circuit Switched Network z Circuit switched – each connection gets bandwidth (or time slot) and uses this at will (or not). The connection is maintained for the duration of the connection. z Packet switched – Every bit of data is clumped together (packet) and sent into a large network. The packet has an address that tells the network where the packet goes. University of Delaware CPEG 419 26
Circuit switched That piece of wire is yours for the call University of Delaware CPEG 419 27
Packet Switched z More efficient because bandwidth is not wasted. z But each packet has to have address (so less data). z Each node has to compete to get bandwidth. This can lead to inefficiencies. z Suited to data. But gets tricky for multimedia or real-time transmissions. z So 3 G will be mixed University of Delaware CPEG 419 28
Circuit Switched z. Inefficient y. Channel capacity dedicated for duration of connection y. If no data, capacity wasted z. Once a call starts, it will not be dropped. z. Set up (connection) takes time z. Once connected, transfer is transparent z. Developed for voice traffic (phone) University of Delaware CPEG 419 29
Data Link Layer z So far, sending signals over transmission medium. Suppose I can send data, then what? z Data link layer: responsible for error-free (reliable) communication between adjacent nodes. z Functions: framing, error control, flow control, addressing (in multipoint medium). Chapter 6 EE/CS 450 Fall 99 30
Flow Control z. What is it? y. Ensures that transmitter does not overrun receiver: limited receiver buffer space. y. Receiver buffers data to process before passing it up. y. If no flow control, receiver buffers may fill up and data may get dropped. University of Delaware CPEG 419 31
Stop-and-Wait z Simplest form of flow control. y. Transmitter sends frame and waits. y. Receiver receives frame and sends ACK. y. Transmitter gets ACK, sends other frame, and waits, until no more frames to send. z Good when few frames. z Problem: inefficient link utilization. y. In the case of high data rates or long propagation delays. University of Delaware CPEG 419 32
Sliding Window 1 z. Allows multiple frames to be in transit at the same time. z. Receiver allocates buffer space for n frames. z. Transmitter is allowed to send n (window size) frames without receiving ACK. z. Frame sequence number: labels frames. University of Delaware CPEG 419 33
Sliding Window 2 z. Receiver ack’s frame by including sequence number of next expected frame. z. Cumulative ACK: ack’s multiple frames. z. Example: if receiver receives frames 2, 3, and 4, it sends an ACK with sequence number 5, which ack’s receipt of 2, 3, and 4. University of Delaware CPEG 419 34
Sliding Window 3 z. Sender maintains sequence numbers it’s allowed to send; receiver maintains sequence number it can receive. These lists are sender and receiver windows. z. Sequence numbers are bounded; if frame reserves k-bit field for sequence numbers, then they can range from 0 … 2 k -1 and are modulo 2 k. University of Delaware CPEG 419 35
Sliding Window 4 z. Transmission window shrinks each time frame is sent, and grows each time an ACK is received. University of Delaware CPEG 419 36
Example: 3 -bit sequence number and window size 7 A B 0 1 2 3 4 5 6 7 0 1 2 3 4. . . 0123456701234 0 2 0123456701234 RR 3 0123456701234 1 RR 4 0123456701234 3 45 0 1 2 3 4 5 6 7 0 1 2 3 4 6 0123456701234 University of Delaware CPEG 419 37
Sliding Window (cont’d) z. RR n acknowledges up to frame n-1. z. There is also RNR n, which ack’s up to frame n-1 but no longer accepts more frames. z. RNR shuts down the receive window and consequently the transmission window. z. Need subsequent RR to re-open window. University of Delaware CPEG 419 38
Piggybacking z. When both endpoints transmit, each keeps 2 windows, transmitter and receiver windows. z. Each send data and need to send ACKs. z. When sending data, transmitter can “piggyback” the acknowledgment information. z. When no data, send just the ACK. University of Delaware CPEG 419 39
Duplicate ACKs z. When no data, must re-send last ACK. z. Duplicate ACKs: report potential errors. University of Delaware CPEG 419 40
Error Detection z. Transmission impairments lead to transmission errors: change of 1 or more bits in transmitted frame. z. Transmission errors defined using probabilities: transmission medium modeled as a statistical system. University of Delaware CPEG 419 41
Error Probabilities 1 z. Definitions: y. Pb probability of single bit error (bit error rate); constant and independent for each bit. y. P 1 probability frame received with no errors. y. P 2 probability frame received with 1 or more undetected errors. y. P 3 probability frame received with 1 or more detected bit errors, but no undetected ones. University of Delaware CPEG 419 42
Error Probabilities 2 z. If no error detection mechanism, P 3 = 0. z. P 1 = (1 - Pb)F and P 2 = (1 - P 1), where F is size of frame in bits. z. P 1 decreases as Pb increases. z. P 1 decreases as F increases. University of Delaware CPEG 419 43
Example z 64 -kbps ISDN channel’s bit error rate is less than 10 -6. User requirement of at most 1 frame with undetected bit error per day. Frame is 1000 bits. y. In a day, 5. 529 x 106 frames transmitted. y. Required frame error rate of 1/ 5. 529 x 106, or P 2 = 0. 18 x 10 -6. y. But Pb = 10 -6, so P 1 = (1 -Pb)F = 0. 999 and P 2 = 1 - P 1 = 10 -3, which is >>> required P 2 University of Delaware CPEG 419 44
Error Detection Schemes z. Transmitter adds additional bits for error detection. z. Transmitter computes error detection bits as function of original data. z. Receiver performs same calculation and compares results. If mismatch, then error. z. P 3 probability error detection scheme detects error; P 2 residual error rate or probability error goes undetected. University of Delaware CPEG 419 45
Parity z. Simplest error detection scheme. z. Append parity bit to data block. z. Example: ASCII transmission y 1 parity bit appended to each 7 -bit ASCII character. y. Even parity: 8 -bit code has even number of 1’s. y. Odd parity: 8 -bit code has odd number of 1’s. University of Delaware CPEG 419 46
Parity Check z. Example: transmitting ASCII “G” (1110001) using odd parity. y. Code transmitted is 11100011. y. Receiver checks received code and if odd number of 1’s, assumes no error. y. Suppose it receives 11000011, then detects error. y. NOTE: If more than 2 bits in error, may not be detected. University of Delaware CPEG 419 47
Cyclic Redundancy Check z. CRC is one of the most effective and common error detecting schemes. z. Let M be m-bit message, G (r+1)-bit pattern. y. Transmitter appends r 0’s to M, 2 r*M. y. Divide 2 r*M by G and add remainder to 2 r*M forming T (m+r bits), which is transmitted. y. Receiver computes T/G; if remainder, then error. University of Delaware CPEG 419 48
CRC Example z. Frame M 1010001101 = x 9+x 7+x 3+x 2+x 0. z. Pattern G 110101. z. Dividing (frame*25) by pattern results in 01110. z. Thus T 101000110101110. z. Receiver can detect errors unless received message Tr is divisible by G. University of Delaware CPEG 419 49
CRC z. Patterns are expressed as polynomials G(x). z. Example: y. CRC-16 = x 16+x 15+x 2+1 y. CRC-CCITT = X 16+x 12+x 5+1 University of Delaware CPEG 419 50
CRC-Based Detection z. If suitably selected polynomials, CRC can detect: y. All single-bit errors. y. All double-bit errors, as long as P(X) has at least three 1’s. y. Any odd number of errors as long as P(X) contains factor (X+1). y. Any burst error whose length is <= sizeof(FCS). University of Delaware CPEG 419 51
Error Control z. Mechanisms to detect and correct transmission errors. z. Consider 2 types of errors: y. Lost frame: frame is sent but never arrives. y. Damaged frame: frame arrives but in error. z. Error control: combination of error detection, feedback (ACK or NACK) from receiver, and retransmission by source. z. Coupled with flow control feedback. University of Delaware CPEG 419 52
ARQ z. ARQ: automatic repeat request. z. Works by creating a reliable data link from an unreliable one. z 3 versions: y. Stop-and-wait ARQ. y. Go-back-N ARQ. y. Selective-reject ARQ. University of Delaware CPEG 419 53
Stop-and-Wait ARQ z. Single outstanding frame at any time. z. Simple but inefficient. z. Use of timers to trigger retransmission of data or ACKs. z 2 types of errors: y Damaged or lost frame. y. Damaged or lost ACK. z. Sequence numbers alternate between 0 and 1. University of Delaware CPEG 419 54
Stop-and-Wait ARQ: Example Sender Frame 0 ACK 1 Frame 1 ACK 0 Frame 0 Receiver Timeout Frame 0 ACK 1 University of Delaware CPEG 419 B discards duplicate. 55
Go-Back-N ARQ z. Variation of sliding window for error control. z. Allows a window’s worth of frames to be in transit at any time. z. RR: ack’s receipt of frame. z. REJ: negative acknowledgment indicating the frame in error. z. Destination discards frame in error plus subsequent frames. University of Delaware CPEG 419 56
Go-Back-N ARQ Example S f 0 f 1 f 2 rr 3 R S Time out f 3 f 4 rr 4 f 5 f 6 Error f 7 rej 5 Discarded f 5 5, 6, 7 f 6 rexm. rr 6 f 7 University of Delaware CPEG 419 R f 7 f 0 rr 0 f 1 rr(P bit =1) rr 2 f 2 57
Go-Back-N ARQ Issues z. For k-bit sequence number, maximum window size is (2 k-1). y. If window size is too large, ACKs may be ambiguous: not clear if ACK is a duplicate ACK (errors occurred). y. Example: 3 -bit sequence number and 8 frame window. x. Source transmits f 0, gets back rr 1, then sends f 1 -f 0, and gets back another rr 1. ? ? ? University of Delaware CPEG 419 58
Selective-Reject ARQ z. Only frames transmitted are the ones that are NACK’ed (SREJ) or that timeout. z. More efficient than Go-Back-N regarding amount of re. Xmissions. z. But, receiver must buffer out-of-order frames. z. More restriction on maximum window size; for k-bit sequence #’s, 2 k-1 window. University of Delaware CPEG 419 59
Example Data Link Layer Protocol z. High-Level Data Link Control (HDLC) y. Widely-used (ISO standard). y. Single frame format. y. Synchronous transmission. University of Delaware CPEG 419 60
HDLC: Frame Format flag address control 8 bits 8 ext. 8 or 16 data variable FCS 16 or 32 y. Flag: frame delimiters (01111110). y. Address field for multipoint links. y 16 -bit or 32 -bit CRC. y. Refer to book (pages 176 -185) for more details. University of Delaware CPEG 419 flag 8 61
Other DLL Protocols 1 z. LAPB: Link Access Procedure, Balanced. y. Part of the X. 25 standard. y. Subset of HDLC. y. Link between user system and switch. y. Same frame format as HDLC. z. LAPD: Link Access Procedure, D-Channel. y. Part of the ISDN standard. University of Delaware CPEG 419 62
Other DLL Protocols 2 z. LLC: Logical Link Control. y. Part of the 802 protocol family for LANs. y. Link control functions divided between the MAC layer and the LLC layer. y. LLC layer operates on top of MAC layer. Dst. MAC control addr Src. MAC addr Dst. Src. LLC Data LLC ctl. addr University of Delaware CPEG 419 FCS 63
Other DLL Protocols 3 z. SLIP: Serial Line IP y. Dial-up protocol. y. No error control. y. Not standardized. z. PPP: Point-to-Point Protocol y. Internet standard for dial-up connections. y. Provides framing similar to HDLC. University of Delaware CPEG 419 64
Multiplexing . . . University of Delaware CPEG 419 DEMUX . . . MUX z. Sharing a link/channel among multiple source-destination pairs. z. Example: high-capacity long-distance trunks (fiber, microwave links) carry multiple connections at the same time. 65
Multiplexing Techniques z 3 basic types: y. Frequency-Division Multiplexing (FDM). y. Time-Division Multiplexing (TDM). y. Statistical Time-Division Multiplexing (STDM). University of Delaware CPEG 419 66
FDM 1 z. High bandwidth medium when compared to signals to be transmitted. z. Widely used (e. g. , TV, radio). z. Various signals carried simultaneously where each one modulated onto different carrier frequency, or channel. z. Channels separated by guard bands (unused) to prevent interference. University of Delaware CPEG 419 67
FDM 2 University of Delaware CPEG 419 68
TDM 1 z. TDM or synchronous TDM. z. High data rate medium when compared to signals to be transmitted. University of Delaware CPEG 419 69
TDM 2 z. Time divided into time slots. z. Frame consists of cycle of time slots. z. In each frame, 1 or more slots assigned to a data source. U 1 U 2. . . 1 2. . . UN N 1 2 . . . N Time frame University of Delaware CPEG 419 70
TDM 3 z. No control info at this level. z. Flow and error control? y. To be provided on a per-channel basis. y. Use DLL protocol such as HDLC. z. Examples: SONET (Synchronous Optical Network) for optical fiber. z+’s: simple, fair. z-’s: inefficient. University of Delaware CPEG 419 71
Statistical TDM 1 z. Or asynchronous TDM. z. Dynamically allocates time slots on demand. z. N input lines in statistical multiplexer, but only k slots on TDM frame, where k < n. z. Multiplexer scans input lines collecting data until frame is filled. z. Demultiplexer receives frame and distributes data accordingly. University of Delaware CPEG 419 72
STDM 2 z. Data rate on mux’ed line < sum of data rates from all input lines. z. Can support more devices than TDM using same link. z. Problem: peak periods. y. Solution: multiplexers have some buffering capacity to hold excess data. y. Tradeoff data rate and buffer size (response time). University of Delaware CPEG 419 73
- Slides: 73