230 likes | 380 Views
LAN Media Access. Lecture 6, April 4, 2003 Mr. Greg Vogl Data Communications and Networks Uganda Martyrs University. Sources. Hodson Ch. 8.3-8.4, 9 Stamper Ch. 7 BITDCO lectures 8, 9, 15. Overview. OSI Data Link Layer LAN Standards LAN Access Methods. OSI Layers and Sub-layers.
E N D
LAN Media Access Lecture 6, April 4, 2003 Mr. Greg Vogl Data Communications and Networks Uganda Martyrs University
Sources • Hodson Ch. 8.3-8.4, 9 • Stamper Ch. 7 • BITDCO lectures 8, 9, 15 Data Communications and Networks: LAN Media Access
Overview • OSI Data Link Layer • LAN Standards • LAN Access Methods Data Communications and Networks: LAN Media Access
OSI Layers and Sub-layers • Data Link Layer • Logical Link Control • Media Access Control • Physical Layer • Media Signalling (voltages, frequencies) • Bus Interface Unit • Communication Interface Unit • Medium Data Communications and Networks: LAN Media Access
Data Link Layer Tasks • Delineation of data (start, end, size) • Error control (parity, CRC) • Addressing (source, destination) • Transparency (can send any data bits) • Code independence (ASCII/EBCDIC) • Media access (which device can transmit) Data Communications and Networks: LAN Media Access
LAN Standards • IEEE 802.3: Ethernet • IEEE 802.4: Token Bus • IEEE 802.5: Token Ring • IEEE 802.6: MAN • IEEE 802.7: Broadband • IEEE 802.11: wireless/cableless • IEEE 802.12: 100Mbps • ISO 9314: FDDI Data Communications and Networks: LAN Media Access
Some Popular LAN Standards • 10base5: 10 Mbps, baseband, thick coax, <500m • 10base2: 10 Mbps, baseband, thin coax, <200m • 10baseT: 10 Mbps, baseband, twisted pair • 100baseTX: 100 Mbps, baseband, twisted pair • 100baseFX: 100 Mbps, baseband, fibre optic • 1000baseSX: 1000 Mbps, baseband, fibre optic • 100VG-AnyLAN: twisted pair, CSMA/CD; token Data Communications and Networks: LAN Media Access
Topologies, Protocols, Media Data Communications and Networks: LAN Media Access
Ethernet vs. Token Ring Data Communications and Networks: LAN Media Access
LAN Access Control Methods • Carrier sense multiple access (CSMA) • p-persistent, CMSA/CD, CSMA/CA • Token passing • Token ring, token bus, slotted ring • Dedicated lines • Demand priority, fast switching Data Communications and Networks: LAN Media Access
Carrier Sense Multiple Access • Listen to the medium for a signal • If not busy, transmit • If another is transmitting, wait until later • If >1 transmit at once, collision/corruption • CSMA is a broadcast protocol • Similar to a multiple-party phone line • All workstations check all messages • Ignored if address is not destination address Data Communications and Networks: LAN Media Access
P-persistent CSMA • If busy, wait until idle • If idle, do not immediately transmit • Maybe wait a delay interval or slot time • Transmit with probability p in each slot • If p=1.0, probability of both colliding is 1.0 • If p=0.5, probability of both colliding is .25 • Average delay = (1-p)/p slot times • Lower p gives fewer collisions but longer delay Data Communications and Networks: LAN Media Access
Collision Detection • Collision damages data, makes it unusable • Time wasted if continuing during collision • Listen while you talk • Abort sending as soon as collision detected • Also send short signal indicating a collision Data Communications and Networks: LAN Media Access
Retransmission • If nobody waits, another collision will occur • Choose to wait a random interval • from 0 to 2n slot times • If more collisions, wait up to 2x as long • from 0 to 2n+1 slots Data Communications and Networks: LAN Media Access
Limits • Maximum propagation delay <5 microsec. • Collisions are rare (typically 20-30x/day) • Possibly many collisions if overloaded • Network performance will drop • No guaranteed upper bound on access time • min. packet size and max. medium length • so short msg. not sent before collision detected • Limited number of devices per segment • Depends on hardware, OS, traffic Data Communications and Networks: LAN Media Access
Collision Avoidance • Similar to p-persistent CSMA • Send reservation bits, wait, then send msg. • Need to wait for reservation to propagate • Option to use slots with priorities • Some computers may have long delays • only needed when load is very heavy Data Communications and Networks: LAN Media Access
Token Passing • Need permission before transmitting • The one device with the token can transmit • All other devices without token must wait • Round robin scheduling • Similar to TDM but each can give up its slot • If nothing to transmit, pass token to next device Data Communications and Networks: LAN Media Access
Benefits and Limits • No collisions or retransmissions • No random waiting • Maximum wait = token circulation time • Performance is deterministic, predictable, stable • Even a large network with heavy load • Time wasted passing the token around ring • Every node must wait before transmitting • Longer delays for larger rings Data Communications and Networks: LAN Media Access
Implementation • Each station receives and retransmits • Only the intended receiver reads message • Token = preamble+control field+ postamble • To claim/free the token, invert its control bit • Differential Manchester encoding for synch. • Receiver attaches ACK to end of message • Sender receives own message with ACK Data Communications and Networks: LAN Media Access
Token Monitor • One station is designated the active monitor • Monitor checks that the token is circulating • If token is lost, the monitor makes new one • If monitor fails, a new monitor is chosen Data Communications and Networks: LAN Media Access
Token Bus • Physically a bus, logically a ring • Stations sequenced by their addresses • Each station knows previous & next address • Station with highest address gets token first • Procedures needed to add/remove stations • Entire token data structure passed at once • Usually uses broadband; real-time uses Data Communications and Networks: LAN Media Access
Network Interface Card • Manages Media Access Control • MAC address • Unique for every NIC • 48 bits, 6 bytes • Grouped in 6 fields of 2 hex characters • E.g. 00:00:C0:76:5A:26 • Right three bytes are unique card address Data Communications and Networks: LAN Media Access
IEEE 803.2 Ethernet Frame • 8 bytes: Preamble and start frame delimiter • 2/6 bytes: Destination address • 2/6 bytes: Source address • 2 bytes: Length • 0-1500 bytes: Data • 46-0 bytes: Pad (to assure at least 64 bytes) • 4 bytes: 32-bit CRC Data Communications and Networks: LAN Media Access