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.
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:
EEC-484/584 Computer Networks Lecture 15 Wenbing Zhao (Part of the slides are based on Drs. Kurose & Ross ’ s slides for their Computer.
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.
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.
EEC-484/584 Computer Networks Lecture 6 Wenbing Zhao (Part of the slides are based on Drs. Kurose & Ross ’ s slides for their Computer.
Transport Layer Transport Layer. Transport Layer 3-2 Chapter 3 Transport Layer Computer Networking: A Top Down Approach Featuring the Internet,
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.
Hyung-Min Lee©Networking Lab., 2001 Chapter 11 User Datagram Protocol (UDP)
ICE 302 T RANSPORT LAYER Md. Asif Hossain Term # 2 Lecture # 1 1 Thanks to A. B. Forouzan.
Data Communications and Computer Networks Chapter 3 CS 3830 Lecture 12 Omar Meqdadi Department of Computer Science and Software Engineering University.
TCOM 509 – Internet Protocols (TCP/IP) Lecture 04_a Transport Protocols - UDP Instructor: Dr. Li-Chuan Chen Date: 09/22/2003 Based in part upon slides.
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.
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
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.
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.
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 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.
Internet Protocol Version 4 VersionHeader Length Type of Service Total Length IdentificationFragment Offset Time to LiveProtocolHeader Checksum Source.
MULTIPLEXING/DEMULTIPLEXING, CONNECTIONLESS TRANSPORT.
1 Figure 3-5: IP Packet Total Length (16 bits) Identification (16 bits) Header Checksum (16 bits) Time to Live (8 bits) Flags Protocol (8 bits) 1=ICMP,
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.
Application Layer 2-1 Chapter 2 Application Layer Computer Networking: A Top Down Approach 6 th edition Jim Kurose, Keith Ross Application Layer – Lecture.
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.
1 Kyung Hee University Chapter 11 User Datagram Protocol.
UDP: User Datagram Protocol Chapter 12. Introduction Multiple application programs can execute simultaneously on a given computer and can send and receive.
Application Layer 2-1 Chapter 3 Transport Layer Computer Networking: A Top Down Approach 6 th edition Jim Kurose, Keith Ross Addison-Wesley March 2012.
@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 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.
7 Network Layer Part IV Computer Networks Tutun Juhana
06- Transport Layer Transport Layer.
CPSC 441: Computer Communications
CS 1652 Jack Lange University of Pittsburgh
September 19th, 2013 CS1652 Jack Lange University of Pittsburgh
Chapter 14 User Datagram Protocol (UDP)
Checksum Calculations
What does this packet do?
User Datagram Protocol (UDP)
Chapter 3 Transport Layer
Transport Layer Our goals:
Presentation transcript:

Checksum Calculations Instructor: Anirban Mahanti Office: ICT 745 Email: mahanti@cpsc.ucalgary.ca Class Location: ICT 122 Lectures: MWF 12:00 – 12:50 hours Text Book: “Computer Networking: A Top Down Approach Featuring the Internet”, 3rd edition, Jim Kurose, Keith Ross Addison-Wesley, 2005. Slides are adapted from the companion web site of the book. 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