Presentation is loading. Please wait.

Presentation is loading. Please wait.

1 Link Layer: MAC and Summary 11/30/2009. Admin. r Exam 2 m Covers network and link layers m Format similar to exam 1; see samples of exam 2 from past.

Similar presentations


Presentation on theme: "1 Link Layer: MAC and Summary 11/30/2009. Admin. r Exam 2 m Covers network and link layers m Format similar to exam 1; see samples of exam 2 from past."— Presentation transcript:

1 1 Link Layer: MAC and Summary 11/30/2009

2 Admin. r Exam 2 m Covers network and link layers m Format similar to exam 1; see samples of exam 2 from past offerings 2

3 3 Recap: Link Layer Services r Framing o encapsulate datagram into frame, adding header, trailer and error detection/correction (e.g., CRC) r Multiplexing/demultiplexing o frame headers to identify src, dest different from IP address (ARP) !  Flow control  Link media access control (MAC)  Reliable delivery between adjacent nodes

4 4 Recap: MAC Protocols Goals r efficient, fair, decentralized, simple Three broad classes: r channel partitioning m divide channel into smaller “pieces” (time slot, frequency, code) r Non-partitioning m random access allow collisions m “taking-turns” a token coordinates shared access to avoid collisions

5 5 Recap: Channel Partitioning TDMA: Time Division Multiple Access FDMA: Frequency Division Multiple Access CDMA: Code Division Multiple Access m Used mostly in wireless broadcast channels (cellular, satellite, etc) m Unique “code” assigned to each user; i.e., code set partitioning m All users share same frequency, but each user m has its own “chipping” sequence (i.e., code) c m to encode data e.g. c m = 1 1 1 -1 1 -1 -1 -1

6 6 Recap: CDMA r Each user uses its own code c m r Assume original data are represented by 1 and -1 r Encoded signal = (original data) modulated by (chipping sequence) m assume c m = 1 1 1 -1 1 -1 -1 -1 m if data is d, send d c m, if data d is 1, send c m if data d is -1 send -c m r Decoding: inner-product (summation of bit-by-bit product) of encoded signal and chipping sequence m if inner-product > 0, the data is 1; else -1 r If codes are orthogonal, multiple users can “coexist” and transmit simultaneously with minimal interference

7 7 Recap: Channel Partitioning r Two codes C i and C j are orthogonal, if m, where we use “.” to denote inner product, e.g. r If codes are orthogonal, multiple users can “coexist” and transmit simultaneously with minimal interference C 1 : 1 1 1 -1 1 -1 -1 -1 C 2 : 1 -1 1 1 1 -1 1 1 ----------------------------------------- C 1. C 2 = 1 +(-1) + 1 + (-1) +1 + 1+ (-1)+(-1)=0

8 8 Outline r Recap r Non-partitioning MAC protocols m Random access m Taking turns (we will not cover in class)

9 9 Random Access Protocols r When a node has packets to send m transmit at full channel data rate R m no a priori coordination among nodes r Two or more transmitting nodes -> “collision” r Random access MAC protocol specifies: m how to detect collisions m how to recover from collisions r Examples of random access MAC protocols: m slotted ALOHA and pure ALOHA m CSMA and CSMA/CD, CSMA/CA

10 10 Slotted Aloha [Norm Abramson] r Time is divided into equal size slots (= pkt trans. time) r Node with new arriving pkt: transmit at beginning of next slot r If collision: retransmit pkt in future slots with probability p, until successful. Success (S), Collision (C), Empty (E) slots

11 11 Slotted Aloha Efficiency Q: What is the fraction of successful slots? suppose n stations have packets to send suppose each transmits in a slot with probability p - prob. of succ. by a specific node: p (1-p) (n-1) - prob. of succ. by any one of the N nodes S(p) = n * Prob (only one transmits) = n p (1-p) (n-1)

12 12 Goodput vs. Offered Load S = throughput = “goodput” (success rate) G = offered load = np 0.51.0 1.5 2.0 Slotted Aloha r when p n < 1, as p (or n) increases m probability of empty slots reduces m probability of collision is still low, thus goodput increases r when p n > 1, as p (or n) increases, m probability of empty slots does not reduce much, but m probability of collision increases, thus goodput decreases r goodput is optimal when p n = 1

13 13 Maximum Efficiency vs. n 1/e = 0.37 At best: channel use for useful transmissions 37% of time!

14 14 Pure (unslotted) Aloha r Unslotted Aloha: simpler, no clock synchronization r Whenever pkt needs transmission: m send without awaiting for the beginning of slot r Collision probability increases: m pkt sent at t 0 collide with other pkts sent in [t 0 -1, t 0 +1]

