OpenWrt Forum Archive

Topic: samba problems

The content of this topic has been archived on 4 May 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

i opened a thread in the user forum but no one could help me: http://forum.openwrt.org/viewtopic.php?id=2659
has someone an idea what this could cause?

many thanx in advance and sorry for crossposting (but i'm running out of ideas ...),
treb

I don't have a solid answer for you, but I can say the following for certain:

1. Routing packets between networks would never by itself cause SMB to break
2. A firewall that mangles packets can definitely cause stuff to break if it starts altering the packets on their way through.
3. Interface problems can definitely cause stuff to break.

Given that, if it works on the same LAN (via a switch) and breaks via the router, it's either something IPTables is doing to the packets, or more realistically interface duplex issues on one or both devices when traversing the router.  Duplex issues can and WILL ruin packets and corrupt them utterly, causing lots of retransmits and eventually dropped connections.  You will find that small transfers work, and other low-bandwidth stuff works.  Anything that causes link saturation will die.  Perhaps run ifconfig under Linux to check for errors/collisions/etc.

I would say it's more likely interface problems than IPTables problems.  With your routed configuration, ask yourself the following questions:

What are the computers connected to, and are those devices switches with autonegotiation or hubs?
Are you forcing full/half duplex on any of the computers?
Are you using NICs with DEC21140 chipsets (known to be awful at link negotiation)?


Kaldek

(Last edited by kaldek on 22 Sep 2005, 02:03)

kaldek wrote:

I would say it's more likely interface problems than IPTables problems.  With your routed configuration, ask yourself the following questions:

What are the computers connected to, and are those devices switches with autonegotiation or hubs?
Are you forcing full/half duplex on any of the computers?
Are you using NICs with DEC21140 chipsets (known to be awful at link negotiation)?

Hi kaldek!
many thanx for your reply!

All network components are set to autonegotiation and all switches are from netgear.
The router is a Linksys WRT54GS V1.1 and the nework cards are:
Windwos NT4: 3COM 3C905C-TX
Linux Suse: Ovis Link Realtec Card

I tried to set the 3Com card from auto mode to 10MBit half duplex but the error is still the same. The next thing i'll try (on friday or saturday) is  to replace the switch. After that i'll replace _all_ involved network cards.

On the Linksys router i found some errors:

eth0      Link encap:Ethernet  HWaddr 00:13:10:2F:AE:3F
          UP BROADCAST RUNNING PROMISC MULTICAST  MTU:1500  Metric:1
          RX packets:4648476 errors:28 dropped:0 overruns:28 frame:28
          TX packets:4532336 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:3151709827 (2.9 GiB)  TX bytes:3133880244 (2.9 GiB)
          Interrupt:5 Base address:0x2000

All the other vlan interfaces have no errors.
I'll post my results after changing the network cards and switches.

Cheers,
Treb

Hmm, I've just realised that running ifconfig under Linux won't tell you anything because all of the interfaces on the router are connected directly to its switch.  The only errors you would see would be between the Broadcom ethernet hardware and the switch hardware (which is on the same motherboard!).

It could still be interface problems though - on your servers of course, so you'd need to check for the errors on them.  I really can't remember how to do that in Windows though!

Kaldek

(Last edited by kaldek on 24 Sep 2005, 01:24)

kaldek wrote:

It could still be interface problems though - on your servers of course, so you'd need to check for the errors on them.  I really can't remember how to do that in Windows though!

hi kaldek,

if it's an interface problem it has be the routers interface.
i changed all switches involved and tried different Windows (NT4 and XP) versions and different linux computers (and i changed some network cards too). the result is allways the same.

i even turned off the iptables firewall and played around with the mtu size (i tried smaller mtu sizes) - no luck.

btw.: i was able to reproduce this error with nfs

but there is one interesting thing: i assigned 2 ports of the integrated switch to my DMZ and there are no errors when i copy files between these 2 ports.

could it be that there is a problem with tagging and untagging the packages?

cheers,
treb

trebiani wrote:

could it be that there is a problem with tagging and untagging the packages?

Hmm, it's highly unlikely.  The VLAN tagging mechanism in the switch and in Linux in general is pretty darn reliable.  I've never had problems with it, however in saying that I have also not run Samba connections across the router.

Is your router running at the standard clock speed?  It's recommended to overclock to 216mhz at the very least, as 200mhz has known stability issues when under load.  Instructions for this can be found in the wiki.

Give it a shot - it may help!

Kaldek

kaldek wrote:

I've never had problems with it, however in saying that I have also not run Samba connections across the router.

i could also reproduce the problem with nfs. after copying many files the nfsmount hung and i was unable to unmount it.


kaldek wrote:

Is your router running at the standard clock speed?  It's recommended to overclock to 216mhz at the very least, as 200mhz has known stability issues when under load.

the problem is exactly the same at both clock speeds (200 & 216).

root@firewall:~# nvram show | grep clk
size: 1761 bytes (31007 left)
clkfreq=216


which is the best hardware for openWRT? i'm thinking about to by a new router ....

I'm still baffled by this problem.  As for the best hardware, I think they're pretty much all the same.  Having said that, the Asus models have a USB port which can be used for storage (like a 200GB hard disk for example!).  It probably won't fix the network problem though.

I wish I could help you more but it's difficult to exactly comprehend where the problem lies without physically being there.

Kaldek

kaldek wrote:

It probably won't fix the network problem though.

i tried so many different computers, network cards and switches. they all work together without any problem as long the linksys router is not involved in the connection.

maybe i have misconfigured my linksys?
i installed knockd (not used), wondershaper (not started) and tcpdump.

kaldek wrote:

I wish I could help you more but it's difficult to exactly comprehend where the problem lies without physically being there.

what would you try?
would it be enough to give you access via ssh to the router?

(Last edited by trebiani on 27 Sep 2005, 06:58)

trebiani wrote:

what would you try?

I would basically try to run tcpdump and other packet capture tools on all the hosts involved (client, router - both interfaces, and the server) when the problem occurred.  I would then compare the results of every packet capture.  Somewhere in there you would see a device either dropping packets or corrupting them.

For example, if the router is breaking the connection, I would expect to see something like packets arrive on vlan1 and not leave interface br0 (or vice versa).  At some point after that you should see the TCP retransmit messages, which you can then also monitor to ensure they are allowed through the firewall.

After this, I would methodically go through everything in the network, starting from Layer 2 right through to Layer 7, such as:

- Have I got bad network cables?
- Is ARP stuffed?  Am I using static ARP addresses?  Is there duplicate MAC addresses on the network?
- Is routing stuffed?  Is Windows dropping the default route?  Are packets getting misrouted because I have multiple network interfaces?
- Could WINS/DNS/Hosts files be the cause of the problem?
- Does the application send some other form of connection via the router which I don't know about - and therefore might be getting firewalled?
- Is IPTables poorly configured?  Can it handle these connections?  Are there known problems with SMB and this version of IPTables?  Are my connections getting mangled due to poor coding in IPTables?  Can I log this data to capture it? Is the connection being dropped by IPTables? (Turn on logging to find out)
- Is this a known problem on *any* router (not just OpenWRT) running Linux?  Is it a Linux kernel bug?
- Is there some kind of freaky TCP setting on Windows that doesn't like traversing the router?  Could it be TCP window sizes?
- Is it some kind of known wierd bug in Windows/Linux when sending large files via routers?

After this I would try the same tests from Windows to Windows, or Linux to Linux.  Perhaps forcing all servers to 10mb/s.  There are so many things that can be tried.

trebiani wrote:

would it be enough to give you access via ssh to the router?

Probably not.  You really need to be on-site and able to commit some serious time to the problem.  Something I can't really spare!

Kaldek

thank you very, very much for your help.

i'll buy a new router and exchange the existing one. if the problem is still there i can use the spare router to reproduce the problem in a test-setup where i can try all the hints you gave me in your last posting.
the result will be posted in this thread.

cheers,
treb

trebiani wrote:

i'll buy a new router and exchange the existing one.

i bought a asus 500g deluxe and instlled WhiteRushian RC3.
after using my install script (which sets all my nvram variabls and writes all config files) i had exactly the same config as the old one(WRG54GS V1.1).

it's working now!!!

thanx for all your help!
treb

p.s.: i'll upgrade the linksys to rc3 and try to reproduce the problem.

Interesting, very interesting.

I wonder if it turns out to be some form of limitation of the Linksys hardware.  Did you say it was a WRT54G or a GS, and what revision hardware?

Kaldek

kaldek wrote:

Did you say it was a WRT54G or a GS, and what revision hardware?

it's a Linksys WRT54GS Version 1.1
i hope i have time next week to install RC3 and check if the problem still exists.

trebiani wrote:
kaldek wrote:

Did you say it was a WRT54G or a GS, and what revision hardware?

it's a Linksys WRT54GS Version 1.1
i hope i have time next week to install RC3 and check if the problem still exists.

well, after installing the latest whiterushian from http://downloads.openwrt.org/people/nbd/whiterussian/ and using this bug-fix-script http://forum.openwrt.org/viewtopic.php?id=2874 everything is working as it should. all my smb problems are gone (as well as some other connection hanging problems).

thnanx a lot for your help. openWRT is a great piece of software!

The discussion might have continued from here.