Docsity

Link Layer - Computer Networks - Lecture Slides, Slides of Computer Networks

Partial preview of the text

Download Link Layer - Computer Networks - Lecture Slides and more Slides Computer Networks in PDF only on Docsity!

5: DataLink Layer 5a-

Link Layer, Multiple Access

Protocols, ARP

5: DataLink Layer 5a-

Data Link Layer

Goals:

 understand principles behind data link layer services:  sharing a broadcast channel: multiple access  link layer addressing  error detection, correction  instantiation and implementation of various link layer technologies

Overview:

 link layer services  error detection, correction  multiple access protocols and LANs  link layer addressing, ARP  specific link layer technologies:  Ethernet: hubs, bridges, switches  IEEE 802.11 Wireless LANs  Others: PPP< ATM, X.25,etc.

data-link layer has responsibility of

transferring datagram from one node

to physically adjacent node over a link

5: DataLink Layer 5a-

Link Layer: Implementation

 Typically, implemented in “adapter” or or

network interface card (NIC)

 e.g., PCMCIA card, Ethernet card  Hardware, software, firmware  typically includes: RAM, DSP chips, host system bus interface, and link interface

network

link

physical

application

transport

network

link

physical

M

M

M

M

M

Ht Hn Ht

Hl Hn Ht Hl HnHt

phys. link^ frame

data link protocol

adapter card

Data Link Layer 5-

Adaptors Communicating

 sending side:

 encapsulates datagram in frame  adds error checking bits, rdt, flow control, etc.

 receiving side

 looks for errors, rdt, flow control, etc  extracts datagram, passes to upper layer at receiving side

controller (^) controller

sending host receiving host

datagram (^) datagram

datagram frame

5: DataLink Layer 5a-

Link Layer Services (more)

 Flow Control:

 pacing between sender and receivers

 Error Detection:

 errors caused by signal attenuation, noise.

 receiver detects presence of errors:

  • signals sender for retransmission or drops frame

 Error Correction:

 receiver identifies and corrects bit error(s)

without resorting to retransmission

 half-duplex and full-duplex

 with half duplex, nodes at both ends of link can transmit, but not at same time Docsity.com

5: DataLink Layer 5a-

Link Layer

 Node-to-node connectivity

 Point-to-point or multiple access

 Multiple access requires addressing

 Both require rules for sharing the links

 Examples:

 Point-to-point (single wire, e.g. PPP, SLIP)

 Broadcast (shared wire or medium; e.g,

Ethernet or wireless)

 Switched (e.g., switched Ethernet, ATM etc)

5: DataLink Layer 5a-

Basics of Link Layer

 Multiple Access Protocols

 Error Detection/Correction

5: DataLink Layer 5a-

Multiple Access

 Multiple Access - fundamental to

communication

 Two or more communicators use a shared

medium to share information

 Multiple Access Protocol - Rule for sharing

medium to facilitate communication?

 Can simultaneous transmissions cause

interference?

 Claim: humans use multiple access protocols

all the time

Data Link Layer 5-

Ideal Multiple Access Protocol

Broadcast channel of rate R bps

1. when one node wants to transmit, it can send at

rate R.

2. when M nodes want to transmit, each can send at

average rate R/M

3. fully decentralized:

 no special node to coordinate transmissions  no synchronization of clocks, slots

4. simple

5: DataLink Layer 5a-

Realistic MAC Protocols: a taxonomy

Three broad classes:

 Channel Partitioning

 divide channel into smaller “pieces” (time slots, frequency)  allocate piece to node for exclusive use

 Random Access

 allow collisions

 “recover” from collisions

 Polling Style

 tightly coordinate shared access to avoid collisions

Goal: efficient, fair, simple, decentralized

5: DataLink Layer 5a-

Channel Partitioning : FDMA

FDMA: 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 LAN, 1,3,4 have pkt, frequency

bands 2,5,6 idle

frequency bands

5: DataLink Layer 5a-

Channel Partitioning: CDMA

CDMA (Code Division Multiple Access)

 unique “code” assigned to each user; ie, code set partitioning

 used mostly in wireless broadcast channels (cellular, satellite,etc)

 all users share same frequency, but each user has own “chipping” sequence (ie, code) to encode data

 encoded signal = (original data) X (chipping sequence)

 For each code there is a spreading factor G  For d bits of user data, G*d bits are trannsmitted

 decoding: inner-product of encoded signal and chipping

sequence

 allows multiple users to “coexist” and transmit simultaneously with minimal interference (if codes are “orthogonal”)

5: DataLink Layer 5a-

TDMA vs FDMA vs CDMA

 In TDMA, each station gets the whole channel

spectrum some of the time

 In FDMA, each station gets part of the channel

spectrum all of the time

 In CDMA, each station is assigned a code that

determines what portions of the channel spectrum

they use and for how long to avoid collision with

others

 All require lots of coordination about who “speaks”

when and in what way!

 What if didn’t want to coordinate things so tightly?

5: DataLink Layer 5a-

Random Access protocols

 Random access protocols are alternative to

tight coordination

 When want to transmit, transmit and hope for

the best

 If bad things happen, protocol says how to

recover