The Medium Access Sublayer - Faculty Websites

103
The Medium Access Control sublayer Chapter 4

Transcript of The Medium Access Sublayer - Faculty Websites

Page 1: The Medium Access Sublayer - Faculty Websites

The Medium Access Controlsublayer

Chapter 4

Page 2: The Medium Access Sublayer - Faculty Websites

4.2.2 CSMACarrier sense multiple access:Before transmitting, each station listens, to hear if anyone else is

using the channel:• As long as another station is transmitting, wait.• When you don't hear anyone … see next slide

Page 3: The Medium Access Sublayer - Faculty Websites

Persistent and Nonpersistent CSMA

Channel utilization versus load for various random access protocols:• 1-persistent: when channel is found idle, station Tx w/prob. 1.• p-persistent: as above, but prob. p < 1• Nonpersistent: if channel is in use, station does not continually

sense it in order to Tx as soon as current transmission ends. Rather, it waits a random time before sensing again.

Page 4: The Medium Access Sublayer - Faculty Websites

CSMA with Collision DetectionCSMA/CD

Next improvement: Listen also while transmitting, so transmission can be aborted as soon as collision occurs!

Quickly aborting damaged frames saves time and bandwidth.

Used in the Ethernet MAC!

Page 5: The Medium Access Sublayer - Faculty Websites

CSMA/CD

CSMA/CD can be in one of 3 states: contention, transmission, idle.τ = time needed for signal to propagate between most distant stations

Time needed to be sure the station has seized the medium = 2τ.

Page 6: The Medium Access Sublayer - Faculty Websites

QUIZ: CSMA/CDProblem 6/351:What is the length of a contention time slot in CSMA/CD for:

• A 2-km twin-lead cable (c = 0.82⋅c0)

• A 40-km multimode fiber optic cable (c = 0.65⋅c0)

Page 7: The Medium Access Sublayer - Faculty Websites

SolutionProblem 6/351:What is the length of a contention time slot in CSMA/CD for:

• A 2-km twin-lead cable (c = 0.82⋅c0)

• A 40-km multimode fiber optic cable (c = 0.65⋅c0)

Page 8: The Medium Access Sublayer - Faculty Websites

CSMA/CD vs. slotted ALOHA

The contention period in CSMA/CD is similar to the one in slotted Aloha. However, after the contention phase has ended, the winning CSMA/CD station can continue to transmit safely a long data frame!

B/c of this, CSMA/CD can have greatly increased throughput if the frame-time is >> 2τ.

Page 9: The Medium Access Sublayer - Faculty Websites

CD is an analog process! If the bit heard is different from the one transmitted, a collision has occurred.

Single-channel CSMA/CD is half-duplex (the receiving radio of a station is busy listening for collisions).

CSMA/CD

Page 10: The Medium Access Sublayer - Faculty Websites

Fundamental problems with allcollision-based protocols covered

a) When the frame-time is small compared with the contention time, the throughput is low → poor efficiency (waste of bandwidth)

b) Due to the probabilistic nature of the contention process, no absolute guarantees can be made about how long it will take to successfully Tx a frame → not adequate for applications that need deterministic performance (e.g. voice, aircraft/military navigation systems)

Page 11: The Medium Access Sublayer - Faculty Websites

4.2.3 Collision-Free Protocols

4.2.4 Limited-Contention Protocols

SKIP

Page 12: The Medium Access Sublayer - Faculty Websites

4.2.5 Wireless LAN ProtocolsIn WiFi, Radio frequencies used are in the 900 MHz, 2.4 GHz, 3.6 , 4.9, 5 GHz, 5.9 GHz and 60 GHz bands, and each band has multiple channels, 20 MHz wide** …… however, each WiFi network is configured with one channel!We therefore have the same access problem!

* There are other wireless LAN protocols besides WiFi (802.11), but WiFi is by far the most widely deployed.** Currently, wider channels can also be used in the 5 GHz band, with widths of 40, 80, and 160 MHz.

Page 13: The Medium Access Sublayer - Faculty Websites

4.2.5 Wireless LAN ProtocolsIn WiFi, Radio frequencies used are in the 900 MHz, 2.4 GHz, 3.6 , 4.9, 5 GHz, 5.9 GHz and 60 GHz bands, and each band has multiple channels, 20 MHz wide* …… however, each WiFi network is configured with one channel!We therefore have the same access problem!

