1CSS 432 1
CSS432 Shared Access NetworksTextbook Ch2.6 - 2.7
Professor: Munehiro Fukuda
2CSS 432 2
Ethernet Overview History
Developed by Xerox PARC in mid-1970s Similar to IEEE 802.3 standard
CSMA/CD Carrier sense multiple access with collision detection
Frame Format
MAC (Media Access Control) Addresses unique, 48-bit unicast address assigned to each adapter example: 8:0:e4:b1:2 broadcast: all 1s, multicast first bit is 1
Bandwidth: 10Mbps (10Base2=Thin Coax 200m, 10B5=Yellow Thick Coax 500m, 10BT=Twisted pair 100m), 100Mbps(10BaseT), 1Gbps
Length: 2500m (500m segments with 4 repeaters)
Destaddr
8 6 4
CRCPreamble Srcaddr
Type Body
26
Nextframe
Inter-frame gapbytes 46 ~ 1500
Min: 64bytes (512bits) ~ Max: 1518bytes
Used by layer 3IP: 0x0800
ARP: 0x0806IPv6: 0x86DD
12
3CSS 432 3
Ethernet Transmit Algorithm If line is idle…
Send immediately Upper bound message size of 1500 bytes: MTU
(Maximum Transmission Unit) Must wait 9.6usec between back-to-back frames
Why? (See the next slide.)
If line is busy… Wait until idle and transmit immediately Called 1-persistent
Transmit a packet with probability 1. (special case of p-persistent: transmitting a
packet with P percent, where 0 < p ≤ 1)
4CSS 432 4
Transmit Algorithm (cont) If collision…
Send a 32-bit jamming sequent, and then stop transmitting frame (64bit preamble + 32bit jam = 96bits)
Minimum frame is 64 bytes (header + 46 bytes of data) = 512bits Why? (See the next slide.)
Delay and try again 1st time: 0 or 51.2us 2nd time: 0, 51.2, or 102.4us 3rd time51.2, 102.4, or 153.6us nth time: k x 51.2us, for randomly selected k=0..2n -
1 give up after several tries (usually 16) exponential backoff
10Mbps means 10bits/usec.96bis needs 9.6usec
1010101… 64bits1010.. 32bits
5CSS 432 5
Collisions
A B
A B
A B
A B
500m x 5 = 2500m (with 4 repeaters)
A collision occurred
Time t
Time t + d(d = 25.6us: approx. 0.01us/m)
Time t + 2d(2d = 51.2us)
Jam seq
10Mbps x 51.2us = 10 x 106 x 51.2 x 10-6 = 512bits = (64bytes)
Bandwidth 10Mbps 100Mbps 1Gbps
Bits/usec 10bits/usec 100bits/usec 1000bits/usec
Jamming sequence 96bits => 9.6usec 96bits => 0.96usec 96bits => 0.096usec (96nsec)
Max delay (RTT) 512bits => 51.2usec 512bits => 5.12usec 512bits => 0.512usec
Speed 51.2usec/5000m = 10.2nsec/m 51.2usec/200~400m = 12.8nsec/m 0.512usec/25m (cupper) = 20.5nsec/m
latency
Network load30%
Ethernet
Token Ring
6CSS 432 6
Token Ring Overview Examples
16Mbps IEEE 802.5 (based on earlier IBM ring) 100Mbps Fiber Distributed Data Interface (FDDI)
Idea Frames flow in one direction: upstream to downstream Special bit pattern (token) rotates around ring Must capture token before transmitting Release token after done transmitting
Immediate release: FDDI Delayed release (after a sent frame came back) IEE802.5
Remove your frame when it comes back around Stations get round-robin service
Frame Format
Control
8 8 8 24
CRCStart offrame
End offrame
Destaddr
Body
4848
Srcaddr
Status
32
Priority bits
7CSS 432 7
Token Maintenance Lost Token
No node emits a token when initializing ring. A bit error corrupts token pattern. A node holding token crashes.
Lost Token Detection IBM Token Ring: No more presence message from a monitor station FDDI: No more message for more than 2.5ms
Election Procedure A station transmits a claim token with its MAC address if doubting the
existence of a monitor station. The highest address wins. FDDI: the largest TTRT(Target Token Rotation Time) wins.
Token Generation Wait for NumStations x THT(Token Hold Time) + RingLatency
8
Wireless Network
Ad-hoc Network WiFi
Base Stations WiFi, Bluetooth, Cellular
CSS 432
9
Wireless Network Bluetooth (802.15.1)
License-exempt band at 2.45GHz
Wi-Fi (802.11)
CSS 432 9
Cell Phone
master
activeslave
activeslave
parkedslave
parkedslave
7 255: :
Request
Reponses
o e o e o e o eTDM
A B C
DA B C
Hidden nodes: A and C are unaware ofeach other but their frames collide at B.
Exposed node problem: B sends A a frame which C hears.This concludes C can’t send D a frame, which is actually possible.
MACA: Multiple Access with Collision Avoidance: RTS: a sender sends a request to send. CTS: a receiver responds a clear to send. ACK: a receiver sends an ack upon a successful completion.
Distribution system
AP-1 AP-3AP-2 AP: Access point
DA
B
C
probe
Probe response Assoc request
E
1 2 3Base satations
P
Call
P
Handoff
10
Wireless Network
CSS 432 10
Direct sequence: n (e.g. 4)-bit chipping sequence
CDMA: Code Division Multiple Access (Cellular-3G) Each cell phone sends data with a different (but pre-
assigned chipping code.) A base station distinguish many cell phones using their
unique chipping code.
11CSS 432 11
Network Adapters
CPU
Memory
I/O busController
BusInterface
LinkInterface
FIFO
FIFO
DMA
NetworkProcessor memory
Interrupt
System Bus PCIBus
NetworkLink
Host Computer
Network Interface Card (NIC)
Programmed I/O
32bit, 33MHz = 1056Mbps633Mbps STS-121000Mbps Ehternet
Example Myrinet Lanai series
12CSS 432 12
Performance Considerations in Layer 2: Data Link Layer
DMA Initializing DMA channels versus programming CPU I/O
Frame Size Stuffing a full frame versus distinguishing one-time small-frame
transfer and burst frame transfer channels Frame Transfer Strategy
Individual transfers versus pipelined transfers Fragmentation/Aggregation
Frame fragmentation versus frame aggregation Multicast through a switch
Software emulation or hardware implementation
13CSS 432 13
Memory Bottleneck PCI(33bit, 33MHz) = 1056Mbps System Bus = 235MBps = 1880Mbps (Text example) ≈ real
throughput Memory Bus Controller
Arbitration among CPU and DMA DRAM setup time
Data copy: Application memory space to OS OS memory space to NIC DMA-manageable space
Zero copy/pin-downed communication Bypassing OS
Reducing memory-copying overhead Reducing interrupts
Application
DMA-manageable memory
OS
14CSS 432 14
Reviews Ethernet: k-persistent, exponential back off, and the
relationship between the minimum frame size and collisions.
Token ring network: immediate/delayed release, THT, TRT, and TTRT
Network adapters: writev/readv and memory bottleneck
Exercises in Chapter 2 Ex. 42 (Ethernet) Ex. 46 (Ethernet) Ex. 53 (Wi-Fi) Ex. 54 (Wi-Fi)