EE 122: Ethernet and

Similar documents
High Level View. EE 122: Ethernet and Random Access protocols. Medium Access Protocols

Summary of MAC protocols

COMP/ELEC 429/556 Introduction to Computer Networks

Medium Access Protocols

Lecture 5 The Data Link Layer. Antonio Cianfrani DIET Department Networking Group netlab.uniroma1.it

Lecture 6 The Data Link Layer. Antonio Cianfrani DIET Department Networking Group netlab.uniroma1.it

Review. Error Detection: CRC Multiple access protocols. LAN addresses and ARP Ethernet. Slotted ALOHA CSMA/CD

CS 43: Computer Networks. 27: Media Access Contd. December 3, 2018

Topics. Link Layer Services (more) Link Layer Services LECTURE 5 MULTIPLE ACCESS AND LOCAL AREA NETWORKS. flow control: error detection:

Getting Connected (Chapter 2 Part 4) Networking CS 3470, Section 1 Sarah Diesburg

Link Layer and Ethernet

CSMA/CD (Collision Detection)

Link Layer and Ethernet

Computer Networks Medium Access Control. Mostafa Salehi Fall 2008

CS 43: Computer Networks Media Access. Kevin Webb Swarthmore College November 30, 2017

The Link Layer II: Ethernet

Links Reading: Chapter 2. Goals of Todayʼs Lecture. Message, Segment, Packet, and Frame

Lecture 8 The Data Link Layer part I. Antonio Cianfrani DIET Department Networking Group netlab.uniroma1.it

CSE 461: Multiple Access Networks. This Lecture

Chapter 5 Link Layer and LANs

Computer Network Fundamentals Spring Week 3 MAC Layer Andreas Terzis

Ethernet. Typical Setup. Names. Operations. Operations Switch: No Collisions EECS 122. Hub: Single Collision Domain

Adaptors Communicating. Link Layer: Introduction. Parity Checking. Error Detection. Multiple Access Links and Protocols

Computer Networks. Today. Principles of datalink layer services Multiple access links Adresavimas, ARP LANs Wireless LANs VU MIF CS 1/48 2/48

ECE 4450:427/527 - Computer Networks Spring 2017

1-1. Switching Networks (Fall 2010) EE 586 Communication and. November 8, Lecture 30

Outline. Introduction to Networked Embedded Systems - Embedded systems Networked embedded systems Embedded Internet - Network properties

CMPE 257: Wireless and Mobile Networking

Data Link Layer, Part 5. Medium Access Control

The Link Layer and LANs. Chapter 6: Link layer and LANs

Multiple Access Links and Protocols

CMPE 150/L : Introduction to Computer Networks. Chen Qian Computer Engineering UCSC Baskin Engineering Lecture 16

LAN PROTOCOLS. Beulah A AP/CSE

Link Layer and LANs 안상현서울시립대학교컴퓨터 통계학과.

Computer Networking Lecture 5 Data link Layer Access Control. Based on slides by Peter Steenkiste Copyright, Carnegie Mellon

Data Link Layer: Multi Access Protocols

Chapter 5: Link layer

Chapter 5 Link Layer and LANs

Reminder: Datalink Functions Computer Networking. Datalink Architectures

CMPE 257: Wireless and Mobile Networking

Link Layer and LANs. Our Goals. Link Layer

Data Link Layer, Part 3 Medium Access Control. Preface

Physical Layer. Medium Access Links and Protocols. Point-to-Point protocols. Modems: Signaling. Modems Signaling. Srinidhi Varadarajan

Chapter 5 Link Layer and LANs

CSE 461: Multiple Access. Homework: Chapter 2, problems 1, 8, 12, 18, 23, 24, 35, 43, 46, and 58

Data and Computer Communications. Chapter 11 Local Area Network

Contention Protocols and Networks

CS 455/555 Intro to Networks and Communications. Link Layer

Lectures Ethernet

COS 140: Foundations of Computer Science

Ethernet. Lecture 6. Outline. Ethernet - Physical Properties. Ethernet - Physical Properties. Ethernet