Actually, in WiFi we have two new problems, due to the limited range of microwaves!

Page 14: The Medium Access Sublayer - Faculty Websites

Wireless LAN – Hidden terminalsHidden terminals are senders that cannot sense each other, but

nonetheless collide at the intended receiver.We want to prevent it, since it decreases performance.

Example: A and C are hidden terminals when sending to B

Page 15: The Medium Access Sublayer - Faculty Websites

Wireless LAN – Exposed terminalsExposed terminals are senders that can sense each other, but can still

transmit safely (to different receivers).We want to allow it, since it improves performance.

Example: B A and C D are exposed terminals

Page 16: The Medium Access Sublayer - Faculty Websites

ConclusionB/c of the hidden and exposed terminal problems, CSMA

doesn’t work well in wireless LANs.

CSMA is based on the conditions at the sender, which, in a

short-range radio system, may be different from those at the

receiver.

Page 17: The Medium Access Sublayer - Faculty Websites

Wireless LAN Protocols – MACA(Multiple Access w/Collision Avoidance)

Idea: Sender causes receiver to transmit a short frame, so nearby stations (hidden from the sender) hear it, and avoid interfering during the subsequent long data frame.

Page 18: The Medium Access Sublayer - Faculty Websites

Wireless LAN Protocols - MACA

The MACA protocol (Multiple Access w/Collision Avoidance).(a) A sending an RTS (Request-To-Send) to B.(b) B responding with a CTS (Clear-To-Send) to A.

“CA” is a slight misnomer, since collisions can still occur …

Page 19: The Medium Access Sublayer - Faculty Websites

QUIZ: MACA

Find a collision scenario in this network, when the RTS and CTS frames are sent!

Page 20: The Medium Access Sublayer - Faculty Websites

The MACA protocol (Multiple Access w/Collision Avoidance).(a) A sending an RTS (Request-To-Send) to B.(b) B responding with a CTS (Clear-To-Send) to A.

A and D send RTS to B simultaneously.(However, only RTS frames will collide, not data frames!)

Solution

Page 21: The Medium Access Sublayer - Faculty Websites

Extra-credit QUIZ

Page 22: The Medium Access Sublayer - Faculty Websites

Before examining the Ethernet standard(s), let’s review some concepts from the Physical Layer (L1, Ch.2) …

Next 5 slides

Page 23: The Medium Access Sublayer - Faculty Websites

2.5.1 Baseband TransmissionLine codes send symbols that represent one or more bits•NRZ is the simplest, literal line code (+1V=“1”, -1V=“0”)•Other codes tradeoff bandwidth and signal transitions

Page 24: The Medium Access Sublayer - Faculty Websites
Page 25: The Medium Access Sublayer - Faculty Websites

4B/5B maps 4 data bits to 5 coded bits with 1s and 0s

Data Code Data Code Data Code Data Code

0000 11110 0100 01010 1000 10010 1100 11010

0001 01001 0101 01011 1001 10011 1101 11011

0010 10100 0110 01110 1010 10110 1110 11100

0011 10101 0111 01111 1011 10111 1111 11101

Page 26: The Medium Access Sublayer - Faculty Websites

Balanced signalsSome channels strongly attenuate the DC component of the signal → transmitting a DC component is wasted power•Ensure that the signal has a mix of + and – values which average to zero•The frequent transitions are also good for CLK recovery!

Bipolar encoding uses alternating +V/-V to represent 1

Page 27: The Medium Access Sublayer - Faculty Websites

Balanced signalsOptical fiber transponders need to have the lasers finely tuned at 50% average power to ensure thermal stability → DC component must be 0.5• Ensure that the signal has an equal mix of 0s and 1s• The frequent transitions are also good for CLK recovery!

8B/10B maps 8 data bits to 10 coded bits with 1s and 0s:

• Disparity of at most 2 at any time (e.g. 4 one-bits and 6 0-bits)

• Max. 5 consecutive 1s or 0s

• Some of the unused symbols can be used for control

Page 28: The Medium Access Sublayer - Faculty Websites

Back to Ch.4!

Where are we?The first 2 sections of Ch.4 covered MAC algorithms in the abstract. Now we are going to see how these algorithms are put to work in real-life networks.

