Computer Network Fundamentals Spring Week 3 MAC Layer Andreas Terzis

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

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

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

Summary of MAC protocols

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

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

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

Principles behind data link layer services

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

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

Medium Access Protocols

Principles behind data link layer services:

IEEE , Token Rings. 10/11/06 CS/ECE UIUC, Fall

Chapter 5 Link Layer and LANs

CSEN 503 Introduction to Communication Networks. Mervat AbuElkheir Hana Medhat Ayman Dayf. **Slides are attributed to J. F. Kurose

EE 122: Ethernet and

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

Broadcast Links, Addressing and Media Access Control. Link Layer B. Link and Physical Layers. MAC Addresses

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

Medium Access Control. IEEE , Token Rings. CSMA/CD in WLANs? Ethernet MAC Algorithm. MACA Solution for Hidden Terminal Problem

Principles behind data link layer services:

Principles behind data link layer services:

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

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

Link Layer and LANs. CMPS 4750/6750: Computer Networks

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

CSE 461: Multiple Access Networks. This Lecture

Chapter 5: Link layer

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

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

CC451 Computer Networks

Chapter 5 Link Layer and LANs

CMPE 257: Wireless and Mobile Networking

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

CSC 4900 Computer Networks: Link Layer (2)

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

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

CS 43: Computer Networks Switches and LANs. Kevin Webb Swarthmore College December 5, 2017

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

Chapter 12 Multiple Access 12.1

Link Layer and Ethernet

MULTIPLE ACCESS PROTOCOLS 2. 1

Link Layer and Ethernet

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

CMPE 257: Wireless and Mobile Networking

Multiple Access Links and Protocols

Master Course Computer Networks IN2097

Chapter 5 Link Layer and LANs

Data Link Layer: Multi Access Protocols

LECTURE PLAN. Script. Introduction about MAC Types o ALOHA o CSMA o CSMA/CD o CSMA/CA

Reminder: Datalink Functions Computer Networking. Datalink Architectures

CSC 4900 Computer Networks: The Link Layer

Data Link Layer: Overview, operations

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

CHAPTER 7 MAC LAYER PROTOCOLS. Dr. Bhargavi Goswami Associate Professor & Head Department of Computer Science Garden City College

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

Local Area Networks (LANs) SMU CSE 5344 /

Multiple Access Protocols

Chapter 5: DataLink Layer

Shared Access Networks Wireless. 1/27/14 CS mywireless 1

LAN PROTOCOLS. Beulah A AP/CSE

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

Master Course Computer Networks IN2097

CSE/EE 461 Wireless and Contention-Free Protocols

Chapter 6 The Link Layer and LANs

Chapter V: Link Layer

EITF25 Internet Techniques and Applications L4: Network Access. Stefan Höst

Link layer: introduction

Chapter 6 Medium Access Control Protocols and Local Area Networks

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

ECEN 5032 Data Networks Medium Access Control Sublayer

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

Redes de Computadores. Medium Access Control

COMP/ELEC 429/556 Introduction to Computer Networks

Jaringan Komputer. Broadcast Network. Outline. MAC (Medium Access Control) Channel Allocation Problem. Dynamic Channel Allocation

CARRIER SENSE MULTIPLE ACCESS (CSMA):

CSCD 330 Network Programming Spring 2017

SC250 Computer Networking I. Link Layer. Prof. Matthias Grossglauser LCA/I&C.

Protocols for Multiaccess Networks

The Link Layer and LANs: Ethernet and Swiches

transferring datagram from one node data-link layer has responsibility of to adjacent node over a link 5-1 TDTS06 Computer networks

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

Multiple Access Channels

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

Links. CS125 - mylinks 1 1/22/14

Aloha and slotted aloha

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

Module 10 Data Link Layer CS655! 10-1!

CS 3516: Advanced Computer Networks

Medium Access Control

Chapter 4. DataLink Layer. Reference: Computer Networking: A Top Down Approach 4 th edition. Jim Kurose, Keith Ross Addison-Wesley, July 2007.

CSMA/CD (Collision Detection)

Chapter V: Link Layer

The Medium Access Control Scheme (MAC Layer) Reference: Andrew S. Tanenbaum, Computer Networks, 3rd Edition, Prentice Hall, 1996.

CSE 461 Multiple Access. David Wetherall

The Link Layer II: Ethernet

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

CSE 461: Wireless Networks

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

Transcription:

Computer Network Fundamentals Spring 2008 Week 3 MAC Layer Andreas Terzis

Outline MAC Protocols MAC Protocol Examples Channel Partitioning TDMA/FDMA Token Ring Random Access Protocols Aloha and Slotted Aloha CSMA(/CD) CSMA/CA Connecting Layer 2 networks Interface to Layer 3 CS 344/Spring08 2

