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

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

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

Link Layer: Introduction. Chapter 5 Link Layer & LANS. Link layer: context. Link Layer Services

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

Chapter 5: The Data Link Layer. Chapter 5 Link Layer and LANs. Ethernet. Link Layer. Star topology. Ethernet Frame Structure.

Link Layer: Introduction. Chapter 5 Link Layer & LANS. Link layer: context. Link Layer Services

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

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

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

Master Course Computer Networks IN2097

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

The Link Layer and LANs: Ethernet and Swiches

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

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

Chapter 5 Link Layer and LANs

Master Course Computer Networks IN2097

Chapter V: Link Layer

Chapter 5: Link layer

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

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

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

Chapter 5 Link Layer and LANs

Chapter V: Link Layer

ECE 4450:427/527 - Computer Networks Spring 2017

CSC 4900 Computer Networks: Link Layer (2)

Announcements. CS 5565 Network Architecture and Protocols. Ethernet. Ethernet. Ethernet Model. Ideal Multiple Access Protocol

Principles behind data link layer services

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

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

Data Link Layer: Multi Access Protocols

CC451 Computer Networks

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

Module 10 Data Link Layer CS655! 10-1!

Chapter 5 Link Layer and LANs

Link Layer and LANs. Our Goals. Link Layer

CSC 4900 Computer Networks: The Link Layer

Summary of MAC protocols

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

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

Principles behind data link layer services:

Principles behind data link layer services:

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

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

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

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

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

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

Link Layer: Introduction. Chapter 5 Link Layer & LANS. Link layer: context. Link Layer Services

Principles behind data link layer services:

Medium Access Control

Medium Access Protocols

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

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

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

EE 122: Ethernet and

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

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

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

Computer Network Fundamentals Spring Week 3 MAC Layer Andreas Terzis

Chapter 6: Link layer and LANs. Link layer, LANs: outline. Link layer: introduction. Link layer: context. Link layer services (more)

Chapter 5: DataLink Layer

Link Layer and Ethernet

CSCI Computer Networks Fall 2016

CS 455/555 Intro to Networks and Communications. Link Layer Addressing, Ethernet, and a Day in the Life of a Web Request

Link Layer and Ethernet

CSCI Computer Networks Spring 2017

CSC 8560 Computer Networks: Link Layer

Module 4 Data Link Layer CS655! 4-1!

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

Redes de Computadores. Medium Access Control

Discussions. What are the main service. Ch06 Link Layer. The Data Link Layer. Link Layer. Link Layer: Teminology. What are the services

Data Link Layer: Overview, operations

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

Multiple Access Links and Protocols

MULTIPLE ACCESS PROTOCOLS 2. 1

CMPE 150: Introduction to Computer Networks

Chapter 5 Data Link Layer

Chapter 5 Data Link Layer

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

CS 3516: Advanced Computer Networks

Links. CS125 - mylinks 1 1/22/14

CSMA/CD (Collision Detection)

CSC 401 Data and Computer Communications Networks

Chapter 5: The Data Link Layer

The Link Layer II: Ethernet

Lecture 6 - Link layer. Lecture 5 Review. Link Layer. Introduction, Services. Notes. Notes. Notes. Notes. Networks and Security. Jacob Aae Mikkelsen

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

Chapter 6 The Link Layer and LANs

Chapter 6 The Data Link layer

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

Reminder: Datalink Functions Computer Networking. Datalink Architectures

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

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

Chapter 5 Link Layer. Link Layer 5-1

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

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

Link layer, LANs: outline. Chapter 5-2 Link Layer. MAC addresses (more) MAC addresses

Chapter 5: Link layer

Chapter 5 Link Layer and LANs

Computer Networks Medium Access Control. Mostafa Salehi Fall 2008

Transcription:

Link Layer: Introduction daptors ommunicating Terminology: hosts and routers are nodes communication channels that connect adjacent nodes along communication path are links wired links wireless links LNs layer-2 packet is a frame, encapsulates datagram data-link layer has responsibility of transferring datagram from one node to physically adjacent node over a link datagram controller sending host frame sending side: encapsulates datagram in frame adds error checking bits, rdt, flow control, etc. datagram datagram controller receiving host receiving side looks for errors, rdt, flow control, etc extracts datagram, passes to upper layer at receiving side Data Link Layer 5-1 Data Link Layer 5-2 Error Detection Parity hecking ED= Error Detection and orrection bits (redundancy) D = Data protected by error checking, may include header fields Error detection not 100% reliable! protocol may miss some errors, but rarely larger ED field yields better detection and correction Single it Parity: Detect single bit errors Two Dimensional it Parity: Detect and correct single bit errors otherwise 0 0 Data Link Layer 5-3 Data Link Layer 5-4 hecksumming: yclic Redundancy heck an detect many errors More about this on the exercise this week! Multiple ccess Links and Protocols Two types of links : point-to-point point-to-point link between Ethernet switch and host broadcast (shared wire or medium) old-fashioned Ethernet 802.11 wireless LN shared wire (e.g., cabled Ethernet) shared RF (e.g., 802.11 WiFi) shared RF (satellite) humans at a cocktail party (shared air, acoustical) Data Link Layer 5-5 Data Link Layer 5-6 1