Page 29: The Medium Access Sublayer - Faculty Websites

Remember from Ch.1: IEEE 802 Standards(Initially LAN, but now also PAN and MAN)

The 802 working groups. The important ones are marked with *. The ones marked with are hibernating. The one marked with † gave up. There’s an up-to-date version of this table at Wikipedia.

, ZigBee

Page 30: The Medium Access Sublayer - Faculty Websites

Where to find IEEE 802 standards

6 months after publication, they become freely available at https://standards.ieee.org/

The latest version of 802.3 is this one:https://standards.ieee.org/standard/802_3-2018.html

Page 31: The Medium Access Sublayer - Faculty Websites

4.3 Ethernet

• Bob Metcalfe, the (co)inventor of Ethernet, spent a summer in Hawaii, working with Abramson on ALOHANET.

• Metcalfe then took a job at Xerox PARC, where the first PCs had just been built. In 1976, he and David Boggs built the first LAN to connect those PCs. It was called the Alto Aloha Network.

• Metcalfe used the term ETHER as a synonim for transmissionmedium, as seen on next slide …

Historical notes (1.5.3)

Page 32: The Medium Access Sublayer - Faculty Websites

Known famously as “ETHER!”, this is the first “official” sketch of the Ethernet, made by Metcalfe for an internal memo at Xerox (cca. 1972).

Source: http://www.digibarn.com/collections/diagrams/ethernet-original/index.html

Page 33: The Medium Access Sublayer - Faculty Websites

The machines were all connected to the same thick coax cable (multidrop cable) via transceivers screwed into the cable (“vampire taps”)

Page 34: The Medium Access Sublayer - Faculty Websites

• DEC, Intel and Xerox drew up the first standard for 10-Mbps Ethernet, known as the DIX standard (1978). With minor changes, this became the IEEE 802.3 standard (1983).

• Xerox showed little interest in commercializing Ethernet, so Metcalfe started 3Com to sell Ethernet adapters for PCs.

• Early competitors of Ethernet were Token Bus (802.4, promoted by GM) and Token Ring (802.5, promoted by IBM), but today they’re both more or less abandoned.

Summary of the early 10-Mbps Ethernet flavors:• Experimental Ethernet• DIX Ethernet• 802.3 EthernetA complete, up-to-date list can be found at Wikipedia.

Page 35: The Medium Access Sublayer - Faculty Websites

Ethernet Cabling – the short version –

The most common kinds of Ethernet cabling.

Limits: max distance = 2.5 km (1.5 mi) max #of repeaters = 4

Page 36: The Medium Access Sublayer - Faculty Websites

Three kinds of Ethernet cabling …

(a) 10Base5 (Thick coax), (b) 10Base2 (Thin coax), (c) 10Base-T.

Page 37: The Medium Access Sublayer - Faculty Websites

… and the fourth!

Page 38: The Medium Access Sublayer - Faculty Websites

Ethernet L1 Coding

(a) Binary encoding, (b) Manchester encoding, (c) FYI: Differential Manchester encoding.

This is the one used in Ethernet … but not quite … see the next slide!

Used in other LANs, for better noise immunity

Page 39: The Medium Access Sublayer - Faculty Websites

There are two opposing conventions for the representations of data. The first of these was first published by G. E. Thomas in 1949 and is followed by numerous authors (incl. Tanenbaum in our text).

Nitty-gritty: Two versions of M. Code

Source: Manchester code – Wikipedia

Page 40: The Medium Access Sublayer - Faculty Websites

Ethernet Frame(s)

Frame formats: (a) DIX Ethernet (b) 802.3 Ethernet

At 10 Mbps, 1 bit takes 100 ns.Preamble field:• All bytes are all ‘10101010’ → This makes it easy for the receiver to

synchronize its clock.• Duration is 8x8x100ns = 6.4 µs → Rx and Tx clocks synchronize,

and then they stay in sync. using the Manchester code transitions

Page 41: The Medium Access Sublayer - Faculty Websites

Ethernet Frame(s)

Frame formats: (a) DIX Ethernet (b) 802.3 Ethernet

Although it is present “on the wire”, the preamble is not normally counted in the length of the frame because:• It really belongs to Layer 1 (waking up the receiver, synchronizing

the CLKs)• It is not stored in the station's memory.• It is not covered by the checksum.

