Page 1 of 1

Linux host network problem with Windows/samba share

Posted: 13. Sep 2008, 23:37
by tienhn
Hi All,
Hope someone may have the same problem and could point me to the right direction.
Set up: Linux Unbutu 8.0.4 32-bit running Virtualbox 2.0.2
Windows XP guess machine. With network interface using NAT.

So on my Windows guess the IP is 10.0.2.15 and my Linux Host "internal" IP is 10.0.2.2.

As output by ipconfig in Windows guess as:

Code: Select all

Ethernet adapter Local Area Connection:

        Connection-specific DNS Suffix  . : my.domain.com
        IP Address. . . . . . . . . . . . : 10.0.2.15
        Subnet Mask . . . . . . . . . . . : 255.255.255.0
        Default Gateway . . . . . . . . . : 10.0.2.2

I can browse the web from Windows guess flawlessly. Internet Download and Upload speed as fast as my Internet connection could handle.

I can reach all computer on the internal network which happen to be 10.0.1.XXX network and they all works fine.

So I have one Samba server box serving on 10.0.1.102 and we all can connect to \\10.0.1.102\share-name from any Windows computer or by smb://10.0.1.102/share-name from the Linux host.

All works great with one problem: From the windows guess IP 10.0.2.15, when I write to the Samba server IP 10.0.1.102, the speed is extremely slow and it is eventually failed.

Now I observed this problem since VirtualBox 1.6.x but now that I am on 2.0.x I notice that it is even worse. My current work around is to mount a share point on Linux host and then share that mount point. it works and it is fast but this is too crazy!

If any one can shed some light into this problem or point out to me where I did worng, I would greatly appreciate.

Cheers,
Tien,

Posted: 14. Sep 2008, 01:00
by Sasquatch
The reason it's so slow, is because of the NAT translation it needs to do. You may think that you are on the same subnet and all, but you actually aren't. NAT is translating 10.0.1.x to 10.0.2.x. If you want to have better speeds, use a Host Interface with a bridge and set it up properly. You can read the manual about it, or the VirtualBox FAQ.

Posted: 14. Sep 2008, 01:45
by TerryE
Sasquatch, I find it very surprising that the NAT translation adds anything material here, to the point of timeouts. What I can't remember is whether this version of SMB uses UDP instead of TCP. TCP is solid, UDP is a little flaky under VBox NAT. Dropping too many UDP packets might be an issue.

I just think that there is something fishy is an outbound smb is timing out.

Posted: 14. Sep 2008, 03:35
by tienhn
Sasqutch,
Thanks for the reply but I agree with TerryE that if this is the norm then there must be something wrong with the NAT implementation.
I am hoping that I did something wrong here so I can correct this.

NAT seem to be simpler to deal with rather than using Host Interface.

Cheers,

Posted: 14. Sep 2008, 14:54
by Sasquatch
I haven't really tried SMB over NAT outside of my Host. I don't know everything either. Would be boring if I did :P. Just thought that it might be a reason. I've heard others say that NAT is slow. Seems like the implementation can use a speed boost.

Posted: 14. Sep 2008, 21:00
by TerryE
I have thought of running a sniffer debug to see if I can work out what packets are flying around but I am up to my armpits in getting triple boot to work (XP native, Ubuntu Native, XP VM in Ubuntu) properly at the moment.