Hamming Code. Gives a method for construc=ng a code with a distance of 3. Plus an easy way to correct [soon]

Similar documents
Link Layer. (continued)

Link Layer: Retransmissions

Pending Issues. Opera,ng Systems and Networks. Network Lecture 3: Link Layer (1) Where we are in the Course. Scope of the Link Layer

Link Layer: Error detection and correction

Where we are in the Course

Link Layer. (continued)

Topics (2) 3. Retransmissions. 4. MulFple Access. 5. Switching. Handling loss. Classic Ethernet, Modern Ethernet

Computer Networks. Randomized Multiple Access

EITF25 Internet- - Techniques and Applica8ons Stefan Höst. L5 Data link (part 2)

CSE 461 Multiple Access. David Wetherall

Opera.ng Systems and Networks. Network Lecture 4: Link Layer (2) Where we are in the Course. Topics. Topics (2) Retransmissions (ARQ) ( 3.

CS 43: Computer Networks Media Access. Kevin Webb Swarthmore College November 30, 2017

CS 43: Computer Networks. 27: Media Access Contd. December 3, 2018

COS 140: Foundations of Computer Science

Chapter 12 Multiple Access 12.1

Opera-ng Systems and Networks. Network Lecture 4: Link Layer (2) Pending Issues

Random Access. 1. Aloha. 2. Slotted Aloha 3. CSMA 4. CSMA/CD

Computer Networks. Shyam Gollakota

CSE 461: Multiple Access Networks. This Lecture

CHAPTER 7 MAC LAYER PROTOCOLS. Dr. Bhargavi Goswami Associate Professor & Head Department of Computer Science Garden City College

COS 140: Foundations of Computer Science

Networking Technologies and Applications

CSMA/CD (Collision Detection)

The Link Layer and LANs. Chapter 6: Link layer and LANs

CSEP 561 Error detection & correction. David Wetherall

Problem Set Name the 7 OSI layers and give the corresponding functionalities for each layer.

Jaringan Komputer. Broadcast Network. Outline. MAC (Medium Access Control) Channel Allocation Problem. Dynamic Channel Allocation

ECE 158A: Lecture 13. Fall 2015

CS 716: Introduction to communication networks. - 9 th class; 19 th Aug Instructor: Sridhar Iyer IIT Bombay

ECEN 5032 Data Networks Medium Access Control Sublayer

ECE453 Introduction to Computer Networks. Broadcast vs. PPP. Delay. Lecture 7 Multiple Access Control (I)

LANs. Local Area Networks. via the Media Access Control (MAC) SubLayer. Networks: Local Area Networks

Redes de Computadores. Medium Access Control

Medium Access Control

High Level View. EE 122: Ethernet and Random Access protocols. Medium Access Protocols

Contention Protocols and Networks

Data Link Layer -2- Network Access

Computer Networks. Medium Access Sublayer (Part I)

EE 122: Ethernet and

CSC 4900 Computer Networks: The Link Layer

Wireless Communications

Ethernet and WiFi. h-p://xkcd.com/466/

Data Link Layer -2- Network Access

Medium Access Control

COMP476 Networked Computer Systems. Polling. Sharing the Wire. LAN Technologies. COMP476 Networked Computer Systems 1

CS 455/555 Intro to Networks and Communications. Link Layer

Links. Error Detection. Link Layer. Multiple access protocols. Nodes Links Frame. Shared channel Problem: collisions How nodes share a channel

Lecture 9: Bridging. CSE 123: Computer Networks Alex C. Snoeren

Topics. Link Layer Services (more) Link Layer Services LECTURE 5 MULTIPLE ACCESS AND LOCAL AREA NETWORKS. flow control: error detection:

Link layer, LANs: outline. Chapter 5-1 Link Layer. Link layer: introduction. Link layer services

EITF25 Internet Techniques and Applications L4: Network Access. Stefan Höst

LAN PROTOCOLS. Beulah A AP/CSE

Multiple Access Protocols

Aloha and slotted aloha

CMPE 257: Wireless and Mobile Networking

Lecture 6. Data Link Layer (cont d) Data Link Layer 1-1

Lecture 8 Link Layer: functionality, error detection, media access algorithm

Link Layer and LANs 안상현서울시립대학교컴퓨터 통계학과.

Chapter 5 Link Layer. Computer Networking: A Top Down Approach. 6 th edition Jim Kurose, Keith Ross Addison-Wesley March 2012

Reminder: Datalink Functions Computer Networking. Datalink Architectures

Computer and Network Security

Data and Computer Communications. Chapter 11 Local Area Network

6.9 Summary. 11/20/2013 Wireless and Mobile Networks (SSL) 6-1. Characteristics of selected wireless link standards a, g point-to-point

Links Reading: Chapter 2. Goals of Todayʼs Lecture. Message, Segment, Packet, and Frame

Link Layer I: ALOHA, Time-, Frequency-, and Code Division. COS 463: Wireless Networks Lecture 4 Kyle Jamieson

Medium Access Control Sublayer Chapter 4

Ethernet. Introduction. CSE 3213 Fall 2011

MULTIPLE ACCESS PROTOCOLS 2. 1

Multiple Access. Data Communications and Networking

Lecture 6 The Data Link Layer. Antonio Cianfrani DIET Department Networking Group netlab.uniroma1.it

Conges'on. Last Week: Discovery and Rou'ng. Today: Conges'on Control. Distributed Resource Sharing. Conges'on Collapse. Conges'on

Data and Computer Communications

Module 10 Data Link Layer CS655! 10-1!

Lecture 4: Wireless MAC Overview. Hung-Yu Wei National Taiwan University

Getting Connected (Chapter 2 Part 4) Networking CS 3470, Section 1 Sarah Diesburg

Computer Networks. Today. Principles of datalink layer services Multiple access links Adresavimas, ARP LANs Wireless LANs VU MIF CS 1/48 2/48

Computer Networks Medium Access Control. Mostafa Salehi Fall 2008

ECE 4450:427/527 - Computer Networks Spring 2017

Chapter 5 Link Layer and LANs

Goals of Today s Lecture. Adaptors Communicating

CS 123: Lecture 12, LANs, and Ethernet. George Varghese. October 24, 2006

Chapter 4 (Week 7) The Medium Access Control Sublayer ANDREW S. TANENBAUM COMPUTER NETWORKS FOURTH EDITION PP CN&DC Dr.

CMPE 150/L : Introduction to Computer Networks. Chen Qian Computer Engineering UCSC Baskin Engineering Lecture 16

Contents. The MAC layer CN2. 1. MAC as Shared Medium 2. MAC as interconnection at small scale 3. MAC and Link layer. Jean-Yves Le Boudec, EPFL

CS 3640: Introduction to Networks and Their Applications

Media Access Control. Networked Systems (H) Lecture 5

Chapter 6 Medium Access Control Protocols and Local Area Networks

Long Distance Wireless Communication. Principally satellite communication:

LECTURE PLAN. Script. Introduction about MAC Types o ALOHA o CSMA o CSMA/CD o CSMA/CA

Protocols for Multiaccess Networks

CIS 551 / TCOM 401 Computer and Network Security. Spring 2007 Lecture 7

Chapter 6 Medium Access Control Protocols and Local Area Networks

Telecommunication Protocols Laboratory Course. Lecture 2

Data Link Layer: Overview, operations

Data Link Layer: Collisions

ECE 4450:427/527 - Computer Networks Spring 2017

The MAC Layer. Contents. Textbook. Jean Yves Le Boudec Fall 2012

Chapter V: Link Layer

CSE/EE 461 Wireless and Contention-Free Protocols

CS 716: Introduction to communication networks. - 8 th class; 17 th Aug Instructor: Sridhar Iyer IIT Bombay

Transcription:

Hamming Code Gives a method for construc=ng a code with a distance of 3 Uses n = 2 k k 1, e.g., n=4, k=3 Put check bits in posi=ons p that are powers of 2, star=ng with posi=on 1 Check bit in posi=on p is parity of posi=ons with a p term in their values Plus an easy way to correct [soon] CSE 461 University of Washington 1

Hamming Code (2) Example: data=0101, 3 check bits 7 bit code, check bit posi=ons 1, 2, 4 Check 1 covers posi=ons 1, 3, 5, 7 Check 2 covers posi=ons 2, 3, 6, 7 Check 4 covers posi=ons 4, 5, 6, 7 _ 1 2 3 4 5 6 7 CSE 461 University of Washington 2

Hamming Code (3) Example: data=0101, 3 check bits 7 bit code, check bit posi=ons 1, 2, 4 Check 1 covers posi=ons 1, 3, 5, 7 Check 2 covers posi=ons 2, 3, 6, 7 Check 4 covers posi=ons 4, 5, 6, 7 0 1 0 0 1 0 1 1 2 3 4 5 6 7 p 1 = 0+1+1 = 0, p 2 = 0+0+1 = 1, p 4 = 1+0+1 = 0 CSE 461 University of Washington 3

Hamming Code (4) To decode: Recompute check bits (with parity sum including the check bit) Arrange as a binary number Value (syndrome) tells error posi=on Value of zero means no error Otherwise, flip bit to correct CSE 461 University of Washington 4

Example, con=nued Hamming Code (5) 0 1 0 0 1 0 1 p 1 = p 2 = p 4 = Syndrome = Data = 1 2 3 4 5 6 7 CSE 461 University of Washington 5

Example, con=nued Hamming Code (6) 0 1 0 0 1 0 1 1 2 3 4 5 6 7 p 1 = 0+0+1+1 = 0, p 2 = 1+0+0+1 = 0, p 4 = 0+1+0+1 = 0 Syndrome = 000, no error Data = 0 1 0 1 CSE 461 University of Washington 6

Example, con=nued Hamming Code (7) 0 1 0 0 1 1 1 p 1 = p 2 = p 4 = Syndrome = Data = 1 2 3 4 5 6 7 CSE 461 University of Washington 7

Example, con=nued Hamming Code (8) 0 1 0 0 1 1 1 1 2 3 4 5 6 7 p 1 = 0+0+1+1 = 0, p 2 = 1+0+1+1 = 1, p 4 = 0+1+1+1 = 1 Syndrome = 1 1 0, flip posi=on 6 Data = 0 1 0 1 (correct a^er flip!) CSE 461 University of Washington 8

Other Error Correc=on Codes Codes used in prac=ce are much more involved than Hamming Convolu=onal codes ( 3.2.3) Take a stream of data and output a mix of the recent input bits Makes each output bit less fragile Decode using Viterbi algorithm (which can use bit confidence values) CSE 461 University of Washington 9

Other Codes (2) LDPC Low Density Parity Check ( 3.2.3) LDPC based on sparse matrices Decoded itera=vely using a belief propaga=on algorithm State of the art today Invented by Robert Gallager in 1963 as part of his PhD thesis Promptly forgofen un=l 1996 Source: IEEE GHN, 2009 IEEE CSE 461 University of Washington 10

Detec=on vs. Correc=on Which is befer will depend on the pafern of errors. For example: 1000 bit messages with a bit error rate (BER) of 1 in 10000 Which has less overhead? CSE 461 University of Washington 11

Detec=on vs. Correc=on Which is befer will depend on the pafern of errors. For example: 1000 bit messages with a bit error rate (BER) of 1 in 10000 Which has less overhead? It s=ll depends! We need to know more about the errors CSE 461 University of Washington 12

Detec=on vs. Correc=on (2) 1. Assume bit errors are random Messages have 0 or maybe 1 error Error correc=on: Need ~10 check bits per message Overhead: Error detec=on: Need ~1 check bits per message plus 1000 bit retransmission 1/10 of the =me Overhead: CSE 461 University of Washington 13

Detec=on vs. Correc=on (3) 2. Assume errors come in bursts of 100 Only 1 or 2 messages in 1000 have errors Error correc=on: Need >>100 check bits per message Overhead: Error detec=on: Need 32? check bits per message plus 1000 bit resend 2/1000 of the =me Overhead: CSE 461 University of Washington 14

Detec=on vs. Correc=on (4) Error correc=on: Needed when errors are expected Or when no =me for retransmission Error detec=on: More efficient when errors are not expected And when errors are large when they do occur CSE 461 University of Washington 15

Error Correc=on in Prac=ce Heavily used in physical layer LDPC is the future, used for demanding links like 802.11, DVB, WiMAX, LTE, power-line, Convolu=onal codes widely used in prac=ce Error detec=on (w/ retransmission) is used in the link layer and above for residual errors Correc=on also used in the applica=on layer Called Forward Error Correc=on (FEC) Normally with an erasure error model E.g., Reed-Solomon (CDs, DVDs, etc.) CSE 461 University of Washington 16

Topic Mul=plexing is the network word for the sharing of a resource Classic scenario is sharing a link among different users Time Division Mul=plexing (TDM)» Frequency Division Mul=plexing (FDM)» CSE 461 University of Washington 17

Time Division Mul=plexing (TDM) Users take turns on a fixed schedule 2 2 2 2 CSE 461 University of Washington 18

Frequency Division Mul=plexing (FDM) Put different users on different frequency bands Overall FDM channel CSE 461 University of Washington 19

TDM versus FDM In TDM a user sends at a high rate a frac=on of the =me; in FDM, a user sends at a low rate all the =me Rate TDM FDM Time CSE 461 University of Washington 20

TDM versus FDM (2) In TDM a user sends at a high rate a frac=on of the =me; in FDM, a user sends at a low rate all the =me Rate TDM FDM Time CSE 461 University of Washington 21

TDM/FDM Usage Sta=cally divide a resource Suited for con=nuous traffic, fixed number of users Widely used in telecommunica=ons TV and radio sta=ons (FDM) GSM (2G cellular) allocates calls using TDM within FDM CSE 461 University of Washington 22

Mul=plexing Network Traffic Network traffic is bursty ON/OFF sources Load varies greatly over =me Rate Rate Time Time CSE 461 University of Washington 23

Mul=plexing Network Traffic (2) Network traffic is bursty Inefficient to always allocate user their ON needs with TDM/FDM Rate Rate R Time R Time CSE 461 University of Washington 24

Mul=plexing Network Traffic (3) Mul=ple access schemes mul=plex users according to their demands for gains of sta=s=cal mul=plexing Two users, each need R Rate Rate R Time R Time Together they need R < 2R Rate R <2R Time CSE 461 University of Washington 25

Mul=ple Access We will look at two kinds of mul=ple access protocols 1. Randomized. Nodes randomize their resource access afempts Good for low load situa=ons 2. Conten=on-free. Nodes order their resource access afempts Good for high load or guaranteed quality of service situa=ons CSE 461 University of Washington 26

Topic How do nodes share a single link? Who sends when, e.g., in WiFI? Explore with a simple model Assume no-one is in charge; this is a distributed system CSE 461 University of Washington 27

Topic (2) We will explore random mul=ple access control (MAC) protocols This is the basis for classic Ethernet Remember: data traffic is bursty Busy! Zzzz.. Ho hum CSE 461 University of Washington 28

ALOHA Network Seminal computer network connec=ng the Hawaiian islands in the late 1960s When should nodes send? A new protocol was devised by Norm Abramson Hawaii CSE 461 University of Washington 29

ALOHA Protocol Simple idea: Node just sends when it has traffic. If there was a collision (no ACK received) then wait a random =me and resend That s it! CSE 461 University of Washington 30

Some frames will be lost, but many may get through ALOHA Protocol (2) Good idea? CSE 461 University of Washington 31

ALOHA Protocol (3) Simple, decentralized protocol that works well under low load! Not efficient under high load Analysis shows at most 18% efficiency Improvement: divide =me into slots and efficiency goes up to 36% We ll look at other improvements CSE 461 University of Washington 32

Classic Ethernet ALOHA inspired Bob Metcalfe to invent Ethernet for LANs in 1973 Nodes share 10 Mbps coaxial cable Hugely popular in 1980s, 1990s : 2009 IEEE CSE 461 University of Washington 33

CSMA (Carrier Sense Mul=ple Access) Improve ALOHA by listening for ac=vity before we send (Doh!) Can do easily with wires, not wireless So does this eliminate collisions? Why or why not? CSE 461 University of Washington 34

CSMA (2) S=ll possible to listen and hear nothing when another node is sending because of delay CSE 461 University of Washington 35

CSMA (3) CSMA is a good defense against collisions only when BD is small X CSE 461 University of Washington 36

CSMA/CD (with Collision Detec=on) Can reduce the cost of collisions by detec=ng them and abor=ng (Jam) the rest of the frame =me Again, we can do this with wires Jam! X X X X X X X X Jam! CSE 461 University of Washington 37

CSMA/CD Complica=ons Want everyone who collides to know that it happened Time window in which a node may hear of a collision is 2D seconds X CSE 461 University of Washington 38

CSMA/CD Complica=ons (2) Impose a minimum frame size that lasts for 2D seconds So node can t finish before collision Ethernet minimum frame is 64 bytes X CSE 461 University of Washington 39

CSMA Persistence What should a node do if another node is sending? What now? Idea: Wait un=l it is done, and send CSE 461 University of Washington 40

CSMA Persistence (2) Problem is that mul=ple wai=ng nodes will queue up then collide More load, more of a problem Now! Uh oh Now! CSE 461 University of Washington 41

CSMA Persistence (3) Intui=on for a befer solu=on If there are N queued senders, we want each to send next with probability 1/N Send p=½ Whew Send p=½ CSE 461 University of Washington 42

Binary Exponen=al Backoff (BEB) Cleverly es=mates the probability 1st collision, wait 0 or 1 frame =mes 2nd collision, wait from 0 to 3 =mes 3rd collision, wait from 0 to 7 =mes BEB doubles interval for each successive collision Quickly gets large enough to work Very efficient in prac=ce CSE 461 University of Washington 43

Classic Ethernet, or IEEE 802.3 Most popular LAN of the 1980s, 1990s 10 Mbps over shared coaxial cable, with baseband signals Mul=ple access with 1-persistent CSMA/CD with BEB CSE 461 University of Washington 44

Ethernet Frame Format Has addresses to iden=fy the sender and receiver CRC-32 for error detec=on; no ACKs or retransmission Start of frame iden=fied with physical layer preamble Packet from Network layer (IP) CSE 461 University of Washington 45

Modern Ethernet Based on switches, not mul=ple access, but s=ll called Ethernet We ll get to it in a later segment Switch Switch ports Twisted pair CSE 461 University of Washington 46