Page 42: The Medium Access Sublayer - Faculty Websites

Ethernet Frame(s)

Although the preamble is not needed in the more modern versions of Ethernet, it remains part of the standard for backward compatibility.• In optical specifications for GE and above, the preamble is further modified –

see link on our webpage!

In 802.3, the last byte of preamble is 10101011 (for compatibility with 802.4 and 802.5) → “Start Of Frame delimiter” → tells receiver “actual information follows this”

Page 43: The Medium Access Sublayer - Faculty Websites

Address fields:• 6 bytes = 48 bits (0 →47)• Bit 47 (technically, “the first bit on the wire”) = “group” bit (0→ordinary addr.,

1→group addr.= Mcast, requires group mgmt.)• “all-ones” for Bcast• Bit 46: = “local” bit (0 → global addr., 1→local addr.)• “Discovery” problem → left for L3 to solve (ARP)

Page 44: The Medium Access Sublayer - Faculty Websites

How many MAC addresses are possible?

46 bits → 70.3x1012 unique global MAC addresses (assigned centrally by IEEE)

Page 45: The Medium Access Sublayer - Faculty Websites

Type field:• Tells the L2 process to which L3 process it should give the content

of the frame.• A.k.a. “ether type”, e.g. IP → 0x0800 (=204810), ARP →0x0806• In 802.3 it means Length → contradiction solved in practice by the

fact that all ether types are > 150010.• How does 802.3 know what L3 the data is for? Use a portion of the

data field itself!

Page 46: The Medium Access Sublayer - Faculty Websites

Data + Pad fields:• Max length was dictated by:

• Limited (in 1978) amount of RAM in the radio transceiver.• Fairness!

• Min length dictated by the worst-case RTT (round-trip time) → up to 46 bytes of padding if data portion is too short, to keep total length ≥ 64.

Why 64?

Page 47: The Medium Access Sublayer - Faculty Websites

Collision detection can take as long as 2 .τ

Sender (A) should keep transmitting for at least the amount of time needed to detect a collision in the worst case.For the physical restrictions (10 Mbps, max 2.5 km and 4 repeaters), we have 2τ ~ 50 µs → 500 bits

round up to 512 bits = 64 bytes. This is the min. frame length.

Page 48: The Medium Access Sublayer - Faculty Websites

“Checksum” field• A.k.a. FCS (Frame Check Sequence). It is the same 32-bit

“Internet CRC” that is used in PPP and AAL5• Can errors be corrected?

• When an FCS violation occurs, the frame is silently discarded.• Ethernet provides only unacknowledged and connectionless

service, a.k.a. datagram service.• Recovery is left to the upper layers.

Page 49: The Medium Access Sublayer - Faculty Websites

What happens at collision?Binary Exponential Backoff (BEB) algorithm

Time is divided into slots of duration 2τ ~ 51.2 µs.After collision m, the colliding stations:• Send out a short jam burst (why?)• Each randomly choose an integer between 0 and 2m+1 -1 and wait

that # of slot times → P (new collision) ≈ 1/2m+1

Page 50: The Medium Access Sublayer - Faculty Websites

Binary Exponential Backoff (BEB) algorithm

After 10 collisions, randomization interval is frozen at 1023.

After 16 collisions, L2 reports FAILURE → recovery left for higher layers.

This mechanism was chosen as a trade-off between prob. of collision and waiting time.

Page 51: The Medium Access Sublayer - Faculty Websites

Extra-credit QUIZ

Page 52: The Medium Access Sublayer - Faculty Websites

Problem for individual workIn the BEB algorithm, what’s the probability of ending in FAILURE?– Hint: 16 consecutive collisions must occur, so 16 probabilities

must be multiplied.– Hint: Solve this Lemma first: If two “players” randomly choose a

number between 0 and N-1, what is the probability for them to choose the same number?

(We will come back to it in the lab!)

Page 53: The Medium Access Sublayer - Faculty Websites

1. Why are there two versions of the Ethernet frame? What are they?

2. Why is the preamble normally not included in the length of the frame?

Quiz

Page 54: The Medium Access Sublayer - Faculty Websites

Solution

2. Why is the preamble normally not included in the length of the frame?

