Checksum Errors - The Technology Firm

standguideNetworking and Communications

Oct 26, 2013 (3 years and 7 months ago)

67 views

© 2003, The Technology Firm

WWW.THETECHFIRM.COM


info@thetechfirm.com

TCP Checksum Errors

© 2003, The Technology Firm

WWW.THETECHFIRM.COM

What’s the Problem


As

I

was

using

my

Protocol

Analyzer,

I

noticed

a

bunch

of

packets

that

had

TCP

CRC

errors
.


The

packets

were

all

from

my

PC,

but

everything

was

working

fine
.


I

noticed

that

there

weren’t

any

IP

checksum

errors,

UDP

Errors

or

ICMP

checksum

errors
.


I

also

noted

that

SYN,

FIN

TCP

packets

were

fine

as

well
.


Thanks goes to my friends at Wildpackets for informing me as to what was happening.



I

just

thought

I

would

put

some

more

info

together

for

myself

and

for

all

my

faithful

readers
.




Enjoy



© 2003, The Technology Firm

WWW.THETECHFIRM.COM

TCP/IP Task Offload in NDIS 5


From
:

http
:
//www
.
microsoft
.
com/hwdev/tech/network/taskoffload
.
asp



Network

adapters

with

appropriate

NDIS

5

(and

later)

mi niport

drivers

can

increase

the

system

performance

by

supporting

hardware

offload

of

Transmission

Control

Protocol/Internet

Protocol

(TCP/IP)

CPU
-
intensi ve

tasks
.

For

example,

with

TCP/IP

checksum

offload

alone,

up

to

30

percent

performance

gain

in

CPU

utilization

has

been

seen

in

testi ng

at

Microsoft
.

The

NDIS

interface

and

the

TCP/IP

transport

have

been

enhanced

to

allow

miniport

drivers

to

indicate

hardware

support

for

performing
:



TCP/IP

checksum

calculation
.



TCP/IP

segmentation
.



Internet

Protocol

Security

(IPSec)

Encryption

Ciphers

and

Message

Digests
.


During

initiali zation

or

when

an

interface

appears

as

a

Plug

and

Play

event,

the

TCP/IP

dri ver

will

query

the

miniport

through

the

NdisRequest()

mechanism

with

an

object

ID

(OID)

of

OID_TCP_TASK_OFFLOAD

in

order

to

find

out

which

offload

capabilities

the

network

adapter

supports
.


For

each

task

the

network

adapter

can

offload,

it

will

return

an

NDIS_TASK_OFFLOAD

structure

that

contains

an

indication

of

the

task

supported

and

parameters

specific

to

that

task
.

The

protocol

then

enables

the

appropriate

tasks

by

submitting

a

set

request

containing

the

NDIS_TASK_OFFLOAD

structures

for

those

tasks
.

At

this

point,

these

tasks

are

enabled

for

offload
.

The

network

adapter

will

receive

i nformation

specific

to

the

task

on

a

per
-
packet

basis,

along

with

each

packet
.


Checksum

Offload




On

the

send

side,

the

network

adapter

that

supports

this

offload

will

calculate

checksums

that

are

needed

and

for

which

it

has

indicated

the

capability

of

performing
.

For

the

TCP

checksum,

the

Microsoft

transport

will

calculate

the

TCP

pseudo

header

checksum

and

place

this

value

in

the

checksum

field,

so

that

the

network

adapter

can

calculate

the

correct

TCP

checksum

without

touching

the

IP

header
.


On

the

receive

side,

the

network

adapter

will

fill

in

a

NDIS_TCP_IP_CHECKSUM_PACKET_INFO

structure

and

set

the

appropriate

bits
.

If

for

any

reason

the

network

adapter

cannot

perform

the

checksum,

it

will

not

set

any

bits

and

indicate

the

packet
.

TCP/IP

will

then

look

at

this

and

calculate

the

appropriate

checksum

itself
.


© 2003, The Technology Firm

WWW.THETECHFIRM.COM

What Does It Look Like With Wildpackets

© 2003, The Technology Firm

WWW.THETECHFIRM.COM

What Does It Look Like With NAI

© 2003, The Technology Firm

WWW.THETECHFIRM.COM

What Does It Look Like With Fluke

© 2003, The Technology Firm

WWW.THETECHFIRM.COM

What Does It Look Like With Ethereal

© 2003, The Technology Firm

WWW.THETECHFIRM.COM

Card Configuration Details


In

my

case

I

had

a

3
COM

3
C
920

and

I

simply

disabled

the

Tx

Checksum

Offload

and

everything

is

back

to

normal
.