28
CSE 461: Introduction to Computer Communications Networks Autumn 2010 Module 8.5 Midterm Review Ivayla Dermendjieva [email protected]

Introduction to Computer Networks: Midterm Review...Limitations of Bridges • Why can’t we build a large network using bridges? – Little control over forwarding paths – Size

  • Upload
    others

  • View
    6

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Introduction to Computer Networks: Midterm Review...Limitations of Bridges • Why can’t we build a large network using bridges? – Little control over forwarding paths – Size

CSE 461: Introduction to ComputerCommunications Networks

Autumn 2010

Module 8.5Midterm Review

Ivayla [email protected]

Page 2: Introduction to Computer Networks: Midterm Review...Limitations of Bridges • Why can’t we build a large network using bridges? – Little control over forwarding paths – Size

CSE461 10au

This Module's Topics

• Reliable Transport– Bit encoding– Error detection and Correction– Sliding window

• Media Access Control (MAC)– Ethernet– 802.11– Bridges

Page 3: Introduction to Computer Networks: Midterm Review...Limitations of Bridges • Why can’t we build a large network using bridges? – Little control over forwarding paths – Size

CSE461 10au

Direct Link Networks / Errors• We're talking about “direct link” networks

• We'll assume all bit errors are detected, and that the receiver ignores received data with errors

• Our goal: make sure that the data A wants to send to B eventually is received by B– Is delivered to receiving client “at most once”– Is delivered to receiving client “in order”

Page 4: Introduction to Computer Networks: Midterm Review...Limitations of Bridges • Why can’t we build a large network using bridges? – Little control over forwarding paths – Size

CSE461 10au

Bit Encoding• Want to send messages, not just bits

• So break up bit stream into discrete chunks (frames)

• Synchronize both end points on frame boundaries: Encode data to integrate the clock in the data stream– Manchester– NRZ– NRZI– 4B/5B

Page 5: Introduction to Computer Networks: Midterm Review...Limitations of Bridges • Why can’t we build a large network using bridges? – Little control over forwarding paths – Size

CSE461 10au

Error Detection and Correction

• How can we know if the frames we received have not been corrupted in transit?– Add additional information to frames– Sender computes some property of data and sends it

along with the data– Receiver computes same property and compares

• Various methods for determining frame integrity– Parity– Internet Checksum– Cyclic Redundancy Check

• Hamming distance based correction schemes for codes

Page 6: Introduction to Computer Networks: Midterm Review...Limitations of Bridges • Why can’t we build a large network using bridges? – Little control over forwarding paths – Size

CSE461 10au

Automatic Repeat Request (ARQ)• Stop-and-wait

Sender:– sends data and waits for an ACK– if no ACK received after some timeout, resend frame– Once ACK received, send next frame

Receiver tells sender when it gets the data

• Important general ideas:– Receiver responds to each data item it receives– Receiver doesn't “respond” otherwise

• E.g., doesn't send an ACK every second– Sending is an idempotent operation

• It can be repeated any positive number of times and still end up with the same effect

Page 7: Introduction to Computer Networks: Midterm Review...Limitations of Bridges • Why can’t we build a large network using bridges? – Little control over forwarding paths – Size

CSE461 10au

ARQ

If all goes well: Packet loss:

Page 8: Introduction to Computer Networks: Midterm Review...Limitations of Bridges • Why can’t we build a large network using bridges? – Little control over forwarding paths – Size

CSE461 10au

Problem with Stop-And-Wait: Performance

• Problem: “keeping the pipe full”– If the bandwidth-delay product is much larger than a

packet size, the sender will be unable to keep the link busy

• Example– 1.5Mbps link x 45ms RTT = 67.5Kb (8KB)– 1KB frames implies 1/8th link utilization

• Solution: allow multiple frames “in flight”

Page 9: Introduction to Computer Networks: Midterm Review...Limitations of Bridges • Why can’t we build a large network using bridges? – Little control over forwarding paths – Size

CSE461 10au

Sliding Window Protocol• There is some maximum number of un-ACK’ed

frames the sender is allowed to have in flight– We call this “the window size”– Example: window size = 2