A: Because:• It really belongs to Layer 1 (waking up the receiver, synchronizing

the CLKs)• It is not stored in the station's memory.• It is not covered by the checksum.

Page 55: The Medium Access Sublayer - Faculty Websites

Quiz: Ethernet3. What are the two differences between DIX Ethernet and 802.3

Ethernet?

4. What are the minimum and maximum lengths of an Ethernet frame? How were they arrived at?

Page 56: The Medium Access Sublayer - Faculty Websites

Solution

2. What are the minimum and maximum lengths of the frame?Answer:• Minimum length 64• Maximum length is 1518, but sometimes it is quoted as 1514,

because the 4 checksum bytes are only computed on the fly, and not stored in the frame buffer.

Page 57: The Medium Access Sublayer - Faculty Websites

5. What type of contention-resolution algorithm is used in Ethernet? Explain it in your own words.

6. How was the contention time slot of 51.2 µs arrived at? Why 51.2 instead of just 50?

Quiz: Ethernet

Page 58: The Medium Access Sublayer - Faculty Websites

4.3.3 Ethernet PerformanceAssumptions:• There are always exactly k stations that have data to Tx• We simplify the analysis of BEB algorithm by assuming the

retransmission probability to be constant• Aggregate the prob. to Tx new data and the prob. to re-Tx old data

in one probability p (similar to the offered load G in ALOHA)• p is the prob. for one station to contend in one given contention slot

P[one station to acquire channel in given contention slot] = kp(1-p)k-1 = A

The winning station can be any of the k

What is the counterpart of k in the Aloha network?

Page 59: The Medium Access Sublayer - Faculty Websites

QUIZProve that, for a constant # of transmitting stations k, A = kp(1-p)k-1 is maximum when p = 1/k.

Hint: Treat A as a function of p, A(p), and use calculus.

Page 60: The Medium Access Sublayer - Faculty Websites

Ethernet PerformanceP[one station to acquire channel in given contention slot] = kp(1-p)k-1 = AFor a constant # of transmitting stations k, A is maximum when p = 1/k

“Many stations” approximation: when k → ∞, the maximum A tends to a nice limit: A → 1/e ≈ 0.36 = 36%

Since p = 1/k, this means p → 0 … but this is normal, can you see why?

Page 61: The Medium Access Sublayer - Faculty Websites

P[one station to acquire channel in given contention slot] = kp(1-p)k-1 = AFor constant k, A is maximum when p = 1/k“Many stations” approximation: when k → ∞, A → 1/eMean length of contention interval: 2τ/A = 2τe ≈ 5.4τ

Let P be the expected (average) time to transmit one frame P = F/B

Channel efficiency = = A

P

Pτ2

+cFBLe21

1

+Bandwidth, e.g. 10 Mbps

Max cable length, e.g. 2.5 km

Average frame size,e.g. 1500 Bytes

Page 62: The Medium Access Sublayer - Faculty Websites

QUIZChannel efficiency = =

Find the channel efficiency for:• Cat 5e UTP cable (twisted pair) → c = 0.66∙c0• B = 10 Mbps• L = 2.5 km• F = 1000 Byte

AP

Pτ2

+cFBLe21

1

+

Page 63: The Medium Access Sublayer - Faculty Websites

Channel efficiency = =

Find the channel efficiency for:• Cat 5e UTP cable (twisted pair) → c = 0.66∙c0• B = 10 Mbps• L = 2.5 km• F = 1000 Byte

AP

Pτ2

+cFBLe21

1

+

Solution

Page 64: The Medium Access Sublayer - Faculty Websites

Extra-credit QUIZ: Performance

Page 65: The Medium Access Sublayer - Faculty Websites

Efficiency of Ethernet at 10 Mbps (512-bit slot time)B = data rateL = length of cableF = frame length

cFBLe21

1

+=ρ

Page 66: The Medium Access Sublayer - Faculty Websites

4.3.4 Switched Ethernet

Through buffering of frames in the backplane, each port becomes its own collision domain.Backplane is proprietary (not standardized) and runs at speeds much higher than those of the links (>10 Gbps is common today).

Hubs are L1 devices, used to simplify the connection and maintenance of the Ethernet network.All stations connected to the same hub are still within the same collision domain.

Page 67: The Medium Access Sublayer - Faculty Websites

QUIZ

Since each port is its own collision domain, are collisions at all possible?

