Computer Networks Lecture #9
9 Questions
4 Views

Choose a study mode

Play Quiz
Study Flashcards
Spaced Repetition
Chat to Lesson

Podcast

Play an AI-generated podcast conversation about this lesson

Questions and Answers

What is the role of the Link layer in computer networks?

Transfers data from one node to an adjacent node over a physical link.

What is the purpose of MAC addresses in a frame header?

  • To control the flow of data between nodes
  • To specify the type of data being transmitted
  • To provide routing information for datagrams
  • To identify the source and destination nodes (correct)

The Link layer is only responsible for reliable delivery of data over wireless links.

False (B)

Error detection and correction mechanisms primarily focus on detecting and correcting flipped bits within a frame header.

<p>False (B)</p> Signup and view all the answers

What is the purpose of a parity bit in error detection?

<p>To detect a single bit error</p> Signup and view all the answers

Which of the following error detection techniques can both detect and correct single bit errors?

<p>Two-dimensional bit parity (A)</p> Signup and view all the answers

What is the purpose of the Internet checksum?

<p>Detects errors (flipped bits) within the transmitted segment.</p> Signup and view all the answers

Cyclic Redundancy Check (CRC) uses a fixed-size generator pattern to ensure the divisibility of a data unit by the generator.

<p>True (A)</p> Signup and view all the answers

Signup and view all the answers

Flashcards

Link

A communication channel that connects adjacent nodes along a communication path. Can be wired, wireless, or part of a local area network (LAN).

Frame

A layer-2 packet that encapsulates a datagram. It contains MAC addresses to identify the source and destination.

Link Layer

The layer in the network stack responsible for transferring datagrams between physically adjacent nodes over a link.

Framing

The process of adding a header and trailer to a datagram, converting it into a frame.

Signup and view all the flashcards

Multiple Access Protocol

A process used in shared media networks to determine which node can transmit at any given time.

Signup and view all the flashcards

Collision

When two or more nodes transmit at the same time on a shared medium, causing data corruption.

Signup and view all the flashcards

Channel Partitioning

A type of multiple access protocol that divides the channel into smaller pieces (time slots, frequency bands, etc.) and allocates each piece to a specific node.

Signup and view all the flashcards

Time Division Multiple Access (TDMA)

A type of channel partitioning where the channel is divided into time slots, and each node is assigned a slot for exclusive use.

Signup and view all the flashcards

Frequency Division Multiple Access (FDMA)

A type of channel partitioning where the channel spectrum is divided into frequency bands, and each node is assigned a dedicated band.

Signup and view all the flashcards

Random Access

A type of multiple access protocol where nodes transmit data without any prior coordination, and collisions can occur.

Signup and view all the flashcards

Slotted ALOHA

A type of random access protocol where the time is divided into equal-sized slots, and nodes can only transmit at the beginning of a slot.

Signup and view all the flashcards

Pure ALOHA

A type of random access protocol where nodes transmit data immediately when they have a frame to send, without waiting for a specific slot.

Signup and view all the flashcards

Carrier Sense Multiple Access (CSMA)

A random access protocol where nodes listen before they transmit. If the channel is idle, they transmit. If the channel is busy, they wait.

Signup and view all the flashcards

CSMA/CD

A type of CSMA protocol that allows nodes to detect collisions during transmission and abort transmission, minimizing wasted time.

Signup and view all the flashcards

Taking Turns

A type of multiple access protocol where nodes take turns transmitting data.

Signup and view all the flashcards

Polling

A type of taking turns protocol where a master node polls each node in turn, granting them permission to transmit.

Signup and view all the flashcards

Token Passing

A type of taking turns protocol where a control token is passed from one node to the next sequentially. Only the node holding the token can transmit.

Signup and view all the flashcards

Error Detection and Correction (EDC)

Bits added to a data stream to detect errors that may have occurred during transmission.

Signup and view all the flashcards

Parity Checking

A simple method for detecting single-bit errors in a data stream. It ensures that the number of 1's is either even or odd.

