1 link layer: mac and summary 11/30/2009. admin. r exam 2 m covers network and link layers m format...

Post on 16-Jan-2016

215 Views

Category:

Documents

2 Downloads

Preview:

Click to see full reader

TRANSCRIPT

1

Link Layer: MAC and Summary

11/30/2009

Admin.

Exam 2 Covers network and link layers Format similar to exam 1; see samples of

exam 2 from past offerings

2

3

Recap: Link Layer Services Framing

o encapsulate datagram into frame, adding header, trailer and error detection/correction (e.g., CRC)

Multiplexing/demultiplexingo frame headers to identify src, dest

• different from IP address (ARP) ! Flow control Link media access control (MAC) Reliable delivery between adjacent nodes

4

Recap: MAC Protocols

Goals efficient, fair, decentralized, simple

Three broad classes: channel partitioning

divide channel into smaller “pieces” (time slot, frequency, code)

Non-partitioning random access

• allow collisions “taking-turns”

• a token coordinates shared access to avoid collisions

5

Recap: Channel Partitioning

TDMA: Time Division Multiple AccessFDMA: Frequency Division Multiple

AccessCDMA: Code Division Multiple Access

Used mostly in wireless broadcast channels (cellular, satellite, etc)

Unique “code” assigned to each user; i.e., code set partitioning

All users share same frequency, but each user m has its own “chipping” sequence (i.e., code) cm to encode data

• e.g. cm = 1 1 1 -1 1 -1 -1 -1

6

Recap: CDMA

Each user uses its own code cm

Assume original data are represented by 1 and -1 Encoded signal = (original data) modulated by

(chipping sequence) assume cm = 1 1 1 -1 1 -1 -1 -1

if data is d, send d cm,

• if data d is 1, send cm

• if data d is -1 send -cm

Decoding: inner-product (summation of bit-by-bit product) of encoded signal and chipping sequence if inner-product > 0, the data is 1; else -1

If codes are orthogonal, multiple users can “coexist” and transmit simultaneously with minimal interference

7

Recap: Channel Partitioning

Two codes Ci and Cj are orthogonal, if , where we use “.” to denote inner

product, e.g.

If codes are orthogonal, multiple users can “coexist” and transmit simultaneously with minimal interference

0 ij cc

C1: 1 1 1 -1 1 -1 -1 -1 C2: 1 -1 1 1 1 -1 1 1-----------------------------------------C1 . C2 = 1 +(-1) + 1 + (-1) +1 + 1+ (-1)+(-1)=0

8

Outline

Recap Non-partitioning MAC protocols

Random access Taking turns (we will not cover in class)

9

Random Access Protocols

When a node has packets to send transmit at full channel data rate R no a priori coordination among nodes

Two or more transmitting nodes -> “collision”

Random access MAC protocol specifies: how to detect collisions how to recover from collisions

Examples of random access MAC protocols: slotted ALOHA and pure ALOHA CSMA and CSMA/CD, CSMA/CA

10

Slotted Aloha [Norm Abramson]

Time is divided into equal size slots (= pkt trans. time)

Node with new arriving pkt: transmit at beginning of next slot

If collision: retransmit pkt in future slots with probability p, until successful.

Success (S), Collision (C), Empty (E) slots

11

Slotted Aloha EfficiencyQ: What is the fraction of successful

slots?suppose n stations have packets to sendsuppose 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

Goodput vs. Offered LoadS =

thro

ughput

=

“goodput”

(

succ

ess

rate

)

G = offered load = np0.5 1.0 1.5 2.0

Slotted Aloha

when p n < 1, as p (or n) increases probability of empty slots reduces probability of collision is still low, thus goodput increases

when p n > 1, as p (or n) increases, probability of empty slots does not reduce much, but probability of collision increases, thus goodput decreases

goodput is optimal when p n = 1

13

Maximum Efficiency vs. n

0

0.05

0.1

0.15

0.2

0.25

0.3

0.35

0.4

2 7 12 17 n

ma

xim

um

eff

icie

nc

y1/e = 0.37

At best: channeluse for useful transmissions 37%of time!

14

Pure (unslotted) Aloha Unslotted Aloha: simpler, no clock

synchronization Whenever pkt needs transmission:

send without awaiting for the beginning of slot