Page 68: The Medium Access Sublayer - Faculty Websites

4.3.4 Switched Ethernet

Switches (L2) and hubs (L1) can be combined within the same Ethernet LAN!

Page 69: The Medium Access Sublayer - Faculty Websites

4.3.5 Fast Ethernet (802.3u) 100MbpsL1 coding was changed from Manchester to ternary

logic!This allowed the baud rate (physical signaling speed) to be increased only to 25 MHz → that’s only 25% more than 10 Mbps Ethernet.

This way, twisted pair cables can still be used … but 4 pairs are needed instead of 2 → 100Base-T4In 100Base-T4, no coax is possible; use only hubs or switches.

Page 70: The Medium Access Sublayer - Faculty Websites

• 100Base-T4 runs over Cat 3 UTP → coding is 8B/6T (trits!)• 100Base-TX runs over Cat 5 UTP → coding is 4B/5B at 125 MHz

→ 80% efficiency.• 100Base-FX runs over two strands of MM fiber

(full duplex, so no collisions!)

4 twisted pairs2 twisted pairs2 MM fiber

Remember: Combinations are chosen carefully to have enough transitions for synchronization of receiver

Page 71: The Medium Access Sublayer - Faculty Websites

For backward compatibility, 802.3u mandates an auto-negotiation mechanisms, which lets any two connected ports to agree on the maximum speed (10/100) and duplexity (half/full) available to both.

Page 72: The Medium Access Sublayer - Faculty Websites

A cautionary tale: 802.12

802.12, a.k.a. 100BaseVG, a.k.a. 100VG-AnyLAN

Read about what happens when a big company wants to “swim against the current”:

• p.291 of text• 100BaseVG - Wikipedia, the free encyclopedia• HP paper on AnyLAN (also available on our webpage)

Page 73: The Medium Access Sublayer - Faculty Websites

4.3.6 Gigabit Etherneta.k.a. GE, 802.3ab/ah, 802.3z

Like the previous versions of Ethernet, GE can be used to connect computers directly, or in a network of hubs and/or switches.

Page 74: The Medium Access Sublayer - Faculty Websites

Two versions of GEFull-duplex → no collisions → only limitation is attenuation of

signal strength (up to 5 km ≈ 3 mi on MM fiber!)

Half-duplex (hub connection) → computer and hub can still collide

Page 75: The Medium Access Sublayer - Faculty Websites

QUIZ Half-duplex GEIn 10- and 100-Mbps Ethernet, the minimum frame length is 64

Bytes. How long does it take to Tx a 64-Byte frame in GE?

Assuming an optical link with propagation speed 0.66⋅c, what is the maximum length in order for CSMA/CD to work?

• Hint: Calculate the serialization time first!

Page 76: The Medium Access Sublayer - Faculty Websites

SolutionHow long does it take to Tx a 64-Byte frame in GE?

64 x 8 = 512 bit → 512 bit / 109 bps = 512 ns

Assuming an optical link w/propag. speed 0.66⋅c, what is the max.link length in order for CSMA/CD to work?

Max. round-trip time must equal min. frame transmission time: 512 ns = 2∙Lmax/(0.66 ∙3 ∙108) → Lmax = 51.2 m

Page 77: The Medium Access Sublayer - Faculty Websites

Gigabit EthernetHalf-duplex requires some changes to extend the range (max 200 m):• Carrier extension: frames padded in the hardware to 512 Bytes.

• Problem: efficiency is low for short frames!• Frame bursting (up to 8192 Bytes, only the first needs extension!)

Other new features:• 8B/10B at 125 MHz baud rate, with scrambling for CLK recovery• PAUSE control frames (Type = 0x8808)

• Length of pause is given as multiple of 512 ns (Why?)• This is flow control!

• Jumbo frames (proprietary extension, non-standard!)

Page 78: The Medium Access Sublayer - Faculty Websites

QUIZ: GECarrier extension: frames are padded in the hardware to 512 Bytes.

• If a station has only 64-Byte frames to transmit all the time, and frame bursting is not used, what is the link efficiency?

• What is the efficiency with frame bursting?

Page 79: The Medium Access Sublayer - Faculty Websites

Gigabit / 10 Gigabit and beyondGE is commonly run over 4 Twisted pairs

10 GE is already being deployed for commercial applications