Signup and view all the flashcards

Cyclic Redundancy Check (CRC)

A powerful error detection method that involves dividing a data stream by a generator polynomial. It can detect various types of errors in transmitted data.

Signup and view all the flashcards

Full Duplex

A type of communication link where two nodes can transmit data at the same time.

Signup and view all the flashcards

Half Duplex

A type of communication link where only one node can transmit data at a time.

Signup and view all the flashcards

Network Interface Card (NIC)

A network interface card (NIC) is a hardware component that connects a computer to a network. It implements both the link and physical layers of the network stack.

Signup and view all the flashcards

Flow Control

The process of slowing down the data transmission rate between two nodes to prevent the receiving node from being overwhelmed with data.

Signup and view all the flashcards

Point-to-Point Link

A type of link where only one node can transmit at a time.

Signup and view all the flashcards

Broadcast Link

A type of link where multiple nodes can transmit data at the same time.

Signup and view all the flashcards

CSMA/CA

A type of random access protocol where nodes listen for a carrier signal before transmitting. It allows for efficient data transfer by avoiding collisions.

Signup and view all the flashcards

Local Area Network (LAN)

A type of network where nodes are close to each other and connected by a shared medium.

Signup and view all the flashcards

Router

A device that connects different segments of a network. It allows data to be transmitted between different networks.

Signup and view all the flashcards

Switch

A device that connects multiple nodes in a network, allowing them to communicate with each other.

Signup and view all the flashcards

Ethernet

A standard communication protocol that uses CSMA/CD to access the network. It is commonly used in wired networks.

Signup and view all the flashcards

IEEE 802.11

A standard for wireless local area networks (WLANs) that uses CSMA/CA to access the network. It is commonly used for wireless networks.

Signup and view all the flashcards

Study Notes

Computer Networks Lecture #9

  • Lecture covered Information-centric networking, Link layer and LANs, Error detection and correction, and Multiple access protocols.
  • Link layer is responsible for transferring datagram from one node to physically adjacent node over a link.
  • Nodes include hosts and routers.
  • Links are communication channels connecting adjacent nodes along a communication path.
  • Links can be wired, wireless, or LANs.
  • Frames are layer-2 packets that encapsulate datagrams.
  • Datagrams are transferred by different link protocols over different links (e.g., WiFi, Ethernet).
  • Each link protocol provides different services—may or may not provide reliable data transfer.
  • Analogy: a trip from Princeton to Lausanne by limo, plane, or train, illustrates how a datagram is transferred.
  • Framing and link access: encapsulate datagram into frame/add header and trailer, channel access on shared medium.
  • MAC addresses in frame headers identify source/destination nodes (different from IP addresses).
  • Reliable delivery between adjacent nodes.
  • Rarely used on low-bit error links.
  • Used in wireless links that have high error rates.
  • Both link level and end-to-end reliability mechanisms are used.
  • Flow control: pacing between adjacent sending and receiving nodes.
  • Error detection: errors caused by signal attenuation, noise. Receivers can detect errors, retransmit signals, or drop frames.
  • Error correction: receivers identify and correct bit errors without retransmission.
  • Half-duplex/Full-duplex: with half-duplex nodes at both ends can transmit, but not at the same time.
  • Implemented in Network Interface Card (NIC) or on a chip (Ethernet, WiFi card or chip).
  • Implements link and physical layer.
  • Attaches into host's system bus.
  • Combination of hardware, software, and firmware.

Interfaces Communicating

  • Sending side: encapsulates datagram in frame, adds error checking bits, reliable data transfer, flow control, etc.
  • Receiving side: checks errors, reliable data transfer, flow control, extracts datagram and passes to upper later.

Error Detection and Correction

  • Error detection is not 100% reliable; protocols may miss errors, but rarely.
  • Larger EDC (Error Detection and Correction) field yields better detection and correction.
  • EDC: error detection and correction bits (e.g., redundancy).
  • Data protected by error checking, may include header fields.

