280 likes | 302 Views
Learn about MAC protocols, CSMA, CSMA/CD, Ethernet, and more! Dive into the world of network protocols, channel allocation, and data transmission techniques.
E N D
Example DLL Protocols 1. High-Level Data Link Control (HDLC). 2. Point-to-Point Protocol (PPP).
HDLC Flag Identifies host. ACK, seq. # CRC
PPP • Internet’s DLL. • Router-to-router. • Home user-to-ISP. • RFC 1661, etc. • PPP is a multi-protocol framing mechanism that can be used over multiple PHYs (dial-up, dedicated point-to-point connections).
Why MAC? • Point-to-point versus shared-medium networks. • Shared-medium networks use “broadcast” channels. • multi-access or random access channels. MAC layer protocols regulate access to medium in shared-medium networks.
MAC and LANs • LANs typically use shared-medium. • Examples? • MAC layer critical! • BTW, in wireless networks also! • WANs typically use point-to-point connections
Channel Allocation Problem • How to allocate single shared, broadcast channel among several stations/users. • If no arbitration, several stations/users may transmit at the same time: COLLISIONS!
MAC Protocols • Contention-based • ALOHA and Slotted ALOHA. • CSMA. • CSMA/CD. • Round-robin : token-based protocols. • Token bus. • Token ring.
Pure ALOHA • In pure ALOHA, frames are transmitted at completely arbitrary times.
Carrier Sense Multiple Access • The capacity of ALOHA or slotted ALOHAis limited by the large vulnerability period of a packet. • By listening before transmitting, stations try to reduce the vulnerability period to one propagation delay. • This is the basis of CSMA.
CSMA • Station that wants to transmit first listens to check if another transmission is in progress (carrier sense). • If medium is in use, station waits; else, it transmits. • Collisions can still occur. • Transmitter waits for ACK; if no ACKs, retransmits.
Channel Busy? Packet ready yes no transmit delay packet transmission k times wait for a round-trip time positive ack? compute random backoff integer k no yes CSMA Protocol • CSMA
CSMA (cont’d) • Collisions can occur only when 2 or more stations begin transmitting within short time. • If station transmits and no collisions during the time leading edge of frame propagates to farthest station, then NO collisions.
CSMA Flavors • After detecting carrier, a station can persist trying to transmit after the channel is idle again. • 1-persistent CSMA (IEEE 802.3) • If medium idle, transmit; if medium busy, wait until idle; then transmit. • If collision, waits random period and starts again. • Non-persistent CSMA: if medium idle, transmit; otherwise wait a random time before re-trying. • Thus, station does not continuously sense channel when it is in use. • P-persistent: when channel idle detected, transmits packet in the first slot.
CSMA versus Aloha Comparison of the channel utilization versus load for various random access protocols.
CSMA/CD • CSMA with collision detection. • Problem: when frames collide, medium is unusable for duration of both (damaged) frames. • For long frames (when compared to propagation time), considerable waste. • What if station listens while transmitting?
CSMA/CD Protocol 1. If medium idle, transmit; otherwise 2. 2. If medium busy, wait until idle, then transmit with p=1. 3. If collision detected, transmit brief jamming signal and abort transmission. 4. After aborting, wait random time, try again.
CSMA/CD Performance • Wasted capacity restricted to time to detect collision. • Time to detect collision < 2*maximum propagation delay. • Rule in CSMA/CD protocols: frames long enough to allow collision detection prior to end of transmission.
CSMA with Collision Detection • CSMA/CD can be in one of three states: contention, transmission, or idle.
Ethernet • IEEE 802. family. • Standards for LANs and MANs. • Ethernet defined in the IEEE 802.3 standard.
Ethernet MAC • CSMA/CD. • Binary exponential back-off. • CRC
Ethernet Frame • Frame formats. (a) DIX Ethernet, (b) IEEE 802.3.
Ethernet Frame Length • At 10Mbps with 2,500 m maximum distance: • RTT ~ 50 microsec. • Thus, at least 500-bit frames. • It is actually 512 bits. • If fewer bits than that, add “padding”.
Ethernet Cabling • The most common kinds of Ethernet cabling.
Switched Ethernet • A simple example of switched Ethernet.
Fast Ethernet The original fast Ethernet cabling.
Gigabit Ethernet • Gigabit Ethernet cabling.
Intro to 802.5 and ATM • 802.5 Token ring networks • ATM – Asynchronous Transfer Mode