Page 80: The Medium Access Sublayer - Faculty Websites

40, 100, 400 Gigabit Ethernet (GbE)Why 40? (Remember SONET OC-768!)

These speeds are not required (yet) by the consumer market, but only by specialized applications, e.g.• Data centers/Cloud Computing• Internet peering (between large ISPs)• Supercomputing

Page 81: The Medium Access Sublayer - Faculty Websites

40/100/400 GbE

Read the following:• Section 4.3.7 in our text• The links under the Ethernet section on our webpage• At least three more sources (Internet, magazine articles, library books,

etc.)

Make sure you address in your paper:-- At least two new features, that were not present in 10 GbE or below-- At least one practical instance of testing or deploying one of these standards in the real world

This is the 2nd (and last) term paper for our course:

1500 words, submit electronically (MS Word or PDF)See handout for full details!

Page 82: The Medium Access Sublayer - Faculty Websites

Wireless LANs, 802.11, Wi-Fi

– 802.11 architecture/protocol stack »– 802.11 PHY layer »– 802.11 MAC sub-layer»– 802.11 frame format »

Page 83: The Medium Access Sublayer - Faculty Websites

802.11 ArchitectureWireless clients associate to a wired AP (Access Point)

– This is called infrastructure mode– There is also an ad-hoc mode, but it is rarely used.

AccessPoint

Client

To Network

Page 84: The Medium Access Sublayer - Faculty Websites

802.11 Protocol Stack

CANE by Tanenbaum & Wetherall, © Pearson Education-Prentice Hall and D. Wetherall, 2011

MAC is used across different physical layers to interface to L3. LLC merely specifies L3 = “IP”

Page 85: The Medium Access Sublayer - Faculty Websites

802.11 PHY (L1)Today’s NICs are compatible w/multiple PHY layers

• E.g., 802.11 a/b/g/n

Name Technique Max. Bit Rate

802.11b Spread spectrum, 2.4 GHz 11 Mbps

802.11g OFDM, 2.4 GHz 54 Mbps

802.11a OFDM, 5 GHz 54 Mbps

802.11n OFDM with MIMO, 2.4/5 GHz 600 Mbps

MIMO

Orthogonal FDM (2.5.3)

Similar to CDMA (2.5.5)

Up to 4 antennas

Page 86: The Medium Access Sublayer - Faculty Websites

802.11 PHY (L1)All 802.11 variants in use today use the upper ISM bands and U-NII bands (2.3.3 The Politics of the Electromagnetic Spectrum):• 2.4 GHz → crowded, but longer range• 5 GHz → less crowded, but shorter range due to absorption

