0% found this document useful (0 votes)
30 views

The City College of New York: Networking & Security MIS G 2030

The document discusses various topics relating to data link layer networking concepts. It describes how the data link layer focuses on local delivery of frames between devices on the same local area network (LAN). It also discusses logical link control, media access control, framing and link access, physical addresses, error detection, and various media access control protocols like TDMA, FDMA, CDMA, polling, token passing, ALOHA, slotted ALOHA, CSMA, and CSMA/CD.

Uploaded by

ottopor
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
30 views

The City College of New York: Networking & Security MIS G 2030

The document discusses various topics relating to data link layer networking concepts. It describes how the data link layer focuses on local delivery of frames between devices on the same local area network (LAN). It also discusses logical link control, media access control, framing and link access, physical addresses, error detection, and various media access control protocols like TDMA, FDMA, CDMA, polling, token passing, ALOHA, slotted ALOHA, CSMA, and CSMA/CD.

Uploaded by

ottopor
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 23

4/3/2019

The City College of New York

Management Information System

Networking & Security


MIS G 2030

Data Link Layer


Data Link Layer is the second layer in the OSI
model.
The Data Link Layer is concerned with local
delivery of frames between devices on the
same LAN. Data Link frames do not cross the
boundaries of a local network. Inter-network
routing and global addressing are higher layer
functions, allowing Data Link protocols to
focus on local delivery.

1
4/3/2019

• Logical Link Control:


– Perform link control aspects

• Media Access Control:


– The MAC sub-layer is responsible for determining
which users get to use the broadcast medium at
any time

2
4/3/2019

Link Layer Services


• Framing, link access:
– Encapsulate datagram into frame, adding header,
trailer
– Implement channel access if shared medium.
– ‘Physical addresses’ used in frame headers to
identify source, destination

What is the difference between IP and MAC


addresses?

3
4/3/2019

MAC Frame
A sends to B

frame source, datagram source,


dest address dest address

B’s MAC A’s MAC A’s IP B’s IP


IP payload
addr addr addr addr

datagram
frame

• 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

4
4/3/2019

Link Layer: Implementation


• Implemented in “adapter”

M application
Ht M transport
Hn Ht M network data link network
protocol
Hl Hn Ht M link link Hl Hn Ht M
physical physical frame
phys. link

adapter card

