Checksum Calculations

Slides:



Advertisements
Similar presentations
Transport Layer3-1 Transport Overview and UDP. Transport Layer3-2 Goals r Understand transport services m Multiplexing and Demultiplexing m Reliable data.
Advertisements

Introduction 1-1 Chapter 3 Transport Layer Intro and Multiplexing Computer Networking: A Top Down Approach 6 th edition Jim Kurose, Keith Ross Addison-Wesley.
Umut Girit  One of the core members of the Internet Protocol Suite, the set of network protocols used for the Internet. With UDP, computer.
Lecture 12 Layer 2 – Data Link Layer Protocols
CPSC 441: Checksum1 Instructor: Carey Williamson Office: ICT Class Location: MFH 164 Lectures:
CPSC 441: Intro, UDP1 Transport Layer Instructor: Carey Williamson Office: ICT Class Location:
Computer Communication Digital Communication in the Modern World Transport Layer Multiplexing, UDP
Chapter 3: Transport Layer
5: DataLink Layer5-1 Chapter 5 Link Layer and LANs Computer Networking: A Top Down Approach Featuring the Internet, 3 rd edition. Jim Kurose, Keith Ross.
Lecture 8 Chapter 3 Transport Layer
CPSC 441: FTP & SMTP1 Application Layer: FTP & Instructor: Carey Williamson Office: ICT Class.
Chapter 5 Link Layer slides are modified from J. Kurose & K. Ross CPE 400 / 600 Computer Communication Networks Lecture 20.
CPSC 441: Intro, UDP1 Instructor: Anirban Mahanti Office: ICT Class Location: ICT 121 Lectures: MWF 12:00 – 12:50 Notes.
Some slides are in courtesy of J. Kurose and K. Ross Review of Previous Lecture Electronic Mail: SMTP, POP3, IMAP DNS Socket programming with TCP.
CPSC 441: DNS1 Instructor: Anirban Mahanti Office: ICT Class Location: ICT 121 Lectures: MWF 12:00 – 12:50 Notes derived.
8-1 Transport Layer Our goals: r understand principles behind transport layer services: m multiplexing/demultipl exing m reliable data transfer m flow.
Transport Layer Transport Layer. Transport Layer 3-2 Chapter 3 Transport Layer Computer Networking: A Top Down Approach Featuring the Internet,
Introduction 1 Lecture 23 Link Layer (Error Detection/Correction) slides are modified from J. Kurose & K. Ross University of Nevada – Reno Computer Science.
5: DataLink Layer5-1 Chapter 5 Link Layer and LANs Part 1: Overview of the Data Link layer Computer Networking: A Top Down Approach 6 th edition Jim Kurose,
Review: –What is AS? –What is the routing algorithm in BGP? –How does it work? –Where is “policy” reflected in BGP (policy based routing)? –Give examples.
Data Communications and Computer Networks Chapter 3 CS 3830 Lecture 12 Omar Meqdadi Department of Computer Science and Software Engineering University.
CS 1652 The slides are adapted from the publisher’s material All material copyright J.F Kurose and K.W. Ross, All Rights Reserved Jack Lange.
Network LayerII-1 RSC Part III: Transport Layer 1. Basic Concepts Redes y Servicios de Comunicaciones Universidad Carlos III de Madrid These slides are,
Transport Layer 3-1 Chapter 3 Transport Layer Computer Networking: A Top Down Approach 6 th edition Jim Kurose, Keith Ross Addison-Wesley March 2012 All.
Transport Layer and UDP Tahir Azim Ref:
TCP/IP Transport and Application (Topic 6)
Transport Layer 3-1 Chapter 3 Transport Layer Computer Networking: A Top Down Approach 6 th edition Jim Kurose, Keith Ross Addison-Wesley March 2012 Part.
Chapter 3 Transport Layer
Transport Layer 3-1 Chapter 3 Transport Layer Computer Networking: A Top Down Approach 6 th edition Jim Kurose, Keith Ross Addison-Wesley March 2012 A.
Transport Layer3-1 Chapter 3 Transport Layer Computer Networking: A Top Down Approach Featuring the Internet, 2 nd edition. Jim Kurose, Keith Ross Addison-Wesley,
Transport Layer1 Ram Dantu (compiled from various text books)
Introduction1-1 Chapter 1 Computer Networks and the Internet Computer Networking: A Top Down Approach Featuring the Internet, 2 nd edition. Jim Kurose,
Transport Layer3-1 Chapter 3 Transport Layer Computer Networking: A Top Down Approach 4 th edition. Jim Kurose, Keith Ross Addison-Wesley, July A.
5: DataLink Layer5-1 Chapter 5 Link Layer and LANs Computer Networking: A Top Down Approach Featuring the Internet, 3 rd edition. Jim Kurose, Keith Ross.
Checksum Calculations
Chapter 5 Link Layer Computer Networking: A Top Down Approach 6 th edition Jim Kurose, Keith Ross Addison-Wesley March 2012 Link Layer introduction,
Transport Layer 3-1 Chapter 3 Outline r 3.1 Transport-layer services r 3.2 Multiplexing and demultiplexing r 3.3 Connectionless transport: UDP.
Chapter 3: Transport Layer Our goals: r understand principles behind transport layer services: m multiplexing/demultipl exing m reliable data transfer.
Transport Layer3-1 Chapter 3 Transport Layer Computer Networking: A Top Down Approach Featuring the Internet, 3 rd edition. Jim Kurose, Keith Ross Addison-Wesley,
Lecture 5 Checksum. 10.2CHECKSUM Checksum is an error-detecting technique that can be applied to a message of any length. In the Internet, the checksum.
MULTIPLEXING/DEMULTIPLEXING, CONNECTIONLESS TRANSPORT.
Chapter 4 Network Layer Computer Networking: A Top Down Approach 6 th edition Jim Kurose, Keith Ross Addison-Wesley March 2012 A note on the use of these.
1 IP Checksum Calculation At the sender r Set the value of the checksum field to 0. r Divide the header into 16-bit words m Add all segments using one’s.
2: Transport Layer 11 Transport Layer 1. 2: Transport Layer 12 Part 2: Transport Layer Chapter goals: r understand principles behind transport layer services:
@Yuan Xue A special acknowledge goes to J.F Kurose and K.W. Ross Some of the slides used in this lecture are adapted from their.
CPSC 441: Link Layer1 Link Layer Addressing Slides originally from Carey Williamson Notes derived from “ Computer Networking: A Top Down Approach”, by.
Chapter 3 Transport Layer
Chapter 3 Transport Layer
Chapter 3 Transport Layer
Simple Parity Check The simplest form of error detection is the parity check used with ASCII codes, originally on asynchronous modem links Each 7 bit ASCII.
Chapter 11 User Datagram Protocol
Transport Layer Slides are originally from instructor: Carey Williamson at University of Calgary Very minor modification are made Notes derived from “Computer.
Chapter 3 outline 3.1 Transport-layer services
Transport Protocols Relates to Lab 5. An overview of the transport protocols of the TCP/IP protocol suite. Also, a short discussion of UDP.
Wireless TCP Performance Issues
CIS 321 Data Communications & Networking
7 Network Layer Part IV Computer Networks Tutun Juhana
Chapter 7: The Infamous IP
06- Transport Layer Transport Layer.
CS 1652 Jack Lange University of Pittsburgh
Transport Layer Our goals:
September 19th, 2013 CS1652 Jack Lange University of Pittsburgh
Chapter 14 User Datagram Protocol (UDP)
Chapter 7: The Infamous IP
Chapter 3 Transport Layer
Transport Protocols Relates to Lab 5. An overview of the transport protocols of the TCP/IP protocol suite. Also, a short discussion of UDP.
Transport Layer Our goals:
Presentation transcript:

