150 likes | 307 Views
CSS432 Shared Access Networks Textbook Ch2.6, 2.7, and 2.1.1. Professor: Munehiro Fukuda. 64. 48. 48. 16. 32. Src. Dest. Preamble. Type. Body. CRC. addr. addr. Ethernet Overview. History D eveloped by Xerox PARC in mid-1970s S imilar to IEEE 802.3 standard CSMA/CD
E N D
CSS432 Shared Access NetworksTextbook Ch2.6, 2.7, and 2.1.1 Professor: Munehiro Fukuda CSS 432
64 48 48 16 32 Src Dest Preamble Type Body CRC addr addr Ethernet Overview • History • Developed by Xerox PARC in mid-1970s • Similar to IEEE 802.3 standard • CSMA/CD • Carrier sensemultiple 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) CSS 432
Ethernet Transmit Algorithm • If line is idle… • Send immediately • Upper bound message size of 1500 bytes: MTU (Maximum Transmission Unit) • Must wait 9.6us between back-to-back framesWhy? (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) CSS 432
Transmit Algorithm (cont) • If collision… • Send a 32-bit jamming sequent, and then stop transmitting frame (64bit preamble + 32bit jam = 96bit) • Minimum frame is 64 bytes (header + 46 bytes of data)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 CSS 432
Collisions 500m x 5 = 2500m (with 4 repeaters) A B Time t A B Time t + d (d = 25.6us) A B A collision occurred Jam seq A B Time t + 2d (2d = 51.2us) 10Mbps x 51.2us = 10 x 106 x 51.2 x 10-6 = 512bits = (64bytes) CSS 432
8 8 48 48 8 32 24 Start of Dest Src End of Control Body CRC Status frame addr addr frame 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 CSS 432 Priority bits
Timed Token Algorithm: IEEE802.5 • Token Holding Time (THT) • Upper limit on how long a station can hold the token: 10ms • Token Rotation Time (TRT) • How long it takes the token to traverse the ring. • TRT <= ActiveNodes x THT + RingLatency • Target Token Rotation Time (TTRT) • Agreed-upon upper bound on TRT • Each node measures TRT between successive tokens • if measured-TRT > TTRT: token is late so don’t send • if measured-TRT < TTRT: token is early so OK to send • Worse case: 2xTTRT between seeing token CSS 432
Timed Token Algorithm: FDDI • Two transfer modes • Synchronous traffic • Real time traffic: voice data • Can always send must be bounded by TTRT • Time to send: Ts = (TTRT – RingLatency)/Nodes • Asynchronous traffic • High throughput: bulk data • Can send only if token is early • TRT = time since last token • If TRT > TTRT • Token is late • Send synchronous data for Ts • Don’t send asynchronous data • If TRT < TTRT • Token is early • Send synchronous data for Ts • THT = TTRT - TRT • Send asynchronous data for THT CSS 432
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 CSS 432
Monitor Station • 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 wins. • Token Generation • Wait for NumStations x THT + RingLatency • Generate a new token • Corrupted/orphaned frame removal • Frame status • A bit: the destination station started to receive it • C bit: the frame was accepted. CSS 432
Interrupt Network Adapters Host Computer CPU Network Interface Card (NIC) Programmed I/O Network Processor I/O bus Controller memory DMA Network Link FIFO PCI Bus System Bus Bus Interface Link Interface FIFO Memory 32bit, 33MHz = 1056Mbps 633Mbps STS-12 1000Mbps Ehternet CSS 432
Network Adapters (Cont’d) • Network Processor • Intel IXP series • Myrinet Lanai series • FPGA • Scatter-read/Gather write • writev( ) and readv( ) system calls • ssize_t readv( int fd, const struct iovec *iov, int iovcnt ) • ssize_t writev( int fd, const struct iovec *iov, int iovcnt ) • struct iovec { • void *iov_base; • Size_t iov_len; • }; Buffer descriptor list Memory buffers 100 1400 1500 1500 CSS 432
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 OS DMA-manageable memory CSS 432
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. 43 (Ethernet) • Ex. 47 (Ethernet) • Ex. 57 (Token ring) • Ex. 59-(a) only (Token ring). Instead, solve p15. CSS 432
Consider FDDI’s timed token algorithm with the following parameters: Token: immediate release #hosts = 3 Ring latency = 6μs (i.e, 2μs to pass a token from one to another host) Ts (Time for sending synchronous data) = 20μs TTRT (Target token rotation time) = 100μs Let’s assume that none of those three hosts sends any data in the first token rotation, however all of them maximize their opportunity of sending data from the second rotation. In other words, each host sends its synchronous data per every token rotation as well as asynchronous data “if allowed”. Fill out the following blanks by keeping track of the first three token rotations. CSS 432