frequency bands Multiple ccess protocols single shared broadcast channel two or more simultaneous transmissions by nodes: interference collision if node receives two or more signals at the same time multiple access protocol distributed algorithm that determines how nodes share channel, i.e., determine when node can transmit communication about channel sharing must use channel itself! no out-of-band channel for coordination M Protocols: a taxonomy Three broad classes: hannel Partitioning divide channel into smaller pieces (time slots, frequency, code) allocate piece to node for exclusive use Random ccess channel not divided, allow collisions recover from collisions Taking turns nodes take turns, but nodes with more to send can take longer turns Data Link Layer 5-7 Data Link Layer 5-8 hannel Partitioning M protocols: TDM TDM: time division multiple access access to channel in "rounds" each station gets fixed length slot (length = pkt trans time) in each round unused slots go idle example: 6-station LN, 1,3,4 have pkt, slots 2,5,6 idle hannel Partitioning M protocols: FDM FDM: frequency division multiple access channel spectrum divided into frequency bands each station assigned fixed frequency band unused transmission time in frequency bands go idle example: 6-station LN, 1,3,4 have pkt, frequency bands 2,5,6 idle 6-slot frame 1 3 4 1 3 4 FDM cable Data Link Layer 5-9 Data Link Layer 5-10 Random ccess 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 M protocol specifies: how to detect collisions how to recover from collisions (e.g., via delayed retransmissions) Examples of random access M protocols: slotted LOH LOH SM, SM/D, SM/ Slotted LOH ssumptions: all frames same size time divided into equal size slots (time to transmit 1 frame) nodes start to transmit only slot beginning nodes are synchronized if 2 or more nodes transmit in slot, all nodes detect collision Operation: when node obtains fresh frame, transmits in next slot if no collision: node can send new frame in next slot if collision: node retransmits frame in each subsequent slot with prob. p until success Data Link Layer 5-11 Data Link Layer 5-12 2

Slotted LOH Pure (unslotted) LOH Pros single active node can continuously transmit at full rate of channel highly decentralized: only slots in nodes need to be in sync simple ons collisions, wasting slots idle slots nodes may be able to detect collision in less than time to transmit packet clock synchronization Data Link Layer 5-13 unslotted loha: simpler, no synchronization when frame first arrives transmit immediately collision probability increases: frame sent at t 0 collides with other frames sent in [t 0-1,t 0 +1] Data Link Layer 5-14 SM (arrier Sense Multiple ccess) SM: listen before transmit: If channel sensed idle: transmit entire frame If channel sensed busy, defer transmission human analogy: don t interrupt others! SM 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 Data Link Layer 5-15 Data Link Layer 5-16 SM/D (ollision Detection) SM/D collision detection SM/D: carrier sensing, deferral as in SM collisions detected within short time colliding transmissions aborted, reducing channel wastage collision detection: easy in wired LNs: measure signal strengths, compare transmitted, received signals difficult in wireless LNs: received signal strength overwhelmed by local transmission strength human analogy: the polite conversationalist Data Link Layer 5-17 Data Link Layer 5-18 3

Taking Turns M protocols Taking Turns M protocols channel sharing M protocols: efficient and fair at high load inefficient at low load: delay in channel access, 1/N bandwidth allocated even if only 1 active node! random access M protocols efficient at low load: single node can fully utilize channel high load: collision overhead taking turns protocols look for best of both worlds! Polling: master node invites slave nodes to transmit in turn typically used with dumb slave devices disadvantages: polling overhead latency single point of failure (master) slaves data data poll master Data Link Layer 5-19 Data Link Layer 5-20 Taking Turns M protocols Summary of M protocols Token passing: control token passed from one node to next disadvantages: token overhead latency single point of failure (token) (nothing to send) T T channel partitioning, by time, frequency or code Time Division, Frequency Division random access (dynamic), LOH, S-LOH, SM, SM/D carrier sensing: easy in wire, hard in wireless SM/D used in Ethernet SM/ used in 802.11 taking turns polling from central site, token passing luetooth, FDDI, IM Token Ring data Data Link Layer 5-21 Data Link Layer 5-22 M ddresses and RP 32-bit IP address: network-layer address used to get datagram to destination IP subnet M (or LN or physical or Ethernet) address: function: get frame from one interface to another physically-connected interface (same network) 48 bit M address (for most LNs) burned in NI ROM, also sometimes software settable LN ddresses and RP Each adapter on LN has unique LN address 71-65-F7-2-08-53 LN (wired or wireless) 1-2F--76-09-D 58-23-D7-F-20-0 0-4-11-6F-E3-98 roadcast address = FF-FF-FF-FF-FF-FF = adapter Data Link Layer 5-23 Data Link Layer 5-24 4

