Objectives Understand shared medium access methods of Ethernet; Describe network aspects for an Ethernet network; Local Area Networks: Ethernet Dots. Toomas Tommingas Chair of Real-Time Systems (RAS) PART A: The CSMA/CD Access Method PART B: Network Aspects ©1998 T.Tommingas, TTU ©1998 T.Tommingas, TTU LAN 1 LAN 2 Motivation for LANs goal: connect computers in same site (building, small campus) experience from host centric networks: bursty traffic basic idea: share a cable, no complex software in end system Part A: The CSMA/CD Access Method altenatives? ❍ switch based LANs: connection oriented: ATM ❍ switch based LANs: connectionless. Switched Ethernet ©1998 T.Tommingas, TTU Access Method ❍ multiaccess communication = share a communication medium LAN 4 Access Method Topology Two topologies are used ❍bus: ❑ ❑ ❑ ❑ ❑ radio channel, cellular networks, satellite links ❑ machine bus ❑ local area cable ❍ shared medium requires an Access Method all bits sent by one station are propagated to all stations data die at end of bus all stations see all frames used by Ethernet, Token Bus ❍ring: ❑ deterministic: ❑ all bits are passed from one station to next station, then to next’s neighbour, etc ❑ bits eventually return to originating station which has to remove them ❑ all stations see all frames ❑ used by Token Ring and FDDI ¤ Time Division Multiple Access (TDMA) ¤ Token Passing (Token Ring, Token Bus, FDDI) ❑ non-deterministic ¤ Aloha ¤ CSMA/CD ©1998 T.Tommingas, TTU ©1998 T.Tommingas, TTU LAN 3 LAN 5 ©1998 T.Tommingas, TTU LAN 6 ALOHA Access Method Topology (cont.) Central host Access Method topology = physical topology = topology used by bits ❍logical topology = topology used by the token in case of Token Bus (logical ring over a physical bus) ❍cabling topology = layout of cables = star in most cases (see later) ©1998 T.Tommingas, TTU data ack transmission i procedure = 1 while (i ≤ maxAttempts) do send packet listen for ack during one RTD if ack received then leave else resend increment I end do ©1998 T.Tommingas, TTU LAN 7 LAN 8 CSMA G CSMA improvement 3: detect collisions as soon as they occur : “Carrier Sense Multiple Access / Collision Detection” Improvement 1: Listen before you talk: “Carrier Sense Multiple Access” J # 7 ≤ 1 # /1 !"#$ . % 3 .% 4 0 /& ' ' % D F 5 . /0 & '0 5 0 / F D# * /& % % /. & * . 6'& !K6/0 6 6/& ! * #% %(, & /. & 6 * 5' .0 /& ' 5 6 6/+ & 9 % /&2% 6/< 2 0 /& ' & D FK 5 /0'L,MN O P / -Q ! F D ' 4 #0 /& . 6'> * #& ? " 0 /& ≤ !#"#$ % %*'+ %- ./% '&)(' & '.&' &, % 3 1*'8 2 4 % .'9 4 0 / &, 1 5 6'07 '1 //A,& B': 6/01 2'6/( ; * 8 * < & 6 .>= ,#?@ 4 70 '& 0 . 6/ C ED F * 6 % % 6'&1F D * ? " & 0 //& H I Improvement 2: Wait random time before retransmission ©1998 T.Tommingas, TTU ©1998 T.Tommingas, TTU LAN 9 CSMA/CD Time Diagram 1 R S A senses idle channel, starts transmitting A ©1998 T.Tommingas, TTU A T A senses collision, continues to transmit 32 bits (“jam”) 0 T U LAN 11 LAN 10 CSMA/CD Time Diagram 2 B shortly before T, B senses idle channel, starts transmitting improvement 4: acknowledgments replaced by CD This is Ethernet (≈ 802.3, the standard conformant version of Ethernet) B 0 T B senses collision, continues to transmit 32 bits (“jam”) ©1998 T.Tommingas, TTU LAN 12 CSMA/CD Time Diagram 3 A Z Y X W V A waits random time t1 B waits random time t2 B senses channel idle and transmits A senses channel busy and defers to B A now waits until channel is idle CSMA/CD [ B 0 \ ] _ ` t2 Stations detect collisions and stop transmitting. Re-attempt to transmit after a random time. Acknowledgements ^ absence of collision. The interframe delay (“gap”) is 9.6 µs. If repeated collisions occur, then the time before retransmission increases exponentially. t1 ©1998 T.Tommingas, TTU ©1998 T.Tommingas, TTU LAN 13 Minimum Frame Size Exponential Backoff a random time before re-transmission is given by: c t = 0: d t = 1- ε: B begins transmission e t=1: f t = 2- ε: A detects collision k = min (10, AttemptNb) r = random (0, 2k - 1) * slotTime b LAN 14 examples: ❍ first retransmission attempt: B A B A B A B B detects collision, stops transmitting k = 1; r = 0 or r = slotTime ❍second retransmission attempt (if preceding one failed): A A begins transmission k = 2; r = 0, 1, 2 or 3 * slotTime ©1998 T.Tommingas, TTU ©1998 T.Tommingas, TTU LAN 15 SlotTime and Minimum Frame Size g CSMA/CD Performance a minimum frame size equal to number of bits transmitted during one round trip is required to detect all collisions slotTime = number of bits transmitted by a source during the maximum round trip time for any ethernet network ❑ slotTime = round trip time + jam time + safety margin ❑ = 512 bits (corresponding to 51.2 µs) h k Bound on throughput: θ ≥ 1 / ( 1 + 3.1 α ) where α = β / L = 2 * propagation delay / transmission time with L = frame size, β = bandwidth-delay product Approximation: includes propagation time in repeaters + margin: 4 repeaters + 5 segments + 2 stations = 2*21.2 µs + 2*1 µs = 44.4 µs j i l o rule: in Ethernet, all frames must be as large as slotTime o properties: P1: all collisions are detected by sources P2: collided frames are shorter than slotTime LAN 16 m θ ≈ 1 / ( 1 + 2.5 α ) o Key for high utilization is: bandwidth delay product << frame size Proof: P1 see previous slide P2 because collided frame are aborted by source at the latest after slotTime, including jam bits ©1998 T.Tommingas, TTU LAN 17 ©1998 T.Tommingas, TTU LAN 18 Bandwidth Delay Product n Bandwidth Delay Product L [m] Interpretation of bandwidth-delay product time A v [m/s] o β= 2DR LAN 19 2.3E+08 8.7E-07 2.3E+08 4.3E-06 2.3E+08 4.3E-05 2.3E+08 0.15652 100000 100000 100000 100000 0.17 0.87 8.70 31304.35 0.02 0.11 1.09 3913.04 0.00 0.00 0.00 3.82 100000000 100000000 100000000 100000000 86.96 173.91 869.57 8695.65 10.87 21.74 108.70 1086.96 0.01 0.02 0.11 1.06 1E+09 869.57 108.70 1E+09 1739.13 217.39 1E+09 8695.65 1086.96 1E+09 86956.52 10869.57 1E+09 ########## ######### 0.11 0.21 1.06 10.61 38213.32 We have: x1 = R x2 = 1/µ in average E(x3 | collision occured) = 2R; Prb (collision occured) = 1 - exp(-Rµ) E(x3 | successful transmission ) = T; Prb (successful transmission ) = exp(Rµ) The last formula is because collisions can occur only if an arrival occurs during the propagation time R, because of collision avoidance. The average cycle time is thus, for this worst case scenario: τ = R + 1/µ + 2R(1- exp(-Rµ)) + T exp(-Rµ) and the corresponding utilization: θmax = average useful time per cycle / average cycle duration = T exp(-Rµ) / τ computing the maximum of θmax with respect to x = R µ gives the formula (maximum obtained for x = 0.43). Note that α = 2R / T. r q 100 200 1000 10000 2.3E+08 2.3E+08 2.3E+08 2.3E+08 2.3E+08 4.3E-07 2.3E+08 8.7E-07 2.3E+08 4.3E-06 2.3E+08 4.3E-05 2.3E+08 0.15652 for a large network, β is close to 60 Bytes; for traffic with small frames (L = 64 bytes), the utilization is less than 30 %. For large frames (1500 Bytes), it is around 90%. ©1998 T.Tommingas, TTU LAN 21 LLC MAC Frame MAC MAC MAC PHY PHY bits PHY Application Presentation Session Transport LLC Logical Link Control MAC Media Accass Control PLS Physical Layer Signaling Network -DTE DTE (AUI not exposed) AUI Data Link AUI = Attachment Unit Interface MAU = Medium Attachment Unit MDI = Medium Dependent Interface MAU PMA MDI Medium PMA = Physical Medium Attachment ©1998 T.Tommingas, TTU LAN 22 ❍Extend network beyond cable length limit ❍function of a simple (2 port-) repeater: ❑ repeat bits received on one port to other port ❑ if collision sensed on one port, repeat random bits on other port Repeater ❍One repeated network = one collision domain ❍Even with repeaters, network is limited: ❑ propagation time ❑ 51.2us slotTime includes repeaters ❑ at most 4 repeaters in one path ❑ Repeaters perform physical layer functions only (bit repeaters) ❍data packet = MAC service data unit (SDU) ❍MAC frame = MAC protocol data unit (PDU) ©1998 T.Tommingas, TTU LAN ETHERNET LAYERS Repeaters •data packet •status information data packet LAN 20 OSI REFERENSE MODEL LAYERS MAC Service LLC 0.00 0.01 0.11 382.13 ©1998 T.Tommingas, TTU Physical the approximation shown is based on simulations LLC 4.3E-07 8.7E-07 4.3E-06 4.3E-05 17.39 2.17 86.96 10.87 869.57 108.70 3130434.78 391304.35 IEEE Architecture Model CSMA/CD Performance p [KB] 200 1000 10000 36000000 100 200 1000 10000 36000000 ©1998 T.Tommingas, TTU ß=2*D*R [bit] [Byte] 10000000 10000000 10000000 10000000 last bit sent by A arrives large β means: delayed feedback R [bit/s] 2.3E+08 8.7E-07 2.3E+08 4.3E-06 2.3E+08 4.3E-05 2.3E+08 0.15652 B B says: “stop” D[s] 200 1000 10000 36000000 LAN 23 ©1998 T.Tommingas, TTU LAN 24 From Repeaters to Hubs ❍Multiport repeater: From Bus to Star and Tree ❑ (n ports) logically equivalent to n simple repeaters connected to one internal Ethernet segment t ❑ Multi-port repeaters it is possible to use point-topoint segments (Ethernet in the box) ❑ Value of point to point cabling ? u Ethernet Hub S1 ¤ ease of management ¤ fault isolation UTP segment S3 v Multiport Repeater S2 ©1998 T.Tommingas, TTU Ethernet today = active fiber coax console concentrators allow star Intermediate Intermediate wiring Hub Hub NMA NMA UTP on point-to-point UTP coax configurations only Intermediate remote network Hub NM Application NMA management transceiver How many frames can be cable transmitted in parallel in this network?________ ©1998 T.Tommingas, TTU LAN 25 Repeaters and Bridges in OSI 7 6 5 4 3 2 1 Application Application Presentation Presentation Session Session Transport Transport Network LLC (MAC Frame) (MAC Frame) MAC Network LLC MAC MAC Physical Physical Physical Physical End system Repeater Bridge End system ❑ Bridges operate at layer 2 ❑ Repeaters operate in layer 1 ❑ Layer 3 intermediate systems - routers LAN 27 LAN 26 Switched Ethernet 7 6 5 4 3 ❑ Switched Ethernet = Bridge in the Box ❑ Total Bandwidth is not shared: parallel frame transmission ❑ An Ethernet Switch is a connectionless data switch ❑ Ethernet used as a point-to-point mechanism! 2 Frame Switching Hub 1 Frame Switching Hub Bridge B1 1 A ©1998 T.Tommingas, TTU Head hub Head hub NMA s Multiport Repeater 2 B 3 Bridge B2 4 1 5 C D U 2 3 V 4 5 W ©1998 T.Tommingas, TTU X LAN 28 Today’s Concentrators ❑ Concentrators (=hub) combine bridging (frame switching) and port switching (assign repeater ports to the same collision domain) ❑ NB! Broadcast! Frame Switching Hub 1 A B 2 3 4 C Bridge 3a B2 1 5 D MAC Frame U 2 V 3 4 W 1 octet Repeater 5 LLC PDU LLC PDU CRC DSAP 1 SSAP 1 or 2 variable LLC control Information X LLC Address Fields ©1998 T.Tommingas, TTU MAC Destination Source Preabmle control MAC address MAC address Frame Switching Hub Bridge B1 MAC Frame Format 7+1 LAN 29 I/G DSAP value ©1998 T.Tommingas, TTU I/G SSAP value LAN 30 LLC - LSAP MAC Addresses 7+1 MAC Frame LSAP - LLC Access point, SAP Source and Destination VALUE 00 10 AA E0 F0 F5 Assignment TCP/IP (DoD) NetWare SNAP (Subnetwork Access Protocol) NetWare NetBios LAN Network Manager Group MAC Destination Source Preabmle control MAC address MAC address Manufacturer ID NIC ID I/G U/L Address in 46 bits Address in 15 bits ©1998 T.Tommingas, TTU LAN 31 LAN 32 Token Ring (IEEE 802.5) Frame pa SD AC FC Token pa SD AC ED PPP AC JK1JK1 ED ACrr FS T M I DA RRR E ACrr SA Data FCS FDDI ED FS PPP Priority bits; T Token bit M monitor bit; RRR Reservation bits Frame pa SD FC DA Token pa SD FC FS FC C L J,K non-dada (CPFSK); I intermiediate frame; E error bit ED A address recognition bit; C Copy bit; r r - reserved FS ©1998 T.Tommingas, TTU EACr I E EACr Data FCS ED FS C synchr./asynchr.; L 16/48 bit addressing FF (LLC/MAC/..); ZZZZ control frame type J,K non-dada (CPFSK); I intermiediate frame; E error bit E error recognized; A address recognized; C frame copied; r - reserved LAN 34 FDDI Capacity Allocation y ❑ seize token by aborting the token transmission instead of flipping the T-bit; ❑ early token release (already in 16 Mbps version) z Frame Status (FS) field ❑ each station checks any passing frames and sets E bit accordingly ❑ MAC protocol does not attempt to retransmit the frame with E bit set. It is the responsibility of LLC or some higher-layer protocol. ©1998 T.Tommingas, TTU ZZZZ SA ©1998 T.Tommingas, TTU LAN 33 Key differences compared to 802.5: x FF JK1JK1 FDDI MAC protocol w CRC I/G = 0 Individual address I/G = 1 Group address U/L = 0 Globally administered U/L = 1 Locally administered 3 octets Address Field I/G ©1998 T.Tommingas, TTU LLC PDU LAN 35 { The priority scheme of 802.5 not applicable due to “early token release” FDDI capacity-allocation scheme seeks to accommodate a mixture of stream and bursty traffic use of synchronous and asynchronous frames ©1998 T.Tommingas, TTU LAN 36 100 BASE-X FDDI Capacity Allocation IEEE 802.3 (10O-Mbps) | TTRT - Target Token Rotation Time: 10OBASE -X DMax + FMax + TokenTime + Σ Sai ≤ TTRT 10OBASE -TX Sai DMax FMax TokenTime 2 Cat 5 UTP ©1998 T.Tommingas, TTU LAN 37 100 BASE-TX 2 pair, STP 4B5B, MLT-3 Signalling technique 2 Optical Fiber 4 Cat 3 or Cat 5 UTP 2 STP ©1998 T.Tommingas, TTU LAN 38 Bus A 100 BASE-FX 100 BASE-T4 2 pair, 2 optical fibers 4 pair, Cat 3, Cat 5 UTP 4 or 5 UTP 4B5B, 4B5B, 8B6T, MLT-3 NRZI NRZ 100 Mbps 100 Mbps 100 Mbps 100 Mbps Maximum segment length 100 m 100 m 100 m 100 m Network span 200 m 200 m 200 m 200 m Data rate 10OBASE -T4 DQDB - Distributed Queue Dual Bus IEEE 802.3 Physical Layer Transmission medium 10OBASE -FX = synchronous allocation for station i = propagation delay for one complete cirquit of the ring = time required to transmit a max length frame (4500 o) = time required to transmit a token Transmit data when no downstream (A) requests are pending; transmit free slot for each pending request Receive segments addressed to x Node 0 = head (A) Keep a count of downstream (A) requests Transmit data when free slot passes and no downstream (A) requests are pending Node x Set request bit to reserve future slot on bus A Receive segments addressed to(N-2) Transmit when free slot passes Node (N-2) Keep a count of downstream (A) requests Receive segments addressed to (N-1) Node (N-1) = head (B) Set request bit to reserve future slot on bus A Bus B ©1998 T.Tommingas, TTU LAN 39 DQDB (IEEE 802.6) Frame, 125µs Header m Byte Slot 0 53 Byte Slot N 53 Byte Stuffing 0-52 B Slot 53 Byte Header m Byte Busy 1 bit Segment, 52 Byte Sl-Type 1 bit PSR 1 bit Reserv 2 bits Request Header 3 bits 4 Byte Payload 48 Byte Previous Slot Reserved ©1998 T.Tommingas, TTU LAN 41 ©1998 T.Tommingas, TTU LAN 40