Parity Checking

  • Single bit parity: detect a single bit error.
  • Two-dimensional bit parity: Detect and correct single-bit errors.
  • Even parity: Number of 1's in data bits is even.

Recap: Internet Checksum

  • Goal: detect errors (flipped bits) in transmitted segments.
  • Sender: treat UDP segment contents as a sequence of 16-bit integers; calculate checksum (addition, one's complement sum) of segment content; place checksum value in UDP checksum field.
  • Receiver: compute checksum of received segment, check if computed checksum equals checksum field value; error detected if they are not equal.

Cyclic Redundancy Check (CRC)

  • More powerful error detection coding.
  • D: data bits; G: big pattern (generator), of r+1 bits.
  • Choose r CRC bits R such that <D, R> is exactly divisible by G (mod 2).
  • Receiver knows G in advance; divides <D, R> by G; non-zero remainder = error detected.
  • Can detect all burst errors less than r+1 bits.

Multiple Access Protocols

  • Two types of links: point-to-point and broadcast (shared wire/medium).
  • Broadcast examples: old-fashioned ethernet, upstream HFC in cable-based access, IEEE 802.11 wireless LAN (4G/5G, satellite).
  • Single shared broadcast channel; two or more simultaneous transmissions = interference and collisions .

Multiple Access Protocols (continued)

  • Distributed algorithm determines nodes' channel sharing - i.e., when a node can transmit.
  • Communication for channel sharing control must use channel itself.
  • No out-of-band channel for coordination.

Ideal Multiple Access Protocol

  • Given: multiple access channel of rate R bps.
  • Desirable: fully utilized (single node transmits at R), fairly shared (N nodes transmit at R/N average), fully decentralized (no central node to coordinate), no synchronization of clocks/slots, simple.

Three Broad Classes of MAC Protocols

  • Channel partitioning: divide channel into smaller pieces (time slots, frequency, code). Allocate piece to node for exclusive use.
  • Random access: channel not divided; allow collisions; recover from collisions ("recover" from collisions).
  • Taking turns: nodes take turns (nodes with more to send can take longer turns).

Channel Partitioning: TDMA

  • Time Division Multiple Access (TDMA).
  • Access to channel in "rounds".
  • Each station gets fixed-length slot (during each round) equal to packet transmission time.
  • Unused slots are idle.

Channel Partitioning: FDMA

  • Frequency Division Multiple Access (FDMA).
  • Channel spectrum is divided into frequency bands; each station is assigned a fixed frequency band.
  • Unused transmission time in frequency bands is idle.

Random Access Protocols

  • When a node has a packet to send, it transmits at a full channel data rate of R.
  • No a priori coordination among nodes.
  • Two or more transmitting nodes can create a collision; random access MAC protocol specifies how to detect collision and recover from collision (via delayed retransmissions).
  • Example protocols: ALOHA, slotted ALOHA, CSMA, CSMA/CD, CSMA/CA.

Slotted ALOHA

  • Assumptions: All frames of the same size; time is divided into equal-size slots (transmit 1 frame).
  • Nodes start transmission only at beginning of slot.
  • If two or more nodes transmit via the same slot, all nodes detect collision.

Slotted ALOHA (continued)

  • When a node obtains a fresh frame, transmits it in the next slot, no collision.
  • Collision: node retransmits in each subsequent slot with a probability p until success
  • Pros: single active node can continuously transmit at full channel rate; highly decentralized; simple.
  • Cons: collisions, wasting slots, and idle slots (for random backoff). Clock synchronization is required.

Efficiency of Slotted ALOHA

  • Efficiency: long-run fraction of successful slots (many nodes, all with many frames to send).
  • Simple analysis: N nodes, each transmits in a slot with probability p; probability that a given node has success in a slot is p(1-p)N-1; probability that any node has a success in a slot is Np(1-p)N-1. Find p* that maximizes Np(1-p)N-1.

Efficiency of Slotted ALOHA (continued)

  • Find p* that maximizes Np(1-p)N-1—p* is obtained by taking the derivative of f(N) and setting = 0. With p*, Np*(1-p*)N-1 = (1-1/N)N-1.
  • For many nodes, limit of (1-1/N)N−1 as N goes to infinity is 1/e (approximately 0.37).

Pure ALOHA

  • Unslotted ALOHA: simpler, no synchronization; when a frame is generated, it is transmitted immediately.
  • Collision probability increases with no synchronization.

Carrier Sense Multiple Access (CSMA)

  • Simple CSMA: listen before transmit; if channel is idle transmit entire frame; defer transmission if channel is sensed busy.
  • CSMA/CD (CSMA with Collision Detection): collision is detected within a short time; colliding transmission is aborted; reduce channel wastage. Collision detect is easy in wired, difficult in wireless.

Collision in CSMA

  • Collision can still occur with carrier sensing.
  • Propagation delay means that two nodes may not hear each other's just-started transmission.

CSMA/CD

  • CSMA/CD reduces amount of time wasted in collision.

Ethernet CSMA/CD Algorithm

  • Step 1: NIC receives datagram, creates frame.
  • Step 2: If channel idle, start frame transmission.
  • Step 3: If transmit entire frame without collision, done.
  • Step 4: Collision detected, abort, send jam signal.
  • Step 5: Enter binary (exponential) backoff, wait K × 512 bit times, return to Step 2.
  • More collisions: longer backoff interval.

Efficiency of CSMA/CD

  • Tprop = max propagation delay between two nodes; Ttrans = time to transmit max-size frame. Efficiency = 1 / (1 + 5Tprop / Ttrans).
  • Efficiency goes to 1 as Tprop goes to 0, and goes to infinity as Ttrans goes to infinity.
  • Better performance than ALOHA. Simple, cheap, and decentralized.

"Taking Turn" MAC Protocols

  • Channel partitioning MAC protocols: at high load, share channel efficiently and fairly; at low load, inefficient (e.g., single active node with 1/N bandwidth allocated).
  • Random access MAC protocols: at high load = collision overhead; at low load = efficient (single active node fully utilizes channel).
  • "Taking turn" protocols: look for best of both worlds.

"Taking Turn" MAC Protocols (continued)

  • Polling: master node "invites" other nodes to transmit in turn (typically with "dumb" devices)—concerns: polling overhead, latency; single point of failure (master node).
  • Token passing: control token passed sequentially from one node to the next; concerns: token overhead, latency, single point of failure (token).

Cable Access Network

  • FDM, TDM, and random access: multiple downstream (broadcast) FDM channels (up to 1.6 Gbps/channel); single CMTS transmits into channels; no multiple access problems; multiple upstream channels (up to 1 Gbps/channel).
  • Multiple access: all users contend (random access) for certain upstream channel time slots. Others are assigned in the manner of TDM.
  • Data Over Cable Service Interface Specification (DOCSIS).

Summary of MAC Protocols

  • Channel partitioning by time, frequency, or code (TDMA, FDMA). Random access (dynamic)– ALOHA, Slotted ALOHA, CSMA, CSMA/CD, CSMA/CA. Carrier sensing: easy in some technologies, hard in others. CSMA/CD used in ethernet; CSMA/CA used in IEEE 802.11. Taking turns: polling, token passing (Bluetooth, FDDI, token ring).

Studying That Suits You

Use AI to generate personalized quizzes and flashcards to suit your learning preferences.

Quiz Team

Related Documents

Computer Networks Lecture 9 PDF

Description

This quiz covers key concepts from Lecture #9 of Computer Networks, focusing on Information-centric networking, the Link layer, and LANs. It includes topics such as error detection, correction methods, and various multiple access protocols utilized in networking. Test your understanding of how data is framed and transmitted between nodes in different networking scenarios.

More Like This

Link Layer and LANs Quiz
5 questions

Link Layer and LANs Quiz

IlluminatingRhinoceros avatar
IlluminatingRhinoceros
Computer Networks: Link Layer and LANs
40 questions
Networking Chapter 6: Link Layer and LANs
60 questions
Use Quizgecko on...
Browser
Browser