Linux host network problem with Windows/samba share

Discussions related to using VirtualBox on Linux hosts.
Post Reply
tienhn
Posts: 21
Joined: 7. Jan 2008, 06:03

Linux host network problem with Windows/samba share

Post 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,
Sasquatch
Volunteer
Posts: 17798
Joined: 17. Mar 2008, 13:41
Primary OS: Debian other
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Windows XP, Windows 7, Linux
Location: /dev/random

Post 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.
Read the Forum Posting Guide before opening a topic.
VirtualBox FAQ: Check this before asking questions.
Online User Manual: A must read if you want to know what we're talking about.
Howto: Install Linux Guest Additions
Howto: Use Shared Folders on Linux Guest
See the Tutorials and FAQ section at the top of the Forum for more guides.
Try searching the forums first with Google and add the site filter for this forum.
E.g. install guest additions site:forums.virtualbox.org

Retired from this Forum since OSSO introduction.
TerryE
Volunteer
Posts: 3572
Joined: 28. May 2008, 08:40
Primary OS: Ubuntu other
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Ubuntu 10.04 & 11.10, both Svr&Wstn, Debian, CentOS
Contact:

Post 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.
Read the Forum Posting Guide
Google your Q site:VirtualBox.org or search for the answer before posting.
tienhn
Posts: 21
Joined: 7. Jan 2008, 06:03

Post 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,
Sasquatch
Volunteer
Posts: 17798
Joined: 17. Mar 2008, 13:41
Primary OS: Debian other
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Windows XP, Windows 7, Linux
Location: /dev/random

Post 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.
Read the Forum Posting Guide before opening a topic.
VirtualBox FAQ: Check this before asking questions.
Online User Manual: A must read if you want to know what we're talking about.
Howto: Install Linux Guest Additions
Howto: Use Shared Folders on Linux Guest
See the Tutorials and FAQ section at the top of the Forum for more guides.
Try searching the forums first with Google and add the site filter for this forum.
E.g. install guest additions site:forums.virtualbox.org

Retired from this Forum since OSSO introduction.
TerryE
Volunteer
Posts: 3572
Joined: 28. May 2008, 08:40
Primary OS: Ubuntu other
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Ubuntu 10.04 & 11.10, both Svr&Wstn, Debian, CentOS
Contact:

Post 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.
Read the Forum Posting Guide
Google your Q site:VirtualBox.org or search for the answer before posting.
Post Reply