Skip to contentSkip to conversation

scp and sftp: large files not being transfered

DISCUSSION nikhil hegde 4 participants 4 messages Sep 22, 2004

lore
Share & tools
lore
#0 lore raw

Hi All,
I've mentioned this prblem earlier. It is about large file transfer not taking place in fedora core 2 kernel 2.6.5-1.358. When I am getting packets into userspace and doing some processing.

http://lists.netfilter.org/pipermail/netfilter/2004-September/056036.html

I was doing "ip route change 10.6/16 mtu 1000 dev wlan0"

If I lock the mtu value then it just works fine. Does it mean that this kernel is not considering my request to set the mtu to 1000?because..I read that..

"If the modifier lock is not used, the MTU may be updated by the kernel due to Path MTU Discovery. If the modifier lock is used, no path MTU discovery will be tried, all packets will be sent without the DF bit in IPv4 case or fragmented to MTU for IPv6"

If this is so what is the role of "/proc/sys/net/ipv4/ip_no_pmtu_disc " , which still shows the value 0. Also given the fact that transfer happens on 2.4.18-3 kernel with same pmtu setting.

Could anyone pleasse explain me the fundaes behind this?

thanks
Nikhil

__________________________________
Do you Yahoo!?
New and Improved Yahoo! Mail - 100MB free storage!
http://promotions.yahoo.com/new_mail

#1 lore raw
Quoted 15 lines · nikhil hegde

Hi All,
I've mentioned this prblem earlier. It is about large file transfer not taking place in fedora core 2 kernel 2.6.5-1.358. When I am getting packets into userspace and doing some processing.

http://lists.netfilter.org/pipermail/netfilter/2004-September/056036.html

I was doing "ip route change 10.6/16 mtu 1000 dev wlan0"

If I lock the mtu value then it just works fine. Does it mean that this kernel is not considering my request to set the mtu to 1000?because..I read that..

Quoted 6 lines

"If the modifier lock is not used, the MTU may be updated by the kernel due to Path MTU Discovery. If the modifier lock is used, no path MTU discovery will be tried, all packets will be sent without the DF bit in IPv4 case or fragmented to MTU for IPv6"

Path MTU discovery allows the system to set the MTU on a connection by
connection basis. Once the MTU for a connection is set, packets are sent DF. If you LOCK the MTU DF is dropped since we won't know that the MTU does NOT drop off somewhere down the line, and the kernel cannot tune the MTU on a connection by connection basis (through that route). If you set MTU on a device it is specific to that particular network link, NOT the overall pipe through which a connection must travel.

Can you see both ends of the transfer and do you have admin rights through
the network?

I've had a similar problem in the past moving files from windows boxen to a
linux environment where the link had to go through DSL - the windows box would attempt to open the MTU up at a certain point in the transfer and the rest of the file would die. Smaller files never reached the point in the handling routines where the attempt to open up the MTU was tried. Hard setting the MTU on the windows box was the quick answer, but allowing ICMP messages back to the windows box ended up being a better answer (limitied list of course) -- perhaps you are dropping ICMP messages somewhere in the pipe?

I can't recall off the top of my head *which* ICMP messages I had to let back
in ...but they fixed the issue.

Quoted 4 lines

If this is so what is the role of "/proc/sys/net/ipv4/ip_no_pmtu_disc " , which still shows the value 0. Also given the fact that transfer happens on 2.4.18-3 kernel with same pmtu setting.

This is generic -- for the system, if you lock the MTU on an ip route, it is
only connections through that route that get MTU locked. I would suggest that you *might* find differences in the ICMP message handling between the two boxes, or possibly firewalling rules are coming to play.

Quoted 1 line

Alistair Tonner

#2 lore raw
Quoted 3 lines · Alistair Tonner

I can't recall off the top of my head *which* ICMP messages I had to let back
in ...but they fixed the issue.

ICMP Type 3

technically, they *should* be ICMP Type 3 Code 4: Fragmentation Needed and Don't Fragment was Set, but i've noticed that some stacks will just send a type 3 code 0 (net unreachable) or code 1 (host unreachable).

ICMP has gotten a bad rep with firewall guys over the past few years. it is a Good Thing (tm); IMHO, to allow ICMP Types 3, 11, and 12 through your firewall to allow the stack to do it's magic ("-m state --state RELATED" will not magically catch all of these for you).

references:

        http://www.iana.org/assignments/icmp-parameters

        http://rfc.net/rfc1191.html

-j

Signature · 1 line
Jason Opperisano <[email protected]>
#3 lore raw
In reply to nikhil hegde

Saw your earlier question but didn't notice that you were on a wireless device. Don't know if it's related, but in my experience large packets + wireless = bad. I think (not to get off topic here) that this is because TCP makes assumptions about the meaning of lost packets (namely that they're CONGESTION related). I've seen radio links where TCP will back off to a complete standstill, but only in the upload direction, downloads can work at 4Mbps. What matters here is the BER, and since larger packets have more bits in them, the PER goes up for larger packets, which are the usual case in uploads, hence a larger fraction of packets is lost when uploading than when downloading, and TCP goes crazy. Can you isolate the wireless device here, and prove that it A)IS or B)IS NOT a problem involving wireless?

Are there other values of MTU that you've tried? What happens if you lock MTU at 1500, or it's close relatives, like 1450, and so on?

Quoted 48 lines · nikhil hegde

Date: Wed, 22 Sep 2004 11:04:49 -0700 (PDT)
From: nikhil hegde <[email protected]>
To: [email protected]
Subject: scp and sftp: large files not being transfered

Hi All,
I've mentioned this prblem earlier. It is about large file transfer not taking place in fedora core 2 kernel 2.6.5-1.358. When I am getting packets into userspace and doing some processing.

http://lists.netfilter.org/pipermail/netfilter/2004-September/056036.html

I was doing "ip route change 10.6/16 mtu 1000 dev wlan0"

If I lock the mtu value then it just works fine. Does it mean that this kernel is not considering my request to set the mtu to 1000?because..I read that..

"If the modifier lock is not used, the MTU may be updated by the kernel due to Path MTU Discovery. If the modifier lock is used, no path MTU discovery will be tried, all packets will be sent without the DF bit in IPv4 case or fragmented to MTU for IPv6"

If this is so what is the role of "/proc/sys/net/ipv4/ip_no_pmtu_disc " , which still shows the value 0. Also given the fact that transfer happens on 2.4.18-3 kernel with same pmtu setting.

Could anyone pleasse explain me the fundaes behind this?

thanks
Nikhil

__________________________________
Do you Yahoo!?
New and Improved Yahoo! Mail - 100MB free storage!
http://promotions.yahoo.com/new_mail