Chapter 5: DataLink Layer

CSC 4900 Computer Networks: The Link Layer

Random Access. 1. Aloha. 2. Slotted Aloha 3. CSMA 4. CSMA/CD

Lecture 6. Data Link Layer (cont d) Data Link Layer 1-1

Lecture 6. Reminder: Homework 2, Programming Project 2 due on Thursday. Questions? Tuesday, September 13 CS 475 Networks - Lecture 6 1

Master Course Computer Networks IN2097

Link Layer: Retransmissions

Chapter V: Link Layer

MULTIPLE ACCESS PROTOCOLS 2. 1

Lecture 9: Bridging. CSE 123: Computer Networks Alex C. Snoeren

Computer Networks Principles LAN - Ethernet

Adaptors Communicating. Link Layer: Introduction. Parity Checking. Error Detection. Multiple Access Links and Protocols

Medium Access Control. CSCI370 Lecture 5 Michael Hutt New York Institute of Technology

Module 10 Data Link Layer CS655! 10-1!

CS 716: Introduction to communication networks. - 9 th class; 19 th Aug Instructor: Sridhar Iyer IIT Bombay

CSC 4900 Computer Networks: Link Layer (2)

Protocols for Multiaccess Networks

Aloha and slotted aloha

Medium Access Control

Lecture 9 The Data Link Layer part II. Antonio Cianfrani DIET Department Networking Group netlab.uniroma1.it

Principles behind data link layer services

COS 140: Foundations of Computer Science

Ethernet. Introduction. CSE 3213 Fall 2011

Master Course Computer Networks IN2097

Redes de Computadores. Medium Access Control

Goals of Today s Lecture. Adaptors Communicating

Chapter 5 Link Layer. Computer Networking: A Top Down Approach. 6 th edition Jim Kurose, Keith Ross Addison-Wesley March 2012

CCM 4300 Lecture 6 Computer Networks, Wireless and Mobile Communications. Dr Shahedur Rahman. Room: T115

Links. CS125 - mylinks 1 1/22/14

Chapter 4. The Medium Access Control Sublayer. Points and Questions to Consider. Multiple Access Protocols. The Channel Allocation Problem.

Link Layer. (continued)

ECEN 5032 Data Networks Medium Access Control Sublayer

Wireless MACs: MACAW/802.11

Data Link Layer. Our goals: understand principles behind data link layer services: instantiation and implementation of various link layer technologies

RMIT University. Data Communication and Net-Centric Computing COSC 1111/2061/1110. Lecture 8. Medium Access Control Methods & LAN

CS 3640: Introduction to Networks and Their Applications

Links. Error Detection. Link Layer. Multiple access protocols. Nodes Links Frame. Shared channel Problem: collisions How nodes share a channel

Link layer, LANs: outline. Chapter 5-1 Link Layer. Link layer: introduction. Link layer services

CS 123: Lecture 12, LANs, and Ethernet. George Varghese. October 24, 2006

Chapter 6 Medium Access Control Protocols and Local Area Networks

Chapter V: Link Layer

CSCD 433 Network Programming Fall Lecture 7 Ethernet and Wireless

Lecture 8 Link Layer: functionality, error detection, media access algorithm

Data Link Layer: Overview, operations

COMPUTER NETWORKS - Local area networks

Local area networks. Copyright

Lecture 19. Principles behind data link layer services Framing Multiple access protocols

CARRIER SENSE MULTIPLE ACCESS (CSMA):

CSE/EE 461 Section 2

Transcription:

EE 122: Ethernet and 802.11 Ion Stoica September 18, 2002 (* this talk is based in part on the on-line slides of J. Kurose & K. Rose)

High Level View Goal: share a communication medium among multiple hosts connected to it Problem: arbitrate between connected hosts Solution goals: - High resource utilization - Avoid starvation - Simplicity (non-decentralized algorithms) istoica@cs.berkeley.edu 2