15 15 Pure Aloha (cont.) Assume a node transmit with probability p in one unit of time P(success by a given node) = P(node transmits) * P(no other node transmits in [t 0 -1,t 0 ] * P(no other node transmits in [t 0, t 0 +1] = p. (1-p) n-1. (1-p) n-1 = p. (1-p) 2(n-1) P(success by any of N nodes) = n p. (1-p) 2(n-1) - Bound: 1/(2e) =.18

16 16 Goodput vs. Offered Load S = throughput = “goodput” (success rate) G = offered load = Np 0.51.0 1.5 2.0 0.1 0.2 0.3 0.4 Pure Aloha protocol constrains effective channel throughput! Slotted Aloha

17 17 Dynamics of (Slotted) Aloha r In reality, the number of stations backlogged is changing m we need to study the dynamics when using a fixed transmission probability p r Assume we have a total of m stations (the machines on a LAN): m n of them are currently backlogged, each tries with a (fixed) probability p m the remaining m-n stations are not backlogged. They may start to generate packets with a probability p a, where p a is much smaller than p

18 18 Model n backlogged each transmits with prob. p m-n: unbacklogged each transmits with prob. p a

19 19 Dynamics of Aloha: Effects of Fixed Probability n: number of backlogged stations 0 m successful transmission rate at offered load np + (m-n)p a new arrival rate: (m-n) p a desirable stable point undesirable stable point Lesson: if we fix p, but n varies, we may have an undesirable stable point offered load = 1 - assume a total of m stations - p a << p - success rate is the departure rate, the rate the backlog is reducing dep. and arrival rate of backlogged stations

20 20 Summary of Problems of Aloha Protocols r Problems m slotted Aloha has better efficiency than pure Aloha but clock synchronization is hard to achieve m Aloha protocols have low efficiency due to waste of collision or empty slots when offered load is optimal (p = 1/N), the goodput is about 37% when the offered load is not optimal, the goodput is even lower m undesirable steady state at a fixed transmission rate, when the number of backlogged stations varies r Thus problems to be addressed: m approximate slotted Aloha without clock synchronization m reduce the penalty of collision or empty slots m infer optimal transmission rate

21 21 CSMA: Carrier Sense Multiple Access CSMA: listen before transmit Objective: approximate slotted Aloha (compared with pure Aloha) r If backlogged, wait until channel sensed idle, then transmit pkt with prob. p r human analogy: don’t interrupt others !

22 22 CSMA Collisions collisions can still occur: propagation delay means two nodes may not hear each other’s transmission Collision: entire packet transmission time wasted; still not very efficient! spatial layout of nodes along Ethernet A BC D time t0t0

23 23 CSMA/CD (Collision Detection) r Human analogy: the polite conversationalist CSMA/CD: m observations: collisions can be detected within short time if colliding transmissions are aborted, we can reduce channel wastage m carrier sensing, deferral as in CSMA m collision detection: easy in wired LANs: measure signal strengths, compare transmitted, received signals difficult in wireless LANs: receiver shuts off while transmitting

24 24 spatial layout of nodes along Ethernet A BC D time t0t0 spatial layout of nodes along Ethernet A BC D time t0t0 B detects collision, aborts D detects collision, aborts CSMA/CD: Collision Detection instead of wasting the whole packet transmission time, abort after detection.

25 25 Efficiency of CSMA/CD r Given collision detection, instead of wasting the whole packet transmission time (a slot), we waste only the time needed to detect collision. r Use a contention slot of 2 T, where T is one-way propagation delay (why 2 T ?) r When the transmission probability p is approximately optimal (p = 1/N), we try approximately e times before each successful transmission P/C P: packet size, e.g. 1000 bits C: link capacity, e.g. 10Mbps

26 26 Efficiency of CSMA/CD r The efficiency (the percentage of useful time) is approximately r The value of a plays a fundamental role in the efficiency of CSMA/CD protocols. r Question: you want to increase the capacity of a link layer technology (e.g.,, 10 Mbps Ethernet to 100 Mbps), but still want to maintain the same efficiency, what can you do?

27 27 Summary of Problems to be Addressed  Approximate slotted Aloha  Reduce the penalty of collision or empty slots  Infer optimal transmission rate

28 28 The Basic MAC Mechanisms of Ethernet get a packet from upper layer; K := 0; n := 0; // K: control wait time; n: no. of collisions repeat: wait for K * 512 bit-time; while (network busy) wait; wait for 96 bit-time after detecting no signal; transmit and detect collision; if detect collision stop and transmit a 48-bit jam signal; n ++; m:= min(n, 10), where n is the number of collisions choose K randomly from {0, 1, 2, …, 2 m -1}. if n < 16 goto repeat else give up

29 29 Ethernet’s Exponential Backoff: Goal: adapt retransmission attempts to estimated current load m compared with CSMA, 1/2 m can be considered as p m not a static p---adjusted using exponential backoff first collision: choose K from {0,1}; delay is K x 512 bit transmission times after second collision: choose K from {0,1,2,3}… after ten or more collisions, choose K from {0,1,2,3,4,…,1023}

30 30 Ethernet “Dominant” LAN technology: r First widely used LAN technology r Kept up with speed race: 10 Mbps, 100 Mbps, 1 Gbps, 10 Gbps Metcalfe’s Ethernet sketch

31 31 Ethernet Frame Structure Sending adapter encapsulates IP datagram (or other network layer protocol packet) in Ethernet frame r Preamble: 8 bytes m 7 bytes with pattern 10101010 followed by one byte with pattern 10101011 (why the preamble?) r Source and dest. addresses: 6 bytes r Type: indicates the higher layer protocol, mostly IP but others may be supported such as Novell IPX and AppleTalk r CRC: CRC-32 checked at receiver, if error is detected, the frame is simply dropped 8 66 2 46-1500 (including padding) 4

32 Physical Layer 32

33 Internet Bandwidth Growth Source: TeleGeograph Research

34 What Determines Transmission Rate? r Service: transmit a bit stream from a sender to a receiver Encoding channel Decoding output bit stream input bit stream sender receiver Question to be addressed: how much can we send through the channel ?

35 Basic Theory: Channel Capacity r The maximum number of bits that can be transmitted per second (bps) by a physical media is: where W is the frequency range, S/N is the signal noise ratio. We assume Gaussian noise.

36 Fourier Transform r Suppose the period of a data unit is f (=1/T), then the data unit can be represented as the sum of many harmonics (sin(), cos()) with frequencies f, 2f, 3f, 4f, … r A reasonably behaved periodic function g(t), with minimal period T, can be constructed as the sum of a series of sines and cosines:

37 char “b”

38 Signal Attenuation r The quality of signal will degrade when it travels m loss, frequency passing

39 Frequency Dependent Attenuation r The received signal will be distorted even when there is no interference and the transmitted signal is “perfect” square waveform Example: Voltage- attenuation magnitude ratios of Category 5 cable. For example, 500 feet of cable attenuates a 10-MHz, 1-V signal to 0.32 V, which corresponds to about –9.90 dB (= 20 log 1/0.32)

40 Example Example: W=3000Hz, S/N  4000 telephone network sender modem Modem Modulation (digit->analog) 3Khz bandwidth (add white noise) ISP demodulation output bit stream input bit stream Analog to Digital quantization for transmitting through the digital telephone backbone ISP modem V.34 (33.6kbps Dialup Modem) channel

41 Example: ADSL r Spectrum allocation: divided into a total of 256 downstream and 32 upstream tones, where each tone is a standard 4kHz voice channel r During initial negotiation, a tone is used only if the S/N is above 6 db (  4)

42 Course Summary r The Internet is a general-purpose, large-scale, distributed computer network r Major design features m packet switching for simplicity and efficiency m hour-glass architecture m end-to-end principle m distributed system considering social/economical structures m resource allocation principle and framework (e.g., optimization framework and AIMD) m stable, adaptive control (e.g., sliding window self clocking, CSMA/CD/Expo) m hierarchical, distributed routing

43 Evolution r Driven by Technology, Infrastructure, Policy, Applications, and Understanding: m technology e.g., wireless/optical communication technologies and device miniaturization (sensors) m infrastructure e.g., cloud computing m applications e.g., content distribution, game, tele presence, sensing, grid computing, VoIP, IPTV m understanding e.g., resource sharing principle, routing principles, mechanism design, and optimal stochastic control (randomized access)

44 Many Issues r How to make it faster r How to make it more efficient r How to make it more reliable/robust/secure 44

45 Faster 45

46 The Wire: Fiber r A look at a fiber r How it works? A graded index fiber

47 The Wire: Fiber r Wide spectrum at low loss: ~0.3db/km (c.f. copper ~190db/km @100Mhz), 30-100km without repeater r Bandwidth of a single fiber m theoretical: 100-200Tbps http://www.trnmag.com/Stories/080101/ Study_shows_fiber_has_room_to_grow_ 080101.html r Lightweight: 33 tons of copper to transmit the same amount of information carried by ¼ pound of optical fiber

48 Advantages of Fibers

49 How to Do Switching? r Optical-Electrical-Optical r Optical switch: optical micro-electro-mechanical systems (MEMS) Optical path One optical switch http://www.qwest.com/largebusiness/enterprisesolutions/networkMaps/preloader.swf

50 Example: MEMS Optical Switch r Using mirrors, e.g. Lambda Router

51 Implications  Fine-grained switching may not be feasible  What is the architecture of optical networks: packet switching, circuit switching, or others?

52 More Efficient 52

53 r Large deployment of highly adaptive, multipoint applications r An iterative process between two sets of adaptation: m ISP: traffic engineering to change routing to shift traffic away from higher utilized links current traffic pattern  new routing matrix m App: direct traffic to better performing end points current routing matrix  new traffic pattern Problem: Inefficient Interactions

54 ISP optimizer interacts poorly with App. ISP Traffic Engineering+ App Latency Optimizer -red: App adjust alone; fixed ISP routing -blue: ISP traffic engineering adapt alone; fixed App communications

55 The Fundamental Problem r Traditional Internet architectural feedback to application efficiency is limited: m routing (hidden) m rate control through coarse-grained TCP congestion feedback r To achieve better efficiency, needs explicit communications between network resource providers and applications

56 P4P Framework – Design Goals r Performance improvement r Scalability and extensibility: support diverse ISP objectives and applications scenarios in large networks r Privacy preservation r Ease of implementation r Open standard: any ISP, provider, applications can easily implement it

57 Current Status r P4P-WG r Next step m wider integration m IETF standard AT&T Bezeq Intl BitTorrent CacheLogic Cisco Systems Grid Networks Joost LimeWire Manatt Oversi Pando Networks PeerApp Telefonica Group VeriSign Verizon Vuze Univ of Washington Yale University Abacast AHT Intl Akamai Alcatel Lucent CableLabs Cablevision Comcast Cox Comm Juniper Networks Microsoft MPAA NBC Universal Nokia RawFlow Solid State Networks Thomson Time Warner Cable Turner Broadcasting

58 Reliability

59 Is the Internet Reliable? r A key design objective of the “Internet” (i.e., packet-switched networks) is robustness r Does the Internet infrastructure achieve the target reliability objective of a highly reliable system (99.999%)?

60 Perspective r 911 Phone service (1993 NRIC report +) m 29 minutes per year per line m 99.994% availability r Std. Phone service (various sources) m 53+ minutes per line per year m 99.99+% availability r …what about the Internet? m Various studies: about 99.5% m Need to reduce down time by 500 times to achieve five nines; 50 times to match phone service

61 Unreachable Networks: 10 days

62 Internet Disaster Recovery Response r Why slow response? m the cable repairing is slow: not until 21 days after quake m BGP is not designed to create business relationship r Objective m a meta-BGP to facilitate discovery and creation of BGP business relationship

63 63

64 Backup Slides 64

65 The P4P Framework r Data plane r control plane m P4P server: a portal for each network service provider m A P4P server provides multiple interfaces so that others can interact each provider decides the interfaces it provides

66 The Virtual Topology Interface r An interface to guide peer selection r An interface as an optimization decomposition interface m guidance through “virtual costs”

67 The Virtual Topology Interface: Network r PID: set of Points of Presence (PoP) r E: set of links connecting PoPs r c e : the link capacity of link e r I e (i, j): indicator if link e is on the route from PoP i to PoP j r b e : amount of background traffic on link e

68 The Virtual Topology Interface: App r Assume K applications running inside the ISP r Let T k be the set of acceptable demands for app k m t k in T k specifies traffic demand t k ij from each pair of source-destination PoPs (i,j)

69 The Virtual Topology Interface r Consider an example: ISP wants to minimize utilization of the highest utilized link m the utilization of the highest utilized link is called the Maximum Link Utilization (MLU)

70 ISP MLU: Transformation

71 ISP MLU: Dual r Introducing p e (≥ 0) for the inequality of each link e r To make the dual finite, need

72 ISP MLU: Dual r Then the dual is where p ij is the sum of p e along the path from PoP i to PoP j

73 ISP MLU Dual : Interpretation r Each App k chooses t k in T k to minimize weighted sum of t ij r The interface between an App and the ISP is the “shadow prices” {p ij }

74 Topology with Costs (Illustration) PID1PID2 PID3PID6 PID5PID4 70 20 30 10 60 Each PID has: IP “prefix” Each link has “Price” Prices are directional

75 ISP Update r At update m+1, calculates

76 App Operations r Each app. optimizes its own performance, then picks ISP-friendly peering r For example, selects where  is tolerance, say 80%.

77 Example: Multihoming Multihoming m A common way of connecting to Internet Smart routing m Intelligently distribute traffic among multiple external links m Improve performance m Improve reliability  Reduce cost User ISP 1 ISP K Internet ISP 2

78 Interdomain Topo PID1PID2 PID3PID6 PID5PID4 70 20 30 10 60 Provider1 Provider 2 Provider 3 Cost?

79 Integrating Cost Min with P4P

80 Field Test: Traffic within Verizon

81 Average Hop Each Bit Traverses r Why less than 1: many transfers are in the same metro-area; also same metro-area peers are utilized more by tit-for-tat.

82 App Perspective: App Rates


Download ppt "1 Link Layer: MAC and Summary 11/30/2009. Admin. r Exam 2 m Covers network and link layers m Format similar to exam 1; see samples of exam 2 from past."

Similar presentations


Ads by Google