Skip to main content

Introduction

Summary

keywords

TODO

HW

Exercise*

Next time


Link layer

link layer is responsible for one and other physically adjacent nodes.

  • multiple link layer protocols can be used in a network. ex. ethernet, wifi,..
  • No routing. only forwarding. only switching fabric.
  • may or may not provide reliable data.
sidenote.
  • wireless links typically provides reliability. ex. error connection..
  • routers can have multiple ip, multiple MAC.

LAN

The network without involving a router.

  1. Framing, link access
    • encapsulate with header, trailer, making a frame.
    • channel access if shared medium
    • MAC address is always used to identify the source and destination device
  2. flow control
    • pacing between adjacent nodes.
  3. error detection
    • receiver detects, signals retransmission, or drops frame.
  4. error correction
  5. half-duplex, full-duplex
    • half-duplex is like walkie talkie
  6. multiple access protocols
    • avoiding collision between ...?

MAC

  • used locally to get frame from
  • pretty much random. EXACT MATCHING.

ARP table.

mac-ip matching for the local area. usage of broadcast mac address. FF-FF-FF-FF-FF-FF

Routing to another subnet

  • A knows B's IP address (from DNS request)

  • A knows IP address of first hop router, R (from DHCP responses)

  • A knows R's MAC address (from ARP)

  • Sender sends with Router MAC destination.

  • Router will lookup the dest IP in the routing table, and find the MAC address of ethernet to go out.

  • Router will amend the MAC src to subnet2's router MAC

  • router will amend the MAC dest to destination device.

When going out of the local network, you will type in the MAC dest as the first hop router.

Ethernet

Buses separated with Layer-2 Switches to prevent collision.

  • Connection less.
  • Unreliable

Ethernet frame structure

preamble : used for clock synchronizing addresses : type : L3 protocol CRC : cyclic redundancy check

Switch

Link layer device.

  • examine incoming frames AMC address, sometimes buffer, and forward frame.

  • transparent : host unaware of the presence of switches

  • plug-and-play, self-learning tech.

  • Switch 가 눈치 잘 보고 단서 찾아서 switch table 알아서 만듬. (flooding)

  • switch table

Switches vs. Routers