Collision probability increases: pkt sent at t0 collide with other pkts sent in [t0-1,

t0+1]

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 [t0-1,t0]

* P(no other node transmits in [t0,

t0+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

Goodput vs. Offered LoadS =

thro

ughput

=

“goodput”

(

succ

ess

rate

)

G = offered load = Np0.5 1.0 1.5 2.0

0.1

0.2

0.3

0.4

Pure Aloha

protocol constrainseffective channelthroughput!

Slotted Aloha

17

Dynamics of (Slotted) Aloha

In reality, the number of stations backlogged is changing we need to study the dynamics when using a

fixed transmission probability p

Assume we have a total of m stations (the machines on a LAN): n of them are currently backlogged, each tries

with a (fixed) probability p the remaining m-n stations are not backlogged.

They may start to generate packets with a probability pa, where pa is much smaller than p

18

Modeln backlogged

each transmits with prob. p

m-n: unbacklogged

each transmits with prob. pa

19

Dynamics of Aloha: Effects of Fixed Probability

n: number of backlogged stations

0 m

successful transmission rate at

offered load np + (m-n)pa

new arrival rate:(m-n) pa

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 ofm stations- pa << p- success rate is thedeparture rate, the rate the backlog is reducing

dep.andarrivalrateofbackloggedstations

20

Summary of Problems of Aloha Protocols Problems

slotted Aloha has better efficiency than pure Aloha but clock synchronization is hard to achieve

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

undesirable steady state at a fixed transmission rate, when the number of backlogged stations varies

Thus problems to be addressed: approximate slotted Aloha without clock

synchronization reduce the penalty of collision or empty slots infer optimal transmission rate

21

CSMA: Carrier Sense Multiple Access

CSMA: listen before transmitObjective: approximate slotted Aloha (compared

with pure Aloha)

If backlogged, wait until channel sensed idle, then transmit pkt with prob. p

human analogy: don’t interrupt others !

22

CSMA Collisions

collisions can still occur:propagation delay means two nodes may nothear each other’s transmission

Collision:entire packet transmission time wasted; still not veryefficient!

spatial layout of nodes along EthernetA B C D

tim

e

t0

23

CSMA/CD (Collision Detection) Human analogy: the polite conversationalist

CSMA/CD: observations:

• collisions can be detected within short time• if colliding transmissions are aborted, we can reduce

channel wastage carrier sensing, deferral as in CSMA collision detection:

• easy in wired LANs: measure signal strengths, compare transmitted, received signals

• difficult in wireless LANs: receiver shuts off while transmitting

24

spatial layout of nodes along EthernetA B C D

tim

e

t0

spatial layout of nodes along EthernetA B C D

tim

e

t0

B detectscollision, aborts

D detectscollision,aborts

CSMA/CD: Collision Detection

instead of wasting the whole packettransmission time, abort after detection.

25

Efficiency of CSMA/CD Given collision detection, instead of wasting the

whole packet transmission time (a slot), we waste only the time needed to detect collision.

Use a contention slot of 2 T, where T is one-way propagation delay (why 2 T ?)

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 bitsC: link capacity, e.g. 10Mbps

26

Efficiency of CSMA/CD The efficiency (the percentage of useful time) is

approximately

The value of a plays a fundamental role in the efficiency of CSMA/CD protocols.

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?

PTC

aTea

CPT

CP

CP

where,511

11

2 5

27

Summary of Problems to be Addressed

Approximate slotted Aloha

Reduce the penalty of collision or empty slots

Infer optimal transmission rate

28

The Basic MAC Mechanisms of Ethernet

get a packet from upper layer;K := 0; n := 0; // K: control wait time; n: no. of

collisionsrepeat: 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, …, 2m-1}. if n < 16 goto repeat else give up

29

Ethernet’s Exponential Backoff:

Goal: adapt retransmission attempts to estimated current load compared with CSMA, 1/2m can be considered

as p 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

Ethernet

“Dominant” LAN technology: First widely used LAN

technology Kept up with speed race: 10 Mbps, 100 Mbps,

1 Gbps, 10 Gbps

Metcalfe’s Ethernetsketch

31

Ethernet Frame Structure

Sending adapter encapsulates IP datagram (or other network layer protocol packet) in Ethernet frame

Preamble: 8 bytes 7 bytes with pattern 10101010 followed by one byte with

pattern 10101011 (why the preamble?) Source and dest. addresses: 6 bytes Type: indicates the higher layer protocol, mostly IP but

others may be supported such as Novell IPX and AppleTalk

CRC: CRC-32 checked at receiver, if error is detected, the frame is simply dropped

8 6 6 2 46-1500 (including padding) 4

Physical Layer

32

Internet Bandwidth Growth

Source: TeleGeograph Research

What Determines Transmission Rate?

Service: transmit a bit stream from a sender to a receiver

Encodingchannel

Decodingoutput bit stream

input bit stream

sender receiver

Question to be addressed: how much can we send through the channel ?

Basic Theory: Channel Capacity 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.

)1(log2 NSW

Fourier Transform

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, …

A reasonably behaved periodic function g(t), with minimal period T, can be constructed as the sum of a series of sines and cosines:

11

21 )2cos()2sin()(

nn

nn nftbnftactg

dtnfttgb

dtnfttga

dttgc

Tf

T

Tn

T

Tn

T

T

)2cos()(

)2sin()(

)(

/1

0

2

0

2

0

2

nnn barms char “b”

Signal Attenuation

The quality of signal will degrade when it travels loss, frequency passing

)1(log2 NSW

Frequency Dependent Attenuation 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)