Medium Access Protocols Channel partitioning - Divide channel into smaller pieces (e.g., time slots, frequency) - Allocate a piece to node for exclusive use Random access - Allow collisions - recover from collisions Taking-turns - Tightly coordinate shared access to avoid collisions istoica@cs.berkeley.edu 3

Random Access protocols When node has packet to send - Transmit at full channel data rate R. - No a priori coordination among nodes Two or more transmitting nodes -> collision, Random access MAC protocol specifies: - How to detect collisions - How to recover from collisions Examples of random access MAC protocols: - Slotted ALOHA - CSMA and CSMA/CD istoica@cs.berkeley.edu 4

Slotted Aloha Time is divided into equal size slots (= packet transmission time) Node with new arriving pkt: transmit at beginning of next slot If collision: retransmit pkt in future slots with probability p, until successful. Success (S), Collision (C), Empty (E) slots istoica@cs.berkeley.edu 5

Slotted Aloha Efficiency What is the maximum fraction of successful transmissions? Suppose N stations have packets to send - Each transmits in slot with probability p - Prob. successful transmission S is (very approximated analysis!): by a particular node: S = p (1-p) (N-1) by any of N nodes S = Prob (only one transmits) = N p (1-p) (N-1) <= 1/e = 0.37 istoica@cs.berkeley.edu 6

CSMA: Carrier Sense Multiple Access CS (Carrier Sense) means that each node can distinguish between an idle and a busy link Sender operations: - If channel sensed idle: transmit entire packet - If channel sensed busy, defer transmission Persistent CSMA: retry immediately with probability p when channel becomes idle Non-persistent CSMA: retry after a random time interval istoica@cs.berkeley.edu 7

CSMA collisions Collisions can occur: propagation delay means two nodes may not hear each other s transmission Collision: entire packet transmission time wasted Note: role of distance and propagation delay in determining collision prob. istoica@cs.berkeley.edu 8

CSMA/CD (Collision Detection) Collisions detected within short time Colliding transmissions aborted, reducing channel wastage Easy in wired LANs: measure signal strengths, compare transmitted, received signals Difficult in wireless LANs istoica@cs.berkeley.edu 9

CSMA/CD collision detection istoica@cs.berkeley.edu 10

Overview Ethernet Wireless (802.11) istoica@cs.berkeley.edu 11

Ethernet Dominant LAN technology CSMA/CD protocol Cheap $20 for 100Mbs! istoica@cs.berkeley.edu 12

Ethernet Frame Structure Sending adapter encapsulates IP datagram Preamble: - 7 bytes with pattern 10101010 followed by one byte with pattern 10101011 - Used to synchronize receiver, sender clock rates istoica@cs.berkeley.edu 13

Ethernet Frame Structure (more) Addresses: 6 bytes, frame is received by all adapters on a LAN and dropped if address does not match Type: 2 bytes, indicates the higher layer protocol - E.g., IP, Novell IPX, AppleTalk CRC: 4 bytes, checked at receiver, if error is detected, the frame is simply dropped Data payload: maximum 1500 bytes, minimum 46 bytes istoica@cs.berkeley.edu 14

Ethernet s CSMA/CD Sense channel, if idle - If detect another transmission - Else Abort, send jam signal Delay, and try again Send frame Receiver accepts: - Frames addressed to its own address - Frames addressed to the broadcast address (broadcast) - Frames addressed to a multicast address, if it was instructed to listen to that address - All frames (promiscuous mode) istoica@cs.berkeley.edu 15

Ethernet s CSMA/CD (more) Jam signal: make sure all other transmitters are aware of collision; 48 bits; Exponential back-off - Goal: adapt retransmission attempts to estimated current load - Heavy load: random wait will be longer - First collision: choose K from {0,1}; delay is K x 512 bit transmission times - After second collision: choose K from {0,1,2,3} - After ten or more collisions, choose K from {0,1,2,3,4,,1023} istoica@cs.berkeley.edu 16