MAC Protocols Problem: How to share medium among multiple senders Alternatives Channel Partitioning (FDMA, TDMA,CDMA) Taking Turns (Token Ring) Random Access (Aloha, CSMA, CSMA/CD, CSMA/ CA) Parameters Physical medium characteristics End-point capabilities CS 344/Spring08 3

ALOHA Packet radio network Univ. of Hawaii in the 70 s Star topology Two channels: Broadcast channel, Random Access channel Basic Idea: Let a node transmit when it has data to send If frame was destroyed then retransmit after a random period of time Feedback about packet reception status is sent over the broadcast channel CS 344/Spring08 4

ALOHA Efficiency Assumptions Infinite number of users Frame arrivals are modeled by a Poisson process with aggregate rate λ Retransmissions can also be modeled by a Poisson process with rate G > λ Throughput S=GP 0 P 0 = probability frame does not suffer a collision CS 344/Spring08 5

ALOHA: Collision Probability Frame t x time:t Vulnerable interval:2t Prob[k arrivals]: P 0 =e -2G S=Ge -2G Max throughput is 0.184 when G=0.5 t 0 t 0 +t t 0 +2t t 0 +3t Vulnerable Interval CS 344/Spring08 6

Slotted ALOHA Time is divided into slots equal to the frame transmission time Central station sends clock tick signal Satellite stations are allowed to send only after hearing clock tick Vulnerable time is equal to t Throughput S=Ge -G (max =0.37, G=1) Expected number of transmissions: CS 344/Spring08 7

Comparison CS 344/Spring08 8

CSMA (Carrier Sense Multiple Access) CSMA: listen before transmit: If channel sensed idle: transmit entire frame If channel sensed busy, defer transmission Human analogy: don t interrupt others! CS 344/Spring08 9

CSMA collisions collisions can still occur: propagation delay means two nodes may not hear each other s transmission collision: entire packet transmission time wasted note: role of distance & propagation delay in determining collision probability spatial layout of nodes CS 344/Spring08 10

CSMA Variants Persistent CSMA: Backlogged nodes will immediately transmit after channel becomes idle Higher probability of collisions at high loads P-Persistent CSMA: After channel is idle transmit with probability p Higher delay at low loads Non-persistent CSMA: Transmit with probability p even when the channel is idle CS 344/Spring08 11

Performance CS 344/Spring08 12

CSMA/CD (Collision Detection) CSMA/CD: carrier sensing, deferral as in CSMA Collisions detected within short time Colliding transmissions aborted, reducing channel wastage Collision detection: Easy in wired LANs: measure signal strengths, compare transmitted, received signals Difficult in wireless LANs: receiver shut off while transmitting Human analogy: the polite conversationalist CS 344/Spring08 13

CSMA/CD collision detection CS 344/Spring08 14

Ethernet uses CSMA/CD Adapter doesn t transmit if it senses that some other adapter is transmitting, that is, carrier sense Transmitting adapter aborts when it senses that another adapter is transmitting, that is, collision detection Before attempting a retransmission, adapter waits a random time, that is, random access CS 344/Spring08 15

Ethernet CSMA/CD algorithm 1. Adapter gets datagram from upper layer and creates frame 2. If adapter senses channel idle, it starts to transmit frame. If it senses channel busy, waits until channel idle and then transmits 3. If adapter transmits entire frame without detecting another transmission, the adapter is done with frame! 4. If adapter detects another transmission while transmitting, aborts and sends jam signal 5. After aborting, adapter enters exponential backoff: after the m-th collision, adapter chooses a K at random from {0,1,2,,2 m -1}. Adapter waits K*512 bit times and returns to Step 2 CS 344/Spring08 16

Ethernet s CSMA/CD (more) Jam Signal: make sure all other transmitters are aware of collision; 48 bits; Bit time:.1 microsec for 10 Mbps Ethernet ; for K=1023, wait time is about 50 msec Exponential Backoff: 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 collisions, choose K from {0,1,2,3,4,,1023} CS 344/Spring08 17

CSMA/CD efficiency Assume: k stations, prob transmit = p Notation: L : link length B : link speed c : speed of light F : frame size τ : slot length in bits CS 344/Spring08 18

Efficiency as a function of τ CS 344/Spring08 19

Token Ring Idea Frames flow in one direction: upstream to downstream special bit pattern (token) rotates around ring must capture token before transmitting release token after done transmitting immediate release delayed release remove your frame when it comes back around stations get round-robin service CS 344/Spring08 20

Token Ring (cont.) Examples 16Mbps IEEE 802.5 (based on earlier IBM ring) 100Mbps Fiber Distributed Data Interface (FDDI) Resilient Packet Ring MAN (802.17) CS 344/Spring08 21

When to send token? Early Release Late Release Relative advantages and drawbacks? CS 344/Spring08 22

Additional Features Successful delivery notification Frame returning to sending host contains ACK Different levels of service Token contains priority field (3-bit) Only frames with at least as high priority can be transmitted Priority field is adjusted through reservation mechanism CS 344/Spring08 23

Token Maintenance Lost Token No token when initializing ring Bit error corrupts token pattern Node holding token crashes Generating a Token (and agreeing on monitor) Execute when join ring or suspect a failure Send a claim frame that includes the node s MAC address When receive claim frame forward if local MAC address smaller If your claim frame makes it all the way around the ring: Your are the ring monitor You insert new token CS 344/Spring08 24

Maintenance (cont) Monitor duties Regenerate token if current one is destroyed Remove corrupted or orphaned frames CS 344/Spring08 25

Wireless LANs IEEE 802.11 Bandwidth: 1-54 Mbps Physical Media spread spectrum radio (2.4GHz) diffused infrared (10m) CS 344/Spring08 26

Collisions Avoidance Similar to Ethernet Problem: hidden and exposed nodes CS 344/Spring08 27

MACAW Sender transmits RequestToSend (RTS) frame Receiver replies with ClearToSend (CTS) frame Neighbors see CTS: keep quiet see RTS but not CTS: ok to transmit Receiver sends ACK when has frame neighbors silent until see ACK Collisions no collisions detection known when don t receive CTS exponential backoff CS 344/Spring08 28

An Ethernet Network Problem: Shared network limits throughput. Lots of collisions reduces efficiency. Router Outside world CS 344/Spring08 29

Interconnecting LANs Bridges (aka Ethernet switches) were introduced to allow the interconnection of several local area networks (LANs) without a router. By partitioning a large LAN into multiple smaller networks, there are fewer collisions, and more parallel communications. It is now common for the port of an Ethernet switch to connect to just one (or a small number of) hosts. CS 344/Spring08 30

Ethernet Switching Ethernet Switch Benefits: Number of collisions is reduced. If only one computer per port, no collisions can take place (each cable is now a self-contained point-to-point Ethernet link). Capacity is increased: the switch can forward multiple frames to different computers at the same time. Router Outside world CS 344/Spring08 31

Ethernet Switching Learning addresses A B C D E F G H 1 Ethernet Switch 6 2 3 4 5 J F Switch learns that F is reachable through port 5 Ethernet Switch Q Router Outside world I J K L M N O P Ethernet Switch Ethernet Switch CS 344/Spring08 32

Ethernet address Port A 1 Ethernet Switching B 2 C 3 D 4 Learning E, F, G, H, Q addresses 5 I, J, K, L, M, N, O, P 6 A B C D E F G H 1 2 3 Ethernet Switch 6 4 5 Ethernet Switch Q Router Outside world I J K L M N O P Ethernet Switch Q: How do we prevent loops? Ethernet Switch CS 344/Spring08 33

Ethernet Switching 1. Examines the header of each arriving frame. 2. If the Ethernet DA is in its table, it forwards the frame to the correct output port(s). 3. If the Ethernet DA is not in its table, it broadcasts the frame to all ports (except the one through which it arrived). 4. The table is learned by examining the Ethernet SA of arriving packets. CS 344/Spring08 34

LAN Addresses and ARP 32-bit IP address: network-layer address used to get datagram to destination IP network LAN (or MAC or physical or Ethernet) address: used to get datagram from one interface to another physically-connected interface (same network) 48 bit MAC address (for most LANs) burned in the adapter EPROM CS 344/Spring08 35

LAN Address (more) MAC address allocation administered by IEEE manufacturer buys portion of MAC address space (to assure uniqueness) Analogy: (a) MAC address: like Social Security Number (b) IP address: like postal address MAC flat address => portability can move LAN card from one LAN to another IP hierarchical address NOT portable depends on IP network to which node is attached CS 344/Spring08 36

ARP: Address Resolution Protocol Question: how to determine MAC address of B knowing B s IP address? Each IP node (Host, Router) on LAN has ARP table ARP Table: IP/MAC address mappings for some LAN nodes < IP address; MAC address; TTL> TTL (Time To Live): time after which address mapping will be forgotten (typically 20 min) CS 344/Spring08 37

ARP protocol A wants to send datagram to B, and A knows B s IP address. Suppose B s MAC address is not in A s ARP table. A broadcasts ARP query packet, containing B's IP address all machines on LAN receive ARP query B receives ARP packet, replies to A with its (B's) MAC address frame sent to A s MAC address (unicast) A caches (saves) IP-to-MAC address pair in its ARP table until information becomes old (times out) soft state: information that times out (goes away) unless refreshed ARP is plug-and-play : nodes create their ARP tables without intervention from net administrator CS 344/Spring08 38

ARP Protocol (II) Proxy ARP Reply on behalf of another node Gratuitous ARP Node sends ARP asking for its own IP address Find out if address has been claimed Change the mapping between MAC<->IP addr Do you see any problem with this? CS 344/Spring08 39