Example

Example: W=3000Hz, S/N 4000

kbpsbandwidth 36)40001(log3000max 2

telephone networksender modem

ModemModulation

(digit->analog)

3Khz bandwidth(add white noise)

ISPdemodulation

output bit stream

input bit stream

Analog to Digital quantization

for transmitting throughthe digital telephone

backbone

ISP modem

V.34 (33.6kbps Dialup Modem)

channel

Example: ADSL Spectrum allocation:

divided into a total of 256 downstream and 32 upstream tones, where each tone is a standard 4kHz voice channel

During initial negotiation, a tone is used only if the S/N is above 6 db (4)

kbpsup

Mbpsdown

297)41(log4000*32

4.2)41(log4000*256

2

2

Course Summary

The Internet is a general-purpose, large-scale, distributed computer network

Major design features packet switching for simplicity and efficiency hour-glass architecture end-to-end principle distributed system considering social/economical structures

resource allocation principle and framework (e.g., optimization framework and AIMD)

stable, adaptive control (e.g., sliding window self clocking, CSMA/CD/Expo)

hierarchical, distributed routing

Evolution Driven by Technology, Infrastructure, Policy,

Applications, and Understanding: technology

• e.g., wireless/optical communication technologies and device miniaturization (sensors)

infrastructure• e.g., cloud computing

applications• e.g., content distribution, game, tele presence, sensing, grid

computing, VoIP, IPTV understanding

• e.g., resource sharing principle, routing principles, mechanism design, and optimal stochastic control (randomized access)

Many Issues

How to make it faster

How to make it more efficient

How to make it more reliable/robust/secure

44

Faster

45

The Wire: Fiber

A look at a fiber

How it works?

A graded index fiber

The Wire: Fiber

Wide spectrum at low loss: ~0.3db/km (c.f. copper ~190db/km @100Mhz), 30-100km without repeater

Bandwidth of a single fiber theoretical: 100-200Tbps

http://www.trnmag.com/Stories/080101/Study_shows_fiber_has_room_to_grow_080101.html

Lightweight: 33 tons of copper to transmit the same amount of information carried by ¼ pound of optical fiber

Advantages of Fibers

How to Do Switching?

Optical-Electrical-Optical Optical switch: optical micro-electro-mechanical systems

(MEMS)

Optical path One optical switch

http://www.qwest.com/largebusiness/enterprisesolutions/networkMaps/preloader.swf

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

Implications

Fine-grained switching may not be feasible

What is the architecture of optical networks: packet switching, circuit switching, or others?

More Efficient

52

Large deployment of highly adaptive, multipoint applications

An iterative process between two sets of adaptation: ISP: traffic engineering to change routing

to shift traffic away from higher utilized links

• current traffic pattern new routing matrix

App: direct traffic to better performing end points

• current routing matrix new traffic pattern

Problem: Inefficient Interactions

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

The Fundamental Problem Traditional Internet architectural feedback

to application efficiency is limited: routing (hidden) rate control through coarse-grained TCP

congestion feedback To achieve better efficiency, needs explicit

communications between network resource providers and applications

P4P Framework – Design Goals

Performance improvement Scalability and extensibility: support

diverse ISP objectives and applications scenarios in large networks

Privacy preservation Ease of implementation Open standard: any ISP, provider,

applications can easily implement it

Current Status

P4P-WG Next step

wider integration 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

Reliability

Is the Internet Reliable?

A key design objective of the “Internet” (i.e., packet-switched networks) is robustness

Does the Internet infrastructure achieve the target reliability objective of a highly reliable system (99.999%)?

Perspective

911 Phone service (1993 NRIC report +) 29 minutes per year per line 99.994% availability

Std. Phone service (various sources) 53+ minutes per line per year 99.99+% availability

…what about the Internet? Various studies: about 99.5% Need to reduce down time by 500 times to

achieve five nines; 50 times to match phone service

Unreachable Networks: 10 days

Internet Disaster Recovery Response

Why slow response? the cable repairing is slow: not until 21 days

after quake BGP is not designed to create business

relationship

Objective a meta-BGP to facilitate discovery and

creation of BGP business relationship

63

Backup Slides

64

The P4P Framework

Data plane

control plane P4P server: a portal for each network service

provider A P4P server provides multiple interfaces so

that others can interact• each provider decides the interfaces it provides

The Virtual Topology Interface

An interface to guide peer selection

An interface as an optimization decomposition interface guidance through “virtual costs”

The Virtual Topology Interface: Network

PID: set of Points of Presence (PoP)

E: set of links connecting PoPs

ce: the link capacity of link e

Ie(i, j): indicator if link e is on the route from PoP i to PoP j

be: amount of background traffic on link e

The Virtual Topology Interface: App

Assume K applications running inside the ISP

Let Tk be the set of acceptable demands for app k tk in Tk specifies traffic demand tk

ij from each pair of source-destination PoPs (i,j)

The Virtual Topology Interface

Consider an example: ISP wants to minimize utilization of the highest utilized link the utilization of the highest utilized link is

called the Maximum Link Utilization (MLU)

k

ek ji

ekije

Ee

Ttts

cjiItb

k :k ..

/)),((maxmin

ISP MLU: Transformation

kk

ek ji

ekije

Ttk

cjiItbets

:

),(:..

min

ISP MLU: Dual

Introducing pe (≥ 0) for the inequality of each link e

To make the dual finite, need

)(min)(:;

ee k

keee

Ttke ctbppD

kk

e

eecp 1

ISP MLU: Dual Then the dual is

where pij is the sum of pe along the path from PoP i to PoP j

)(min)(:

e k

keee

Ttke tbppD

kk

e

kee

e kTt

ee tpbpkk

min

ji

kijij

e kTt

ee tpbpkk

min

e k

kee

eTt

ee tpbpkk

min

ISP MLU Dual : Interpretation

Each App k chooses tk in Tk to minimize weighted sum of tij

The interface between an App and the ISP is the “shadow prices” {pij}

ji

kijij

e kTt

eee tpbppDkk

min)(

Topology with Costs (Illustration)

PID1 PID2

PID3PID6

PID5 PID4

70

2030

10

60

Each PID has:• IP “prefix”

Each link has•“Price”Prices are directional

ISP Update

At update m+1, calculates

eeee

S

See

pcp

mmmpmp

}0;1:{p :S

Sset toprojection:[]

})D({p ofent supergradi :

size step :

)]()()1([)1(

e

e

App Operations

Each app. optimizes its own performance, then picks ISP-friendly peering

For example, selects

where is tolerance, say 80%.

Example: Multihoming

Multihoming A common way of

connecting to Internet

Smart routing Intelligently distribute

traffic among multiple external links

Improve performance Improve reliability Reduce cost

User

ISP 1

ISP K

InternetISP 2

Interdomain Topo

PID1 PID2

PID3PID6

PID5 PID4

70

2030

10

60

Provider1

Provider 2

Provider 3

Cost?

Cost?

Cost?

Integrating Cost Min with P4P

kk

ek ji

ekijee

ek ji

ekije

Ttk

vjiItbEe

cjiItbEe

ts

:

),(:

),(:

..

min0

Field Test: Traffic within Verizon

Average Hop Each Bit Traverses

Why less than 1: many transfers are in the same metro-area; also same metro-area peers are utilized more by tit-for-tat.

App Perspective: App Rates

top related