ARP protocol
ARP: Address resolution protocol
• A knows B's IP address, wants to learn physical
address of B
• A broadcasts ARP query pkt, containing B's IP
address
– all machines on LAN receive ARP query
• B receives ARP packet, replies to A with its
(B's) physical layer address
• A caches (saves) IP-to-physical address pairs
until information becomes old (times out)

5
4/3/2019

Routing to another LAN


Routing from A to B via R

• A creates IP packet with source A, destination


B
• A uses ARP to get R’s physical layer address for
111.111.111.110
• A creates Ethernet frame with R's physical
address as dest, Ethernet frame contains A-to-
B IP datagram
• A’s data link layer sends Ethernet frame

6
4/3/2019

• R’s data link layer receives Ethernet frame


• R removes IP datagram from Ethernet frame,
sees its destined to B
• R uses ARP to get B’s physical layer address
• R creates frame containing A-to-B IP datagram
sends to B

Media Access Control


• single shared communication channel
• two or more simultaneous transmissions by
nodes, that will result in interference
(only one node can send successfully at a time)

The Goal is to have a protocol that will organize


the transmission process with less chances of
collision.

7
4/3/2019

MAC Protocols Classification


• Channel Partitioning
– divide channel into smaller “pieces” (time slots,
frequency)

• Taking turns
– tightly coordinate shared access to avoid collisions

• Random Access
– allow collisions
– “recover” from collisions

Channel Partitioning - TDMA


Time Division Multiple Access
• Access to channel in "rounds"
• Each station gets fixed length slot
• Unused slots go idle

8
4/3/2019

9
4/3/2019

Channel Partitioning - 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

10
4/3/2019

11
4/3/2019

Channel Partitioning - CDMA


Code Division Multiple Access
(unique “code” assigned to each user)
- Users share bandwidth by using code sequences
that are orthogonal to each other
- Users share same frequency, but each user has
own “chipping” sequence (ie, code) to encode
data
- Some second generation systems use CDMA
- Most of third generation systems use CDMA

12
4/3/2019

CDMA: allows multiple users to “coexist” and


transmit simultaneously with minimal
interference (when codes are “orthogonal”)

Encoded signal = (original data) X (chipping


sequence)

13
4/3/2019

Example

Example

14
4/3/2019

Transmission from A & B (Orthogonal)


and want to retrieve A’s signal

A (Bit = 1) 1 -1 -1 1 -1 1
B (Bit = 1) 1 1 -1 -1 1 1
Combined Signal 2 0 -2 0 0 2

Receiver Codeword
1 -1 -1 1 -1 1
Multiplication 2 0 2 0 0 2 6

15
4/3/2019

Note that the Codes for users (A & B) and (A &


C) are orthogonal
B & C are NOT Orthogonal

Taking Turns MAC protocols


Channel partitioning MAC protocols:
– share channel efficiently at high load
– inefficient at low load: delay in channel access,
1/N bandwidth allocated even if only 1 active
node

16
4/3/2019

Polling:

• Master node “invites” slave nodes to transmit in turn


• Request to Send, Clear to Send messages
• Concerns:
– polling overhead
– latency
– single point of failure (master)

Token passing

- Control token passed from one node to next sequentially.


- Token message
- Concerns:
- token overhead
- latency
- single point of failure (token)

17
4/3/2019

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 (e.g., via delayed
retransmissions)

ALOHA
An early solution to the problem of allocating
a shared channel

Developed by Norman Abramson et al. at the


University of Hawaii, 1970’s

18
4/3/2019

• Multiple access (shared medium)


• Stations broadcast whenever they have data to
send
• Overlapping broadcasts by different stations lead
to “collisions”, which can be detected just by
listening on the channel of the broadcast
• If a collision occurs, the station waits a random
length of time and broadcasts again
• Maximum efficiency: 18%
• In a later system, called “slotted ALOHA”, stations
can broadcast only in centrally controlled time
intervals
• Maximum efficiency: 36%

19
4/3/2019

Slotted ALOHA
• Time is divided into equal size slots
• Node with new arriving pkt: transmit at
beginning of next slot
• If collision: retransmit pkt in future slots with
probability p, until successful.

20
4/3/2019

Carrier Sense Multiple Access


(CSMA)
• In some shorter distance networks, it is
possible to listen to the channel before
transmitting
• In radio networks, this is called “ sensing the
carrier”
• The CSMA protocol works just like Aloha
except: If the channel is sensed busy, then the
user waits to transmit its packet, and a
collision is avoided

CSMA/CD (Collision Detection)


(Ethernet)
• CSMA improves performance, but still it wastes
the channel during collisions
• In some very short distance networks (e.g. coax
LANs), it is possible to listen while transmitting (in
addition to listening before transmitting)
• If we detect a collision while transmitting, we can
abort the transmission and free up the channel
sooner
• This idea was proposed by R. Metcalfe and Boggs
at Xerox PARC in the mid 1970s under the name
Ethernet.

21
4/3/2019

IEEE 802.11 DCF


WLAN
The Distributed Coordination Function (DCF)
of the IEEE 802.11 MAC is based on carrier
sense multiple access with collision avoidance
(CSMA/CA) for resolving contention among
multiple nodes. The collision avoidance of
CSMA/CA is supported via a random back-off
procedure.

22
4/3/2019

Nodes a & c want to communicate with b

• Interframe space (IFS) values are defined to


provide priority-based access to the radio
channel:
1. SIFS is the shortest interframe space and is
used for ACK, CTS and poll response frames
(dedicated by the physical channel).
2. DIFS is the longest IFS and is used as the
minimum delay for asynchronous frames
contending for access.

References
1. http://www.eecs.northwestern.edu/~rberry/ECE333/Lectures/
2. http://www.ecse.rpi.edu/Homepages/shivkuma/teaching/fall2001/index.
html - Shivkumar Kalvanaraman & Biplab Sikdar
3. http://www.cs.gsu.edu/~cscyip/csc8221/Chapt-07.pdf
4. http://webpages.math.luc.edu/~pld/courses/346/spr05/tbl9.pdf
5. http://calliope.uwaterloo.ca/~ggong/ECE710T4/lec5-ch3c.pdf

23

You might also like