Rate adaptation is recommended, but not part of the IEEE standards → interoperability sometimes a problem (although the Wi-Fi Alliance is trying to mitigate this: http://www.wi-fi.org/about/organization )

Page 87: The Medium Access Sublayer - Faculty Websites

QUIZ

Problem 25: An 11-Mbps 802.11 LAN is transmitting only 64-Byte frames back-to-back. The BER of the radio channel is 10-7.

How many frames per second are damaged on average?

Hint: First figure out the probability for one frame to be damaged.

Page 88: The Medium Access Sublayer - Faculty Websites

QUIZ

Problem 25: An 11-Mbps 802.11 LAN is transmitting only 64-Byte frames back-to-back. The BER of the radio channel is 10-7.

How many frames per second are damaged on average?

Solution:

Page 89: The Medium Access Sublayer - Faculty Websites

802.11 MACIn Sec. 4.2.5 we introduced MACA, however 802.11 uses a different protocol: CSMA/CA– Due to the hidden and exposed station problems, it is not reliable

to detect collisions (CD) locally, by listening during my own transmission.

– CSMA/CA senses the medium (CS) and, when it hears silence, inserts a random backoff interval.

– If someone else transmits during my backoff, I stop the countdown and resume when medium is silent again.

– I send my data frame when my countdown reaches 0.– If destination receives frame correctly, it replies ACK.

Page 90: The Medium Access Sublayer - Faculty Websites

802.11 MAC – CSMA/CA

If collision/error occurs (no ACK received):– colliding stations enter Ethernet-style BEB– The entire frame is retransmitted!

The backoff delay chosen by B is longer than the one chosen by C

Page 91: The Medium Access Sublayer - Faculty Websites

4.4.4 802.11 Frames• Frames vary depending on their type (Frame control)• Data frames have 3 addresses to pass via APs

Data, Control, Management

RTS, CTS, etc. The radio station connected to

the Access Point is called the Distribution System (DS)

Encrypted frame

“Distant” endpoint

Page 92: The Medium Access Sublayer - Faculty Websites

SKIP the remainder of Ch. 4

Homework for Ch.4: 410 By communication, it is meant two-way communication.11, 14, 17, 18, 19, 20

Due Thu, Nov. 14

Page 93: The Medium Access Sublayer - Faculty Websites

The following slides are a review of formulas and frames from this

chapter:

Page 94: The Medium Access Sublayer - Faculty Websites

M/M/1

• rate = λ [frames/sec]• Poisson process: P[pkt arrives between t and t+dt] = λ·dt, irrespective of what

happened before t (memoriless)• link_data_rate = C [bit per second]• pkt_length distributed exponentially, with mean 1/µ [bit per frame]• service rate µ0 = µ·C [frames/sec]

inter-arrival times inter-departure timesbuffer

server

service time

?

Page 95: The Medium Access Sublayer - Faculty Websites

Pure ALOHAFrame-time = time needed to Tx a frame = tWe assume Poisson distribution for the “offered” load (new and

retransmitted frames) within a frame time, with mean G:

P(k frames in t) = Equilibrium condition: G <1

For a given frame, the vulnerable period is 2·t, so the offered load is also Poisson, but with mean 2G:

P(k frames in 2·t) =

P0 = probability that a frame does not suffer collision = = P(0 frames in 2t) = e –2G

Throughput = S = G · P0 = Ge –2G

!keG Gk −

( )!

2 2

keG Gk −

Page 96: The Medium Access Sublayer - Faculty Websites

Slotted ALOHAAll is the same, except the vulnerable period is now only t:

P0 = probability that a frame does not suffer collision = = P(0 frames in t) = e –G

Throughput = S = G · P0 = Ge –G

Max. throughput doubles! …

But…

Page 97: The Medium Access Sublayer - Faculty Websites

Ethernet PerformanceP[one station to acquire channel in given contention slot] = kp(1-p)k-1 = AFor constant k, A is maximum when p = 1/k“Many stations” approximation: when k → ∞, A → 1/eMean length of contention interval: 2τ/A = 2τe ≈ 5.4τ

Let P be the expected (average) time to transmit one frame

Channel efficiency = =

AP

Pτ2

+cFBLe21

1

+

Page 98: The Medium Access Sublayer - Faculty Websites

Ethernet Frame(s)

Frame formats:(a) DIX Ethernet(b) 802.3 EthernetAt 10 Mbps, 1 bit takes 100 nsPreamble bytes are all ‘10101010’ → Easy for receiver to synchronizeDuration of preamble: 8x8x100ns = 6.4 µs → Rx and Tx clocks

synchronize, then stay in sync. using Manchester code transitions (Digital PLL)

Page 99: The Medium Access Sublayer - Faculty Websites

802.11 – WiFi – Frame• Frames vary depending on their type (Frame control)• Data frames have 3 addresses to pass via APs

Data, Control, Management

RTS, CTS, etc. The radio station connected to

the Access Point is called the Distribution System (DS)

Encrypted frame

“Distant” endpoint

Page 100: The Medium Access Sublayer - Faculty Websites

The following slides are a additional review problems for the

chapter

Page 101: The Medium Access Sublayer - Faculty Websites

QUIZ: Ethernet36. A switch designed for use with Fast Ethernet has a backplane that can move 10 Gbps. How many frames/sec go through the switch during heaviest traffic conditions?

Hint: What is the shortest FE frame?

Page 102: The Medium Access Sublayer - Faculty Websites

36. A switch designed for use with Fast Ethernet has a backplane that can move 10 Gbps. How many frames/sec go through the switch during heaviest traffic conditions?

solution

Page 103: The Medium Access Sublayer - Faculty Websites

QUIZ: Ehernet

What is the promiscuous mode for an Ethernet interface?• Why is it a security hazard?• Is promiscuous mode a problem for stations connected to the same hub?• Is promiscuous mode a problem for stations connected to the same switch?

Hint: See p.290 of our text.