Networking: Physical & Link Layer Summer 2013 Cornell - - PowerPoint PPT Presentation

▶
networking physical link layer
SMART_READER_LITE
LIVE PREVIEW

Networking: Physical & Link Layer Summer 2013 Cornell - - PowerPoint PPT Presentation

CS 4410 Operating Systems Networking: Physical & Link Layer Summer 2013 Cornell University 1 Today Which are the services that the Link layer offers? Link layer Implementation Media Access Control Addressing


slide-1
SLIDE 1

1

CS 4410 Operating Systems

Networking: Physical & Link Layer

Summer 2013 Cornell University

slide-2
SLIDE 2

2

Today

  • Which are the services that the Link layer
  • ffers?
  • Link layer
  • Implementation
  • Media Access Control
  • Addressing
  • Ethernet
  • Switch
slide-3
SLIDE 3

3

Protocol Stack

Application Link Physical Application Link Physical Computer A Computer B Transport Transport Network Network M M Ht M Ht Hn M Ht Hn Hl Message Segment Datagram Frame

slide-4
SLIDE 4

4

LAN

  • Local Area Network:
  • Small geographical area (office, house).
  • Small number of nodes (computers, network devices).
  • Links to connect nodes.
  • How are messages transferred between nodes of the same LAN?
  • It is responsibility of the Link Layer.
slide-5
SLIDE 5

5

Link Layer

  • Mission: Transfer a frame through a link.
  • Examples: Ethernet, LAN 802.11 (WiFi).
  • Frame: Transfer unit
  • Services
  • Encapsulation (datagram + header → frame)
  • Addressing
  • Media Access Control
  • Error Detection / Correction
  • Not all link protocols offer all the services.

Link Physical Link Physical M Ht Hn Hl Frame Node A Node B Link

slide-6
SLIDE 6

6

Implementation

  • A Network Interface Card (NIC) is attached to nodes.
  • One node may have multiple NICs.
  • A chip in NIC is responsible to implement most of the Link

services.

  • The controller of a NIC, takes the datagram (Network Layer)

from the memory of the node.

  • Then, the datagram is encapsulated into a frame in the NIC.
  • Finally, the frame is converted into a signal and released into

the link.

  • Generally, the Link layer is implemented by both the software

and the hardware.

slide-7
SLIDE 7

7

Media Access Control

  • How can we connect the nodes with each other?
  • Point-to-point link

–

The link is shared only between 2 nodes.

–

The frame goes from the source to the destination.

–

Disadvantages?

  • Broadcast link

–

One link shared between all the nodes.

–

The frame goes from the source to all the nodes.

–

Only the destination will read it.

–

Disadvantages?

–

The Link Layer is responsible to share the media access between the nodes.

slide-8
SLIDE 8

8

Media Access Control

  • Broadcast Link:
  • Which resource are the nodes going to share?

– Bandwidth (bits per second – bps).

  • Rate with which data is transmitted in the link.
  • So, nodes compete for bandwidth.

– Like processes compete for CPU → multiplexing

  • How will the Link layer control the competition?

– Channel Partition

  • Time slices

– Random access

  • CSMA/CD

– Taking-turns access

slide-9
SLIDE 9

9

Addressing

  • After having defined the Media Access Control,

how will the nodes be identified?

  • Each NIC has a static 6-byte identification.

– Ex. 1A-23-F9-CD-06-95

  • The Link layer uses this identification to distinguish

nodes, and its name is:

– MAC address

  • In a broadcast link, the destination checks the MAC

address to decide if it should keep the frame or not.

slide-10
SLIDE 10

10

Ethernet

  • Link Layer Protocol
  • Invented in 70's.
  • Through the time, different LAN architectures were supported:
  • Bus

–

One common broadcast cable.

–

Need for Media Access Control.

  • Star with hub

–

The nodes are connected to the hub.

–

The hub, simply, was reproducing the received signal from a link to the rest

  • f the links.

–

Need for Media Access Control.

  • Star with switch

–

The nodes are connected to the switch.

–

The switch controls the flow of frames.

  • It sends the frame to its destination without conflicting with other frames.
slide-11
SLIDE 11

11

Ethernet

  • Frame structure:
  • Header

– MAC destination, source (6 byte each) – Preamble (8 bytes) – CRC (4 bytes)

  • Data

– 46 to 1500 bytes – Encapsulated datagram

Preamble MAC destination MAC source CRC data ...

slide-12
SLIDE 12

12

Ethernet

  • Multiple Access Control:
  • Bus, Star with hub
  • CSMA/CD

– Carrier sensing

  • The sender waits until the channel is unoccupied.

– Collision detection

  • If two nodes sent frames simultaneously, they detect the collision

and stop transmitting.

  • They will try again after a specific time period.

– Exponential backoff.

slide-13
SLIDE 13

13

Ethernet

  • Switch:
  • It forwards the frame only to

the destination.

– Using the switch table. It

is an array of (MAC Address, port).

– If it does not know where

the destination is, yet, it forwards the frame to all direction.

  • It buffers the frames to avoid

collisions.

– When 2 frames head for

the same destination.

  • It filters and discards

frames, based on predefined rules.

Switch

buffer port

slide-14
SLIDE 14

14

Ethernet

Application Link Physical Application Link Physical Computer A Computer B Transport Transport Network Network Link Physical Switch

slide-15
SLIDE 15

15

Ethernet

1A-23-F9-CD-06-95 1B-23-F0-CD-06-11

What happens when 1A-23-F9-CD-06-95 sends a frame to 1B-23-F0-CD-06-11 ?

slide-16
SLIDE 16

16

Today

  • Which are the services that the Link layer
  • ffers?
  • Link layer
  • Implementation
  • Media Access Control
  • Addressing
  • Ethernet
  • Switch