Page 10: Introduction to Computer Networks: Midterm Review...Limitations of Bridges • Why can’t we build a large network using bridges? – Little control over forwarding paths – Size

CSE461 10au

Sliding Window: Sender• Assign sequence number to each frame • Maintain three state variables:

– send window size (SWS)– last acknowledgment received (LAR)– last frame sent (LFS)

• Maintain invariant: LFS - LAR <= SWS

• Advance LAR when ACK arrives• Buffer up to SWS frames

Page 11: Introduction to Computer Networks: Midterm Review...Limitations of Bridges • Why can’t we build a large network using bridges? – Little control over forwarding paths – Size

CSE461 10au

Sliding Window: Receiver• Maintain three state variables

– receive window size (RWS)– largest frame acceptable (LFA)– last frame received (LFR)

• Maintain invariant: LFA - LFR <= RWS

• Frame SeqNum arrives:– if LFR < SeqNum ≤ LFA accept + send ACK⇒– if SeqNum ≤ LFR or SeqNum > LFA discard⇒

• Send cumulative ACKs – send ACK for largest frame such that all frames less than this have been received

Page 12: Introduction to Computer Networks: Midterm Review...Limitations of Bridges • Why can’t we build a large network using bridges? – Little control over forwarding paths – Size

CSE461 10au

Sliding Window Summary

First role is to enable reliable delivery of packets– Timeouts and acknowledgements

• Second role is to enable in order delivery of packets– Receiver doesn’t pass data up to app until it has

packets in order

• Third role is to enable flow control– Prevents server from overflowing receiver’s buffer

Page 13: Introduction to Computer Networks: Midterm Review...Limitations of Bridges • Why can’t we build a large network using bridges? – Little control over forwarding paths – Size

CSE461 10au

Medium Access

• If more than one station transmits at a time, the odds of an error are high (maybe certain)

• The system is distributed – no station can be certain about the state of other stations

• We'd like to get high throughput– Especially for “bursty traffic”

Page 14: Introduction to Computer Networks: Midterm Review...Limitations of Bridges • Why can’t we build a large network using bridges? – Little control over forwarding paths – Size

CSE461 10au

Ethernet MAC• The basic idea is to let a station send when it

has something to send– We don’t take turns; we don’t make reservations

• The problem is that we’ll have collisions, resulting in corrupted data

• We like to reduce the time wasted by collisions, without sacrificing distribution / simplicity

Page 15: Introduction to Computer Networks: Midterm Review...Limitations of Bridges • Why can’t we build a large network using bridges? – Little control over forwarding paths – Size

CSE461 10au

Reducing Collision Overheads – CSMA/CD

• Carrier Sense Multiple Access (CSMA)– Listen to medium before sending and “defer” if the

medium is sensed busy• What collision scenarios does this eliminate?• Is it still possible to collide?

• Collision Detection (CD)– A transmitting host also acts as a receiver– Detect a collision when the bit read from the ether is

not the same as the one being transmitted• If a collision is detected, jam the ether so that all

stations know there is a collision

– What are the benefits of CD?• Of jamming?

Page 16: Introduction to Computer Networks: Midterm Review...Limitations of Bridges • Why can’t we build a large network using bridges? – Little control over forwarding paths – Size

CSE461 10au

Reacting to Collision Detection• What happens when a collision occurs?

– Ethernet takes a collision as a sign it has underestimated N (the number of contending stations)

• Binary exponential backoff– A slot time is the maximum possible time between a

host starting a transmission and all others hearing it• (Obviously, this is a function of the length of the

Ethernet)– If k consecutive collisions have occurred, pick at

random a number of slots between 0 and 2k-1 and backoff (wait) that long before trying again

– Binary exponential backoff has been proven stable in an idealized model

Page 17: Introduction to Computer Networks: Midterm Review...Limitations of Bridges • Why can’t we build a large network using bridges? – Little control over forwarding paths – Size

CSE461 10au

Ethernet (802.2) Addresses• Each interface on an Ethernet has a unique

address– Interface cards examine each frame as it goes by– If the destination address matches their own address,

they save the frame and notify the host– (Interfaces can also be put into “promiscuous mode,”

where they save all frames)