Minimum Packet Size Why put a minimum packet size? Give a host enough time to detect collisions In Ethernet, minimum packet size = 64 bytes (two 6-byte addresses, 2-byte type, 4-byte CRC, and 46 bytes of data) If host has less than 46 bytes to send, the adaptor pads (adds) bytes to make it 46 bytes What is the relationship between minimum packet size and the length of the LAN? istoica@cs.berkeley.edu 17

Minimum Packet Size (more) ) Time = t; Host 1 tarts to send frame Host 1 Host 2 propagation delay (d) ) Time = t + d; Host 2 tarts to send a frame ust before it hears from ost 1 s frame Host 1 Host 2 propagation delay (d) ) Time = t + 2*d; Host 1 ears Host 2 s frame etects collision Host 1 Host 2 propagation delay (d) LAN length = (min_frame_size)*(light_speed)/(2*bandwidth) = = (8*64b)*(2.5*10 8 mps)/(2*10 7 bps) = 6400m approx istoica@cs.berkeley.edu 18

Ethernet Technologies: 10Base2 10: 10Mbps; 2: under 200 meters max cable length Thin coaxial cable in a bus topology Repeaters used to connect up to multiple segments Repeater repeats bits it hears on one interface to its other interfaces: physical layer device only! istoica@cs.berkeley.edu 19

10BaseT and 100BaseT 10/100 Mbps rate; latter called fast ethernet T stands for Twisted Pair Hub to which nodes are connected by twisted pair, thus star topology CSMA/CD implemented at hub istoica@cs.berkeley.edu 20

10BaseT and 100BaseT (more) Max distance from node to Hub is 100 meters Hub can disconnect jabbering adapter Hub can gather monitoring information, statistics for display to LAN administrators istoica@cs.berkeley.edu 21

Gbit Ethernet Use standard Ethernet frame format Allows for point-to-point links and shared broadcast channels In shared mode, CSMA/CD is used; short distances between nodes to be efficient Uses hubs, called here Buffered Distributors Full-Duplex at 1 Gbps for point-to-point links istoica@cs.berkeley.edu 22

Interconnecting LANs Why not just one big LAN? - Limited amount of supportable traffic: on single LAN, all stations must share bandwidth - Limited length - Large collision domain (can collide with many stations) istoica@cs.berkeley.edu 23

Overview Ethernet Wireless (802.11) istoica@cs.berkeley.edu 24

Wireless (802.11) Designed for use in limited geographical area (i.e., couple of hundreds of meters) Designed for three physical media (run at either 1Mbps or 2 Mbps) - Two based on spread spectrum radio - One based on diffused infrared istoica@cs.berkeley.edu 25

Physical Link Frequency hoping - Transmit the signal over multiple frequencies - The sequence of frequencies is pseudo-random, i.e., both sender and receiver use the same algorithm to generate their sequences Direct sequence - Represent each bit by multiple (e.g., n) bits in a frame; XOR signal with a pseudo-random generated sequence with a frequency n times higher Infrared signal - Sender and receiver do not need a clear line of sight - Limited range; order of meters istoica@cs.berkeley.edu 26

Collision Avoidance: The Problems Reachability is not transitive: if A can reach C, and C can reach D, it doesn t necessary mean that A can reach D A B C D Hidden nodes: A and C send a packet to B; neither A nor C will detect the collision! Exposed node: B sends a packet to A; C hears this and decides not to send a packet to D (despite the fact that this will not cause interference)! istoica@cs.berkeley.edu 27

Multiple Access with Collision Avoidance (MACA) sender RTS CTS data ACK receiver other node in sender s range Before every data transmission - Sender sends a Request to Send (RTS) frame containing the length of the transmission - Receiver respond with a Clear to Send (CTS) frame - Sender sends data - Receiver sends an ACK; now another sender can send data When sender doesn t get a CTS back, it assumes collision istoica@cs.berkeley.edu 28

Summary Arbitrate between multiple hosts sharing a common communication media Wired solution: Ethernet (use CSMA/CD protocol) - Detect collisions - Backoff exponentially on collision Wireless solution: 802.11 - Use MACA protocol - Cannot detect collisions; try to avoid them istoica@cs.berkeley.edu 29