Solved

Adding checksum on packets

Posted on 2008-10-10
3
613 Views
Last Modified: 2013-11-09
When a packet is sent to IP  from TCP and gets handed over to the NIC, checksum is added for delivery confirmation. I am very familiar with checksums as a means of transmission control.
 
It sounds like it is NOT IP which adds the checksum, but firmware on the NIC card. But it wasn't absolutley clear to me that it was the case.
 
Is it IP that adds the checksum or the NIC card?
0
Comment
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 8

Expert Comment

by:Thejaka
ID: 22692770
Different checksums may be used on different structures (i.e. packet formats) at different layers/protocols.

The IP (IPv4) header checksum protects only the IPv4 header, while the TCP, ICMP, and UDP checksums provide end-to-end error detection for both the transport header (including network and transport layer information) and the transport payload data.
http://www.erg.abdn.ac.uk/users/gorry/course/inet-pages/ip-cksum.html

Even for TCP, the IPv4 pseudo header checksum is different from IPv6 checksum:
http://en.wikipedia.org/wiki/Transmission_Control_Protocol#Fields_used_to_compute_the_checksum

Additional info:
http://www.vijaymukhi.com/vmis/ip.htm
http://www.vijaymukhi.com/vmis/tcp.htm
0
 
LVL 13

Expert Comment

by:Xyptilon2
ID: 22693689
The checksum is added in layer 4 of the OSI model, the transport layer when talking about the TCP protocol. (not all transport protocols support reliable transmissions with checksums), the checksum is added on layer 4. However, depending on the NIC card it can be added by both the hardware of the software. I believe it is called checksum offloading.

{quote}
Check the value of `flags' in the output of `ifconfig' on the interface you're interested in. If you see `CKO', the hardware is doing TCP/IP checksum calculation; if not, the software stack is.


0
 
LVL 50

Accepted Solution

by:
Don Johnston earned 500 total points
ID: 22693747
There are checksums (or error detection values) added to the traffic at various points while the data is moving down the OSI model.

One of the first places could be the application.

After that layer 4 (tcp or udp) adds a checksum.

http://www.fatpipe.org/~mjb/Drawings/TCP-Header.pdf
http://www.fatpipe.org/~mjb/Drawings/UDP-Header.pdf

With TCP, if the segment is determined to be bad, this can cause a retransmit. But with UDP, the receiving device simply discards the bad segment.

At layer 3, the only part that gets a checksum is the header. Bad data can't be detected.

http://www.fatpipe.org/~mjb/Drawings/IP-Header.pdf

At layer 2, the checksum (cyclic redundancy check) is for the entire frame, just like TCP and UDP. This checksum is created at the NIC.

Unless you're using 802.3 or 802.3 SNAP frames (with LLC type2), no retransmit will ocurr if a bad frame is received. The bad frame is discarded.

http://folk.uio.no/od/tcp-ip-intro/subsection3_2_3.html

0

Featured Post

SharePoint Admin?

Enable Your Employees To Focus On The Core With Intuitive Onscreen Guidance That is With You At The Moment of Need.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Every server (virtual or physical) needs a console: and the console can be provided through hardware directly connected, software for remote connections, local connections, through a KVM, etc. This document explains the different types of consol…
This article discusses four methods for overlaying images in a container on a web page
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

726 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question