Checksum Calculations Instructor: Anirban Mahanti Office: ICT 745 Email: mahanti@cpsc.ucalgary.ca Class Location: ICT 121 Lectures: MWF 12:00 – 12:50 Notes derived from “Computer Networking: A Top Down Approach Featuring the Internet”, 2005, 3rd edition, Jim Kurose, Keith Ross, Addison-Wesley. Slides are adapted from the companion web site of the book, as modified by Anirban Mahanti (and Carey Williamson). CPSC 441: Checksum

IP Checksum Calculation At the sender Set the value of the checksum field to 0. Divide the header into 16-bit words Add all segments using one’s complement arithmetic The final result is complemented to obtain the checksum At the receiver Divide header into 16-bit words, adds them, and complement’s the results All zero’s => accept datagram, else reject CPSC 441: Checksum

Binary Checksum Example 001 0001 0000 0000 001 0000 0000 0001 0000 0000 0000 1 0000 0000 0000 01 0000 0000 0000 001 0000 1000 1000 1001 1000 0000 0001 0001 1001 1111 0001 1111 0010 0111 1011 1001 1 0010 0111 1011 1010 1101 1000 0100 0101 Carry from 16th column Carry from 13th column Carry from 12th column Carry from 5th column Carry from 4th column Carry from 3rd column Carry from 2nd column Carry from 1st column The UDP checksum technique provides weak error detection – why? As an example, suppose that one bit is flipped from a 1 to 0 in a 16-byte segment, while another bit is flipped from a 0 to 1 in the next 16-byte segment (and that these errors align). Doesn’t detect error. Why used? Easier to implement in software. Also, we hope that other stronger error correction techniques are used at lower layers. CPSC 441: Checksum

UDP Checksum The pseudo-header Add pseudo-header 32-bit source IP address 32-bit destination IP address The pseudo-header 0’s protocol length Add pseudo-header Fill checksum with 0’s Divide into 16-bit words (adding padding if required) Add words using 1’s complement arithmetic Complement the result and put in checksum field Drop pseudo-header and padding Deliver UDP segment to IP source port # dest port # length checksum data (add padding to make data a multiple of 16 bits) 32 bits CPSC 441: Checksum

Checksum calculation at Receiver Add pseudo-header to the UDP segment Add padding, if needed Divide into 16-bit words and add words using 1’s complement arithmetic Complement result If result is all 0’s Drop pseudo-header and padding (if any) Accept segment Else drop segment CPSC 441: Checksum