LN ddress (more) M address allocation administered by IEEE manufacturer buys portion of M address space (to assure uniqueness) analogy: (a) M address: like Social Security Number (b) IP address: like postal address M flat address portability can move LN card from one LN to another IP hierarchical address NOT portable address depends on IP subnet to which node is attached RP: ddress Resolution Protocol Question: how to determine M address of knowing s IP address? 137.196.7.23 71-65-F7-2-08-53 137.196.7.88 LN 137.196.7.78 1-2F--76-09-D 137.196.7.14 58-23-D7-F-20-0 0-4-11-6F-E3-98 Each IP node (host, router) on LN has RP table RP table: IP/M address mappings for some LN nodes < IP address; M address; TTL> TTL (Time To Live): time after which address mapping will be forgotten (typically 20 min) Data Link Layer 5-25 Data Link Layer 5-26 Ethernet dominant wired LN technology: cheap $20 for NI first widely used LN technology simpler, cheaper than token LNs and TM kept up with speed race: 10 Mbps 10 Gbps Star topology bus topology popular through mid 90s all nodes in same collision domain (can collide with each other) today: star topology prevails active switch in center each spoke runs a (separate) Ethernet protocol (nodes do not collide with each other) Metcalfe s Ethernet sketch switch bus: coaxial cable star Data Link Layer 5-28 Data Link Layer 5-29 Ethernet Frame Structure Sending adapter encapsulates IP datagram (or other network layer protocol packet) in Ethernet frame Preamble: 7 bytes with pattern 10101010 followed by one byte with pattern 10101011 used to synchronize receiver, sender clock rates Ethernet Frame Structure (more) ddresses: 6 bytes if adapter receives frame with matching destination address, or with broadcast address (e.g. RP packet), it passes data in frame to network layer protocol otherwise, adapter discards frame Type: indicates higher layer protocol (mostly IP but others possible, e.g., Novell IPX, ppletalk) R: checked at receiver, if error is detected, frame is dropped Data Link Layer 5-30 Data Link Layer 5-31 5

Ethernet: Unreliable, connectionless connectionless: No handshaking between sending and receiving NIs unreliable: receiving NI doesn t send acks or nacks to sending NI stream of datagrams passed to network layer can have gaps (missing datagrams) gaps will be filled if app is using TP otherwise, app will see gaps Ethernet s M protocol: unslotted SM/D Ethernet SM/D algorithm 1. NI receives datagram 4. If NI detects another from network layer, transmission while creates frame transmitting, aborts and 2. If NI senses channel idle, sends jam signal starts frame transmission 5. fter aborting, NI If NI senses channel enters exponential busy, waits until channel backoff: after mth idle, then transmits collision, NI chooses K at 3. If NI transmits entire random from frame without detecting {0,1,2,,2 m -1}. NI waits another transmission, NI K 512 bit times, returns to is done with frame! Step 2 Data Link Layer 5-32 Data Link Layer 5-33 Ethernet s SM/D (more) Manchester encoding Jam Signal: make sure all other transmitters are aware of collision; 48 bits it time: 0.1 microsec for 10 Mbps Ethernet ; for K=1023, wait time is about 50 msec Exponential ackoff: 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 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} Data Link Layer 5-34 used in 10aseT each bit has a transition allows clocks in sending and receiving nodes to synchronize to each other no need for a centralized, global clock among nodes! Hey, this is physical-layer stuff! Data Link Layer 5-35 Hubs physical-layer ( dumb ) repeaters: bits coming in one link go out all other links at same rate all nodes connected to hub can collide with one another no frame buffering no SM/D at hub: host NIs detect collisions hub twisted pair Switch: allows multiple simultaneous transmissions hosts have dedicated, direct connection to switch switches buffer packets Ethernet protocol used on each incoming link, but no collisions; full duplex each link is its own collision domain switching: -to- and - to- simultaneously, without collisions not possible with dumb hub 1 2 6 3 5 4 switch with six interfaces (1,2,3,4,5,6) Data Link Layer 5-36 Data Link Layer 5-37 6

Switch Table Q: how does switch know that reachable via interface 4, reachable via interface 5? : each switch has a switch table, each entry: (M address of host, interface to reach host, time stamp) looks like a routing table! Q: how are entries created, maintained in switch table? something like a routing protocol? 6 5 1 2 3 4 switch with six interfaces (1,2,3,4,5,6) Switch: self-learning switch learns which hosts can be reached through which interfaces when frame received, switch learns location of sender: incoming LN segment records sender/location pair in switch table M addr interface TTL 6 1 60 5 1 2 3 4 Source: Dest: Switch table (initially empty) Data Link Layer 5-38 Data Link Layer 5-39 Interconnecting switches switches can be connected together Self-learning multi-switch example Suppose sends frame to I, I responds to S 4 1 S 4 S 1 S 2 D E F G S 3 H I S 1 2 S 2 D E F G S 3 H I Q: sending from to G - how does S 1 know to forward frame destined to F via S 4 and S 3? : self learning! (works exactly the same as in single-switch case!) Q: show switch tables and packet forwarding in S 1, S 2, S 3, S 4 Data Link Layer 5-40 Data Link Layer 5-41 7