<< | Thread Index | >> ]    [ << | Date Index | >> ]

Subject: Solved: Deaf CIPE-Win32
From: "Ville Voipio" <ville.voipio,AT,iki,DOT,fi>
Date: Fri, 17 Nov 2000 20:55:13 +0100

> be nothing wrong. The UDP part of the packet is otherwise intact but
> something has added the checksum along the way.

Finally!

I calculated the UDP checksum by hand and ended with an entirely different
C/S. So, the UDP checksum I have in the incoming packet is WRONG! No wonder
CIPE never hears anything. I presume Windows tosses all bad UDP packets
away.

I tried a dial-up connection instead of my ADSL, and CIPE worked like
charm. So, there is absolutely nothing wrong with CIPE-Win32. However, there
is something wrong with my ISP.

---

In case anyone else encounters similar problems (I hope not!), I will
describe what goes wrong along the route, so that you can fix the problem
before running on the walls (all those shoe prints on my white walls.
*sigh*)

As I described earlier, my system is as follows:

 Linux box
 SDSL modem

 <Internet>

 ISP's address translation
 ISP's internal network
 ADSL modem
 NT machine

When the Linux box sends a UDP datagram to me, the destination address is my
NT machine's public address. ISP's address translation changes this IP
header destination address to my private (ISP internal) 10.x.x.x address.

Now, this address translation screws the UDP checksum. UDP checksum is
calculated so that both the UDP message (with its header) and a UDP
pseudo-header are summed. This UDP pseudo-header includes some IP header
fields, most notably source and destination addresses. (see e.g.
http://www.theinternetbook.net/UDP_Checksum.html).

So, if the address in the IP header is changed, also the UDP checksum has to
be adjusted. This is very easy to do, the mathematical difference between
original and new address is subtracted from the original checksum. And this
is what my ISP does when translating the address.

Unfortunately, there is one thing that has to be taken into account. If the
original checksum is zero, that means no checksum is calculated. And this
check my ISP misses completely. So, when the Linux box sends a UDP packet,
it does it without any checksums, i.e. CS=0. My miserable ISP changes this
checsum to 50a1, which is exactly the difference between my public and local
IP address.

Windows NT sends checksums, so the conversion to the opposite direction goes
without any problems. This 50a1 is subtracted from the checksum, and
everything is fine. Linux receives a decent packet with correct checksum.

---

Now, AFAIK, there are two things I can do:

1. talk with my ISP and make them fix the problem
2. make the Linux box send the real UDP checksum instead of zero

Number 1 is kind of desperate, you know. I mean, the only difference between
terrorists and my ISP is that you can always negotiate with terrorists.
Anyway, I'll try that, but it will take a lot of time.

Number 2 I'll have to look into.

---

I think that's about it. Thank you for all the suggestions and improved CIPE
versions! I think both Olaf and Damion are doing a very great job here.

And sorry for the inconvenience of all this spamming around a single problem
of a single user.

Have a nice weekend,

- Ville





<< | Thread Index | >> ]    [ << | Date Index | >> ]