Local Area Networks (LANs) SMU CSE 5344 / 7344 1
LAN/MAN Technology Factors Topology Transmission Medium Medium Access Control Techniques SMU CSE 5344 / 7344 2
Topologies Topology: the shape of a communication system Most popular topologies for LAN: Star Ring Tree Bus Logical topology vs. Physical topology Logical topology: The way data passes through the network Physical topology: physical structure of the network SMU CSE 5344 / 7344 3
Star Topology Central component of star network is called a hub Separate connections to the hub More expensive than linear topology because of cost of concentrators more cables SMU CSE 5344 / 7344 4
Star Topology in Practice Parallel cables feeding from the hub Look like this SMU CSE 5344 / 7344 5
Ring Topology Computers are connected in a closed loop Connections go directly from one computer to another First passes data to second, second passes data to third, etc Ring ease synchronization; may be disabled if any cable is cut IBM token ring implementation. A token is passed around May be disabled if any cable is cut SMU CSE 5344 / 7344 6
Tree Topology Point-to-point wiring for individual segments Common backbone Overall length of each segment is limited by the type of cabling used If the backbone line breaks, the entire segment goes down More difficult to configure and wire than other topologies. SMU CSE 5344 / 7344 7
Bus Topology Shared cable Each computer has its own connection to the shared cable Shared medium forms the backbone of the network Synchronization only one computer transmits at a time Bus requires fewer cables; may be disable if main cable is cut SMU CSE 5344 / 7344 8
Choice of Topology Reliability Expandability Performance SMU CSE 5344 / 7344 9
LAN Operations LAN properties Control layer managing bits Communication layer getting attention Accommodating multiple access SMU CSE 5344 / 7344 10
LAN Architecture Properties Data transmitted as addressed frames No routing required Necessary OSI Layers Layer 1 - Physical layer Layer 2 - Data link layer Layer 3? SMU CSE 5344 / 7344 11
LAN Operations LAN properties Control layer managing bits Communication layer getting attention Accommodating multiple access SMU CSE 5344 / 7344 12
Functions of LAN Protocol Highest Level Layers Provide one or more SAPs Assemble data into frames, with address and CRC fields On reception, disassemble frame, perform address recognition and CRC validation Govern link access (e.g., CAC) SMU CSE 5344 / 7344 13
Protocol Layers (cont d) Physical Layer Encode/decode signals Bit transmission/reception Modulation PHY DSSS FH IR OFDM PLCP Sublayer PMD Sublayer PHY layer Management Direct Sequence Spread Spectrum Frequency Hoping Physical Layer Convergence Procedure (PLCP) Physical Medium Dependent (PMD) sub-layers. SMU CSE 5344 / 7344 14
MAC Frame Format MAC control - information such as priority Destination MAC address Source MAC address LLC data CRC (Frame Check Sequence field) LLC MAC Service Interface MAC Mgmt Service Interface LLC MAC sublayer MAC Layer Management WEP MAC PHY MAC Mgmt DSSS FH IR OFDM PHY Service Interface PLCP Sublayer PMD Sublayer PHY layer Management SMU CSE 5344 / 7344 15
Logical Link Control Specifies addressing method and controls data exchange Independent of topology, medium, and medium access control Unacknowledged connectionless service higher layers handle error/flow control, or simple apps Acknowledged connectionless service no prior connection necessary Connection-mode service devices without higher-level software SMU CSE 5344 / 7344 16
Medium Access Control Provides a means of controlling access to a shared medium Two techniques in wide use CSMA/CD Token passing LLC frames data, passes it to MAC which frames it again MAC control (e.g. priority level) Destination physical address Source physical address SMU CSE 5344 / 7344 17
LAN Operations LAN properties Control layer managing bits Communication layer getting attention Accommodating multiple access SMU CSE 5344 / 7344 18
Overview of MAC Protocols How do you access a shared media? Channel Partitioning, by time, frequency or code Time Division, Code Division, Frequency Division Random partitioning (dynamic), ALOHA, S-ALOHA, CSMA, CSMA/CD Taking-turns polling token passing SMU CSE 5344 / 7344 19
(Pure) Aloha Station sends a frame whenever it has one Waits for a time equal to the round-trip (RTT) for the signal If the station does not receive an acknowledgment by then, resend the frame Channel utilization very poor (18%) SMU CSE 5344 / 7344 20
Pure ALOHA Success (S), Collision (C), Empty (E) slots In pure ALOHA, frames are transmitted at completely arbitrary times. SMU CSE 5344 / 7344 21
Pure ALOHA Vulnerable period for the shaded frame. SMU CSE 5344 / 7344 22
Slotted Aloha The stations synchronize using a central clock transmission time divided into equal slots Stations are allowed to transmit only at the beginning of the slot Improved channel utilization (37%) due to reduced conflict time SMU CSE 5344 / 7344 23
Efficiency of Aloha S = throughput = goodput (success rate) 0.4 0.3 0.2 0.1 Slotted Aloha Pure Aloha 0.5 1.0 1.5 2.0 G = offered load = Np SMU CSE 5344 / 7344 24
Dynamics of Aloha: Effects of Fixed Probability as We Vary the Number of Active Users desirable stable point successful transmission rate new arrival rate undesirable stable point 0 m Lesson: if we fix p, as N varies: 1) the efficiency is low; 2) may have an undesirable stable point n: number of backlogged stations SMU CSE 5344 / 7344 25
Summary: Problems of Aloha Protocols Low efficiency Pure Aloha Slotted Aloha Undesirable steady state at a fixed transmission rate, when the number of backlogged stations varies Need a better access protocol SMU CSE 5344 / 7344 26
Carrier Sense Multiple Access (CSMA) Based on the observation that signal propagation delay is much smaller than the transmission time Tp: signal propagation delay = distance/signal velocity signal velocity 3 * 108 m/s: free space, optical fiber (300m/us) 2 * 10 8 m/s: copper medium (200m/us) TTx: transmission delay = N/R N=number of bits per frame R = bit rate time to generate bit stream determined by data rate & frame length SMU CSE 5344 / 7344 27
Carrier Sense Multiple Access (CSMA) Listen before you talk don t interrupt If the channel is free send the frame and wait for the acknowledgment If the channel is busy Non-persistent retry 1-persistent retry - most popular p-persistent retry SMU CSE 5344 / 7344 28
Carrier Sense Multiple non-persistent CSMA Access (CSMA) On finding channel busy, station backs-off for a random amount of time and tries later 1-persistent CSMA On finding channel busy, station continues listening and transmits when channel becomes idle p-persistent CSMA On finding channel idle, station transmits with a probability of p, backs-off and tries again when channel is busy SMU CSE 5344 / 7344 29
Collisions can occur: propagation delay means two nodes may not hear each other s transmission CSMA Collisions spatial layout of nodes along Ethernet Collision: entire packet transmission time wasted still not very efficient! SMU CSE 5344 / 7344 30
CSMA/CD (Ethernet) Extension of CSMA polite conversation collisions detected within short time Listen even after transmission has started If a collision is detected during transmission, cease transmission reduces channel wastage wait a random amount of time SMU CSE 5344 / 7344 31
CSMA/CD How long to wait for collision detection? SMU CSE 5344 / 7344 32
CSMA/CD Collision Detection instead of wasting the whole packet transmission time, abort after detection. SMU CSE 5344 / 7344 33
Binary Exponential Backoff If colliding for the first time, wait 0 or 1 time slots (random) Second time wait 0, 1, 2, or 3 slots Third time wait anywhere from 0-7 slots After n collisions wait anywhere from 0-2^n 1 give up after 16 SMU CSE 5344 / 7344 34
CSMA/CD Collision detection: easy in wired LANs: measure signal strengths, compare transmitted, received signals difficult in wireless LANs: receiver shut off while transmitting SMU CSE 5344 / 7344 35
Persistent and Nonpersistent CSMA SMU CSE 5344 / 7344 36
Collision-free Protocols Collision-free protocols: Assume a fixed number of stations (N) each with a unique address 0..N-1 wired into hardware. Uses contention slots where stations can broadcast their intent to transmit SMU CSE 5344 / 7344 37
Collision-free Protocols Bit-map protocol: 1 bit per station overhead Contention (or reservations) slots (bits 0..N-1) followed by actual transmission of data frames (d bits each) At low load, channel efficiency = d/(d+n), since d data bits are transmitted for every N bits of contention slots. At high load, channel efficiency = d/(d+1) SMU CSE 5344 / 7344 38
Collision-Free Protocols Binary Countdown Protocol Scheme attempts to eliminate the contention slot overhead the 1 bit per station scalability problem by using binary station addressing Each station has a unique binary address. Stations who wish to contend for a slot transmit their address bit by bit prior to actual data frame transmission. If a station with a 0-bit contends with a 1-bit, then the station that sent 0 stops contention. This continues until the last address bit is transmitted. No collisions as higher-order bit positions are used to arbitrate between stations wanting to transmit Higher numbered stations have a higher priority SMU CSE 5344 / 7344 39
IEEE 802.2: IEEE 802.3: IEEE 802.4 IEEE 802.5: IEEE 802.6: IEEE 802.9: IEEE 802.x Standards Logic link control (LLC) layer of data link layer Ethernet Token bus, an old protocol Token ring IEEE 802.11: Wireless LAN IEEE 802.12: 100Base-VG IEEE 802.13: 100Base-X IEEE 802.14: Cable modem Distributed queue dual bus (DQDB) protocol, similar to FDDI Integrated voice and data networking, including ISDN SMU CSE 5344 / 7344 40
IEEE Standard 802.3 1-persistent CSMA/CD: A station keep listening to the cable until it is idle; it then starts transmitting its data frame the moment it detects a collision, it terminates its transmission after a collision, a station waits for a random time and starts repeating the above steps Ethernet is only one product that follows the 802.3 standard. There could be several variations of this SMU CSE 5344 / 7344 41
IEEE Standard 802.4: Token Bus Why 802.4? 802.3 does not support priorities, it is not deterministic Token Bus physically linear or tree-structured, but logically a ring Each station has a unique address Each station knows the address of its left and right neighbors in the logical ring. The cable is a broadcast medium So logical neighbors are not necessarily physical neighbors. Each station has several priority queues (0,2,4,6). SMU CSE 5344 / 7344 42
IEEE Standard 802.5: Token Ring Not a broadcast medium; a physical ring topology A token (a special bit pattern) circulates around the ring when all stations are idle The length of a bit on the cable If the speed of propagation is 200 meters/usec and if the speed of transmission is 1 Mbps or 1 bit/usec each bit occupies 200 meters on the ring. A 1 km ring can hold 5 bits Consists of ring interfaces to which stations are connected Each bit arriving at an interface is copied into a 1-bit buffer May be modified and copied out into the ring again Copying and inspection introduces a 1-bit delay SMU CSE 5344 / 7344 43
DQDB - IEEE 802.6 Shared medium Fixed length packets Dual bus Designed for metropolitan area networks SMU CSE 5344 / 7344 44
Synchronization and Timing Transmission consists of steady stream of fixed size slots Head (A/B) responsible for generating the slots for bus A/B Operation controlled by a 125 µs clock Number of slots per cycle depends on the physical bandwidth SMU CSE 5344 / 7344 45
Protocol Architecture Physical Layer DQDB Layer Service Layer (LLC) Connection-less data service Connection oriented service Isochronous service (voice, video) SMU CSE 5344 / 7344 46
MAC Protocol Distributed Queue Access Control Pre-arbitration for isochronous (BW) set Distributed queue arbitration Reservation-based distributed scheme Implemented through two counters (RQ request - and CD -countdown) At light load the delay is very small similar to CSMA/CD At heavy loads highly efficient as in the case of token ring SMU CSE 5344 / 7344 47
Bandwidth Balancing (BWB) Protocol slightly unfair to the nodes towards the middle of the bus Two active nodes, separated by D timeslots Downstream node sets RQ bit Upstream node uses all available slots Takes D timeslots for Request to arrive Takes D timeslots for empty slot to arrive In general, P(available slots) decreases the further downstream a node is connected Without BWB, a node may transmit a segment when CD is 0 and the current QA slot is free SMU CSE 5344 / 7344 48
Bandwidth Balancing (BWB) Without BWB, a node may transmit a segment when CD is 0 and the current QA slot is free BWB is done by restricting transmission to a fraction of unused slots Achieved by artificially incrementing RQ after transmitting n segments BWB counter incremented every time a node transmits a segment When counter reaches 0 the node must skip next free slot SMU CSE 5344 / 7344 49
End of Class 2 SMU CSE 5344 / 7344 50