• Moreover, each interface in the world has a unique address

• Addresses are 48 bits ,written as sixteen hex digits– FF:FF:FF:FF:FF:FF is reserved as the broadcast

address

Page 18: Introduction to Computer Networks: Midterm Review...Limitations of Bridges • Why can’t we build a large network using bridges? – Little control over forwarding paths – Size

CSE461 10au

Wireless / 802.11• Carrier-sense

– Defer if you sense a sufficiently high energy level in the air

• No collision detection– Transmission emanating from your own radio

overwhelms any incoming signal

• Explicit ACKs– If no ACK received in reserved time, use a binary

exponential backoff procedure to chose a random backoff time

– Count down that time, pausing whenever you sense a transmission in the air

– Re-transmit when your counter reaches 0

Page 19: Introduction to Computer Networks: Midterm Review...Limitations of Bridges • Why can’t we build a large network using bridges? – Little control over forwarding paths – Size

CSE461 10au

Modified ARQ• To support this MAC level retry, the frame headers

carry sequence numbers and a retry bit– Retry bit = 0 for first transmission of a frame, 1 for retries– Sequence number of each distinct frame must be distinct

(until wraparound)– Allows receiver to detect (and throw away) duplicates

• Same sequence number as last frame received from that source and retry bit = 1 means it’s a duplicate

• Otherwise, assume it’s a new frame and deliver up to other protocol layers

• NO concept / detection of missing frames– Sequence numbers are used only to detect duplicates– “Missing” sequence numbers have no meaning

• Successive sequence numbers to a particular destination may be any number not used too recently.

Page 20: Introduction to Computer Networks: Midterm Review...Limitations of Bridges • Why can’t we build a large network using bridges? – Little control over forwarding paths – Size

CSE461 10au

RTS / CTS• A source may precede a data/ACK exchange with

a request-to-send/clear-to-send (RTS/CTS) exchange– The RTS carries a duration sufficient to cover the 4

frame exchange

• The receiver responds with a CTS carrying the time required to cover the CTS / data / ACK

• If the CTS comes back, the source sends the data, in the normal way

Page 21: Introduction to Computer Networks: Midterm Review...Limitations of Bridges • Why can’t we build a large network using bridges? – Little control over forwarding paths – Size

CSE461 10au

LAN Bridges• Operate at Layer 1

• Connect multiple LAN segments

• Allow Layer 1 communication among all stations

• Are backward compatible with the original single segment protocol

• Don't (even try to) scale to Internet size

Page 22: Introduction to Computer Networks: Midterm Review...Limitations of Bridges • Why can’t we build a large network using bridges? – Little control over forwarding paths – Size

CSE461 10au

Learning Bridges Example

Page 23: Introduction to Computer Networks: Midterm Review...Limitations of Bridges • Why can’t we build a large network using bridges? – Little control over forwarding paths – Size

CSE461 10au

After four packets have been sent

Page 24: Introduction to Computer Networks: Midterm Review...Limitations of Bridges • Why can’t we build a large network using bridges? – Little control over forwarding paths – Size

CSE461 10au

Spanning Tree Algorithm Overview

Page 25: Introduction to Computer Networks: Midterm Review...Limitations of Bridges • Why can’t we build a large network using bridges? – Little control over forwarding paths – Size

CSE461 10au

How it works

Page 26: Introduction to Computer Networks: Midterm Review...Limitations of Bridges • Why can’t we build a large network using bridges? – Little control over forwarding paths – Size

CSE461 10au

Example

Page 27: Introduction to Computer Networks: Midterm Review...Limitations of Bridges • Why can’t we build a large network using bridges? – Little control over forwarding paths – Size

CSE461 10au

Additional Details

Page 28: Introduction to Computer Networks: Midterm Review...Limitations of Bridges • Why can’t we build a large network using bridges? – Little control over forwarding paths – Size

CSE461 10au

Limitations of Bridges• Why can’t we build a large network using

bridges?– Little control over forwarding paths– Size of bridge forwarding tables grows with number of

hosts– Broadcast traffic flows freely over whole extended LAN

– Spanning tree algorithm limits reconfiguration speed

– Poor solution for connecting LANs of different kinds