LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 11-25-2011, 07:38 AM   #1
pawan613
LQ Newbie
 
Registered: Sep 2011
Posts: 23

Rep: Reputation: Disabled
Unable to connect Windows host with guest ubuntu via network


Hello all.
I saw few posts of this type, but did find any help.
Well, I'm using Windows XP as my native OS and I have installed Ubuntu 10.10 on VirtualBox.
My windows ip is 9.xxx.xxx.xxx but my linux IP is 10.0.2.15
I'm unable to ping from either side.
I need to create samba shares in linux and access those in Windows, but network is not getting connected.
In VirtualBox my network is attached to NAT and in advanced "Intel PRO/1000 MT Desktop" is selected.
Any help someone can provide?
Thanks in advance.
 
Old 11-25-2011, 08:20 AM   #2
camorri
LQ 5k Club
 
Registered: Nov 2002
Location: Somewhere inside 9.9 million sq. km. Canada
Distribution: Slackware 15.0, current, slackware-arm-currnet
Posts: 6,215

Rep: Reputation: 849Reputation: 849Reputation: 849Reputation: 849Reputation: 849Reputation: 849Reputation: 849
You need to install Guest Additions. I run a linux host and XP guest. From the guest side, I can copy files in both directions.

I do not know how the routing between the two systems works, I can ping between the two, my host is a 192.168.x.y address, and XP ( guest is ) 10.0.2.15. The NAT setup you described is the way mine is.

Once you install Guest Additions, you should be able to set up what will be shared between guest and host. Its in the V-box config.

Samba is not so easy to set up. Have a look at the the tutorials on this board, in the Tuts-Networking section.

Last edited by camorri; 11-25-2011 at 08:24 AM. Reason: fixed spelling
 
Old 11-25-2011, 09:41 AM   #3
pawan613
LQ Newbie
 
Registered: Sep 2011
Posts: 23

Original Poster
Rep: Reputation: Disabled
Hi camorri,
I have already installed guest additions. Still it's not working for me.
Any other suggestion?
 
Old 11-25-2011, 10:02 AM   #4
camorri
LQ 5k Club
 
Registered: Nov 2002
Location: Somewhere inside 9.9 million sq. km. Canada
Distribution: Slackware 15.0, current, slackware-arm-currnet
Posts: 6,215

Rep: Reputation: 849Reputation: 849Reputation: 849Reputation: 849Reputation: 849Reputation: 849Reputation: 849
When you are testing with the ping command, are you on the host side or the guest side?

I can ping the host from the guest, but not the guest from the host. Sharing as far as I know, only works from the guest, to the host. I can read and write both directions, but only on the guest.

Since you have Linux as your guest, you will have to set up samba first.

The guest to host has to work first. If you open a command prompt in the guest, ( linux ) and run the command 'netstat -r' ( without the quotes ) do you have a default route set? On my guest I see this:

Quote:
DEFAULT GATEWAY 10.0.2.2
This may be a case in linux you have to set things up. I have never set up a linux guest, since its my main OS.

Here is the full output of netstat -r on my guest:

Quote:
===========================================================================
Interface List
0x1 ........................... MS TCP Loopback interface
0x2 ...08 00 27 15 d2 8a ...... AMD PCNET Family PCI Ethernet Adapter - Packet Scheduler Miniport
===========================================================================
===========================================================================
Active Routes:
Network Destination Netmask Gateway Interface Metric
0.0.0.0 0.0.0.0 10.0.2.2 10.0.2.15 20
10.0.2.0 255.255.255.0 10.0.2.15 10.0.2.15 20
10.0.2.15 255.255.255.255 127.0.0.1 127.0.0.1 20
10.255.255.255 255.255.255.255 10.0.2.15 10.0.2.15 20
127.0.0.0 255.0.0.0 127.0.0.1 127.0.0.1 1
224.0.0.0 240.0.0.0 10.0.2.15 10.0.2.15 20
255.255.255.255 255.255.255.255 10.0.2.15 10.0.2.15 1
Default Gateway: 10.0.2.2
===========================================================================
Persistent Routes:
None

Route Table
I bunched the fields up, I had to pipe the output to a file on the guest, and use a share to copy it to my host system, then copy and paste it here.

Last edited by camorri; 11-25-2011 at 10:06 AM.
 
Old 11-27-2011, 04:06 PM   #5
RedNeck-LQ
Member
 
Registered: Jan 2011
Posts: 83

Rep: Reputation: 11
@ pawan613

Before you start the Guest OS, on the right-hand side click on Network. in the Adapter 1 tab, change the Attached Adapter from nat attached to Bridged Adpapter from the drop down list and then hit OK. This will put your virtual guest in the same network id of your host machine 192.168.x.y

I do this with all my guests OS's and I am able to ping, ssh, samba, copy and run services with no problems. Also if you have firewall(s) make sure to open the ports for them to pass through.

Last edited by RedNeck-LQ; 11-27-2011 at 04:12 PM.
 
1 members found this post helpful.
  


Reply

Tags
ubuntu, virtualbox, windows xp



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Host OS unable to connect to Guest OS (virtual machines) in VMware vikas027 Linux - Virtualization and Cloud 18 08-16-2012 08:15 AM
Could not connect windows host to linux guest on vmware. speclinux Linux - Newbie 5 12-31-2009 04:58 AM
Sun VirtualBox: Guest is Unable to Connect to Host By Hostname Cottonwoody Linux - Virtualization and Cloud 5 11-13-2009 11:31 AM
Unable to connect Virtualbox XP Guest to MySQL on Ubuntu Host pabs111 Linux - Newbie 3 06-05-2009 02:28 PM
VMware with Vista Host - Ubuntu guest can't connect. SimbaSpirit Linux - Software 6 07-28-2008 01:01 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 08:21 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration