Winter 2008CS244a Handout 101 CS244a: An Introduction to Computer Networks Handout 10: Link Layer CSMA/CD, Ethernet, Token Passing Nick McKeown Professor.

Slides:



Advertisements
Similar presentations
Ethernet “dominant” LAN technology: cheap $20 for 100Mbs!
Advertisements

University of Calgary – CPSC 441.  Ethernet, defined under IEEE 802.3, is one of today's most widely used data communications standards  It finds its.
Ethernet Risanuri Hidayat. Ethernet The term Ethernet refers to the family of local-area network (LAN) products covered by the IEEE standard. Three.
Computer Networks Ethernet I Professor Hui Zhang
The ALOHA Protocol “Free for all”: whenever station has a frame to send, it does so. –Station listens for maximum RTT for an ACK. –If no ACK after a specified.
Ethernet – CSMA/CD Review
Physical and Link Layers CS144 Review Session 6 November 6 th, 2008 Roger Liao Based on slides by Ben Nham.
The Data Link Layer introduction point-to-point data link protocols
1 K. Salah Module 4.2: Media Access Control The Media Access Control (MAC) sublayer –Random Access (CSMA), IEEE –Token Passing, IEEE Ch 13-
1 Version 3.0 Module 6 Ethernet Fundamentals. 2 Version 3.0 Why is Ethernet so Successful? In 1973, it could carry data at 3 Mbps Now, it can carry data.
Ethernet Kenneth Castelino. Network Architecture - Protocols Physical: Actual signal transmission Data-Link: Framing / Error Detection Network: Routing.
CMPE 150- Introduction to Computer Networks 1 CMPE 150 Fall 2005 Lecture 17 Introduction to Computer Networks.
1 Computer Networks Local Area Networks. 2 A LAN is a network: –provides Connectivity of computers, mainframes, storage devices, etc. –spans limited geographical.
Chapter 14 LAN Systems Ethernet (CSMA/CD) ALOHA Slotted ALOHA CSMA
Network Concepts. Networks LAN WAN Main Concepts n Protocol n Media n Topology.
TDC 461 Basic Communications Systems Local Area Networks 29 May, 2001.
1 Link Layer Message M A B Problem: Given a message M at a node A consisting of several packets, how do you send the packets to a “neighbor” node B –Neighbor:
EE 4272Spring, 2003 Chapter 14 LAN Systems Ethernet (CSMA/CD)  ALOHA  Slotted ALOHA  CSMA  CSMA/CD Token Ring /FDDI Fiber Channel  Fiber Channel Protocol.
EEC-484/584 Computer Networks Lecture 13 Wenbing Zhao
5-1 Data Link Layer r Today, we will study the data link layer… r This is the last layer in the network protocol stack we will study in this class…
Review on Networking Technologies Linda Wu (CMPT )
1 LAN Topologies, Access methods (Week 1, Wednesday 1/10/2007) © Abdou Illia, Spring 2007.
4/11/40 page 1 Department of Computer Engineering, Kasetsart University Introduction to Computer Communications and Networks CONSYL Ethernet.
1 Computer Networks Course: CIS 3003 Fundamental of Information Technology.
Lecture 16 Random Access protocols r A node transmits at random at full channel data rate R. r If two or more nodes “collide”, they retransmit at random.
SIMS-201 LAN Basics, MANs, WANs.
Enhanced CSMA Additional improvement  Use CSMA access  Listen while transmitting  Stop immediately if collision sensed  Called collision detection.
Review: Medium Access Control Sublayer –What is the problem to be addressed in this sublayer? –Protocols that allow collision Pure ALOHA Slotted ALOHA.
9/11/2015 5:55 AM1 Ethernet and CSMA/CD CSE 6590 Fall 2010.
Ethernet. Ethernet Goals Simplicity Low Cost Compatibility Address flexibility Fairness –All nodes have equal access to the network High speed Stability.
Ethernet Two nodes transmit at the same time
Introduction1-1 Data Communications and Computer Networks Chapter 5 CS 3830 Lecture 27 Omar Meqdadi Department of Computer Science and Software Engineering.
1 Computer Communication & Networks Lecture 13 Datalink Layer: Local Area Network Waleed Ejaz
Ch. 16 High-Speed LANs The Emergence of High- Speed LANs Trends –Computing power of PCs has continued to grow. –MIS organizations recognize the.
NUS.SOC.CS2105 Ooi Wei Tsang Application Transport Network Link Physical you are here.
© Janice Regan, CMPT 128, CMPT 371 Data Communications and Networking LANs 2: MAC protocols.
Introduction network Protocol
Network Technologies Chapter 2. Approaches to Network Communication Connection-Oriented –Circuit-switched –A dedicated connection (circuit) is formed.
Internetworking An internetwork is typically comprised of many physical networks over which data travels There are many different types of physical networks:
LAN technologies and network topology LANs and shared media Locality of reference Star, bus and ring topologies Medium access control protocols.
Link Layer: MAC Ilam University Dr. Mozafar Bag-Mohammadi.
Ethernet Term Paper Introduced by: Almarshood, Yosef Bahaitham, Ahmed Alrashudi, Ahmed.
Data Link Layer Moving Frames. Link Layer Protocols: ethernet, wireless, Token Ring and PPP Has node-to-node job of moving network layer.
Prof. John Nestor ECE Department Lafayette College Easton, Pennsylvania ECE Senior Design I Lecture 16 - Ethernet Fall.
17 - Winter 2005 ECE ECE 766 Computer Interfacing and Protocols 1 Local Area Networks Need for high performance communications for physically close devices.
1 Computer Networks An Introduction to Computer Networks University of Tehran Dept. of EE and Computer Engineering By: Dr. Nasser Yazdani Direct Link Networks.
1 Computer Networks An Introduction to Computer Networks University of Tehran Dept. of EE and Computer Engineering By: Dr. Nasser Yazdani Direct Link Networks.
CS3505: Loca Area Networks CSMA/CD : IEEE and LAN Internetworks.
Lecture Topics: 11/27 Networks Layered Model Ethernet IP.
EE 122: Lecture 6 Ion Stoica September 13, 2001 (* this talk is based in part on the on-line slides of J. Kurose & K. Rose)
1 Ethernet CSE 3213 Fall February Introduction Rapid changes in technology designs Broader use of LANs New schemes for high-speed LANs High-speed.
Ch. 16 Ethernet Traditional Ethernet IEEE Medium Access Control –Carrier Sense Multiple Access with Collision Detection (CSMA/CD) –The most.
Lect-9: Link LayerComputer Networks : An Introduction to Computer Networks Handout #9: Link Layer Additional Reading Text book: Chap. 2.6,2.7,2.8.
Example DLL Protocols 1. High-Level Data Link Control (HDLC).
Data Link Layer Lower Layers Local Area Network Standards
Link Layer 5.1 Introduction and services
Lab 7 – CSMA/CD (Data Link Layer Layer)
High Speed LANs – Ethernet and Token Ring
Chapter 14 LAN Systems Ethernet (CSMA/CD) ALOHA Slotted ALOHA CSMA
Computer Communication Networks
CS 457 – Lecture 6 Ethernet Spring 2012.
Services of DLL Framing Link access Reliable delivery
CPEG512 Advanced Computer Networks
Ethernet and Token Ring LAN Networks
Chapter 12 Local Area Networks
Protocol layering and data
7- chapter Seven Local Area Networks (LAN)
Chapter 12 Local Area Networks
Protocol layering and data
Ethernet and Token Ring LAN Networks
Presentation transcript:

Winter 2008CS244a Handout 101 CS244a: An Introduction to Computer Networks Handout 10: Link Layer CSMA/CD, Ethernet, Token Passing Nick McKeown Professor of Electrical Engineering and Computer Science, Stanford University

Winter 2008CS244a Handout 102 The Link Layer Application Physical Link Network Transport Session Presentation LAN-LINK IP TCP UDP The 7-layer OSI Model The 4-layer Internet Model Telnet FTP SMTP HTTP NNTP TFTP

Winter 2008CS244a Handout 103 Examples of MAC Protocols (MAC = “Medium Access Control”) Packet-Switched Radio Network Aloha Carrier Sense Multiple Access/Collision Detection Ethernet (IEEE 802.3) Token Passing Token Ring (IEEE 802.5) Simple Random Complex Deterministic

Winter 2008CS244a Handout 104 Goals of MAC Protocols MAC Protocols arbitrate access to a common shared channel among a population of users 1. Fair among users 2. High efficiency 3. Low delay 4. Fault tolerant

Winter 2008CS244a Handout 105 Outline  Random Protocols  Aloha  CSMA/CD  Ethernet (CSMA/CD put into practice)  Token Passing Protocols  Common Features  Flavor #1: Release After Reception (RAR)  Flavor #2: Release After Transmission (RAT)

Winter 2008CS244a Handout 106 If more than one host transmits at the same time Aloha Protocol Central Node Host 1Host 3Host 2 Basic operation: 1.All hosts transmit on one frequency. 2.Central node repeats whatever it receives on the other frequency. If there is a collision, hosts receive corrupted data, and so wait for a randomly chosen time before retransmitting their packets. Collision at central node! f0f1

Winter 2008CS244a Handout 107 Aloha Protocol  Aloha protocol is very simple, and fairly robust against failure of a host.  The protocol is distributed among the hosts.  Under low-load, we can expect the delay to be small.  Under high-load, a lot of time is “wasted” sending packets that collide. Improving performance:  Listen for activity before sending a packet.  Detect collisions quickly and stop transmitting.  After a collision, pick the random waiting time so as to maximize throughput.

Winter 2008CS244a Handout 108 CSMA/CD Protocol All hosts transmit & receive on one channel Packets are of variable size. When a host has a packet to transmit: 1. Carrier Sense: Check that the line is quiet before transmitting. 2. Collision Detection: Detect collision as soon as possible. If a collision is detected, stop transmitting; wait a random time, then return to step 1. binary exponential backoff

Winter 2008CS244a Handout 109 CSMA/CD Network Size Restriction To ensure that a packet is transmitted without a collision, a host must be able to detect a collision before it finishes transmitting a packet. PROP t=0 t=PROP-- t=PROP t=2PROP- A B Events: t=0: Host A starts transmitting a packet. t=PROP--: Just before the first bit reaches Host B, Host B senses the line to be idle and starts to transmit a packet. t=PROP-: A collision takes place near Host B. t=PROP: Host B receives data whilst transmitting, and so detects the collision. t=2PROP-: Host A receives data whilst transmitting, and so detects the collision. “Line is idle” t=PROP- “Line is idle”

Winter 2008CS244a Handout 1010 CSMA/CD Network Size Restriction “To ensure that a packet is transmitted without a collision, a host must be able to detect a collision before it finishes transmitting a packet.”

Winter 2008CS244a Handout 1011 Performance of CSMA/CD We’re going to analyze the performance of a CSMA/ CD network.  Our performance metric will be Efficiency,  This is defined to be the fraction of time spent sending useful/successful data. The more time spent causing and detecting collisions, the less efficient the protocol is. More precisely:  To make the analysis simple, we’ll assume that time is slotted and all packets are the same length. A time slot equals 2 x PROP. In any given time slot, a host will either decide to transmit or not with probability p. (This includes packets transmitted for the first time and retransmissions).  First, we will try and find the value of p that maximizes the throughput (in fact, it’s the goodput).  Then, using the optimal value of p, we’ll find the efficiency.

Winter 2008CS244a Handout 1012 Performance of CSMA/CD Maximizing goodput

Winter 2008CS244a Handout 1013 Performance of CSMA/CD Finding the overhead Define A to be the expected number of time slots wasted before a packet is transmitted successfully: [Alternatively, consider a coin with Pr(heads) =  = 0.4. The expected number of coin tosses until the first head is 1/0.4 = 2.5. i.e. 1.5 unsuccessful attempts, followed by 1 successful one]

Winter 2008CS244a Handout 1014 Performance of CSMA/CD Finding the efficiency

Winter 2008CS244a Handout 1015 Performance of CSMA/CD From simulation and more precise models:

Winter 2008CS244a Handout 1016 Outline  Random Protocols  Aloha  CSMA/CD  Ethernet (CSMA/CD put into practice)  Token Passing Protocols  Common Features  Flavor #1: Release After Reception (RAR)  Flavor #2: Release After Transmission (RAT)

Winter 2008CS244a Handout 1017 The Original Ethernet Thick copper coaxial cable 10Mb/s In practice, minimum packet size = 512 bits. allows for extra time to detect collisions. allows for “repeaters” that can boost signal. Repeaters every 500m

Winter 2008CS244a Handout 1018 The Original Ethernet Original picture drawn by Bob Metcalfe, inventor of Ethernet (1972 – Xerox PARC)

Winter 2008CS244a Handout 1019 Ethernet Frame Format Preamble SFD DA SA Type Data Pad CRC Preamble: trains clock-recovery circuits 2.Start of Frame Delimiter: indicates start of frame 3.Destination Address: 48-bit globally unique address assigned by manufacturer. 1b: unicast/multicast 1b: local/global address 4.Type: Indicates protocol of encapsulated data (e.g. IP = 0x0800) 5.Pad: Zeroes used to ensure minimum frame length 6.Cyclic Redundancy Check: check sequence to detect bit errors. Bytes:

Winter 2008CS244a Handout 1020 The 10Mb/s Ethernet Standard IEEE Ethernet MAC Protocol 10Base-510Base-210Base-T10Base-F Different physical layer options 10Base-5: Original Ethernet: large thick coaxial cable. 10Base-2: Thin coaxial cable version. 10Base-T: Voice-grade unshielded twisted-pair Category-3 telephone cable. 10Base-F: Two optical fibers in a single cable.

Winter 2008CS244a Handout Base-T “Twisted pair Ethernet”  Designed to run over existing voice-grade “Category-3” twisted pair telephone wire.  Centralized management (“managed hubs”) lead to more reliability.  Created a huge increase in Ethernet usage. 100m max cable length Repeater “Hub” Router

Winter 2008CS244a Handout 1022 Increasing the data rate 10Mb/s -> 100Mb/s -> 1Gb/s -> 10Gb/s  Problem:  E.g. CSMA/CD at 100Mb/s over 1500m of cable:  To overcome this two techniques used:  Cable length limited to 100m:  Use “Ethernet Switching” to prevent collisions (in an upcoming lecture).

Winter 2008CS244a Handout 1023 The 100Mb/s Ethernet Standard “Fast Ethernet” Ethernet MAC Protocol 100Base-T4100Base-TX100Base-FX Different physical layer options Up to 100m of cable per segment. 100Base-T4: Uses four pairs of voice grade Category-3 cable. 100Base-TX: Uses two pairs of data grade Category-5 cable. 100Base-FX: Uses two optical fibers.

Winter 2008CS244a Handout 1024 The 1Gb/s Ethernet Standard “Gigabit Ethernet” Ethernet MAC Protocol 1000Base-TX1000Base-FX 1000Base-TX: Uses four pairs of data grade Category-5 cable. 1000Base-FX: Uses two optical fibers.

Winter 2008CS244a Handout 1025 Outline  Random Protocols  Aloha  CSMA/CD  Ethernet (CSMA/CD put into practice)  Token Passing Protocols  Common Features  Flavor #1: Release After Reception (RAR)  Flavor #2: Release After Transmission (RAT)

Winter 2008CS244a Handout 1026 Token Passing Common Features  A token rotates around a ring to each node in turn. We will define: PROP = minimum rotation time around ring.  All nodes (computers, routers, etc.) copy all data and tokens, and repeat them along the ring.  When a node wishes to transmit packet(s), it grabs the token as it passes.  It holds the token while it transmits.  When it is done, it releases the token again and sends it on its way.

Winter 2008CS244a Handout 1027 Token Passing Common Features Data Token/Data l1l1 l3l3 l2l2 l4l4 TRT=Token Rotation Time Listen: Talk:

Winter 2008CS244a Handout 1028 Flavor #1: Release After Reception (RAR)  Computer captures token, transmits data, waits for data to successfully travel around ring, then releases token again.  Allows computer to detect errored frames and retransmit them. Data time TRANSP Token PROP Token arrives at host 1 Token departs from host 1 Token arrives at host 2 l 1 /c l 2 /cl N /cl 1 /c TRANST Data TRANSP Token arrives at host 3 l 3 /c Token l 2 /c TRANST Example time evolution in which host 1 and host 3 have packets to transmit:

Winter 2008CS244a Handout 1029 Efficiency of RAR Recall: Efficiency, , is the fraction of time spent sending useful data. Define: T i,j to be the time from when the token arrives at host i until it next arrives at host j.

Winter 2008CS244a Handout 1030 Flavor #2: Release After Transmission (RAT)  Computer captures token, transmits data, then releases token again. Data time TRANSP Token Token arrives at host 1 Token departs from host 1 Token arrives at host 2 l 1 /c TRANST Data TRANSP Token arrives at host 3 Token l 2 /c TRANST Example time evolution in which host 1 and host 3 have packets to transmit: Token

Winter 2008CS244a Handout 1031 Efficiency of RAT

Winter 2008CS244a Handout 1032 Comparison of Efficiencies Example: 100 node network PROP = 1000m/c TRANSP = (1000bits)/ (100Mb/s)

Winter 2008CS244a Handout 1033 Token Rings Techniques: Release After Reception (RAR) Release After Transmissions (RAT) Examples: RAR: IEEE Token Rings RAT: Fiber Distributed Data Interface (FDDI)