Page 1 of 1

ubuntu10 guest OS not able to connect to wireless network

PostPosted: 23. May 2010, 23:51
by 30equals
hey all

i'm having a problem connecting to my wireless network from my guest OS which is Ubuntu 10. My host OS is Windows Vista.
I've read numerous of forum posts, etc.. but i still can't get it to work despite following the most common guidelines.


GUEST :
*i enabled two network adapters (devices > network adapters): 1 Nat, 1 Bridged attached to my wireless Broadcom 802.11g adapter
*when i ifconfig -a , i get 3 results : eth0, eth1, lo
*currently i've unchecked the 'cable connected' in my Nat settings to make sure i'm not using the Nat when trying to connect.

HOST:
*in my network connections, i have 2 networks: my wireless, and the virtualbox host only (with this one, i already right clicked and checked 'virtualbox bridged networking driver')

i even added the guest MAC address to my routers allowed devices..

as a virtualbox novice, i'm not really sure what to do next to get it to connect to my wireless through the bridged adapter, so i use the guest OS as a server, etc..

thanx in advance!

Re: ubuntu10 guest OS not able to connect to wireless network

PostPosted: 24. May 2010, 20:37
by Sasquatch
You need two things: a valid connection with your wireless router/access point with the Host system; and a valid IP address inside the Guest. If you have not configured the eth1 adapter (which should be your bridged one), then you need to do that. A simple 'sudo dhclient eth1' from a terminal should do the trick, if you don't see an IP address on the interface with 'ifconfig -a'.
Once you have a proper bridged connection with the Guest, you can set a static address on that interface so it won't change. Make sure it's outside the DHCP scope of your router, so you won't get IP conflicts.

Re: ubuntu10 guest OS not able to connect to wireless network

PostPosted: 24. May 2010, 22:40
by 30equals
Well, i'm not sure what you mean with 'a valid connection', but accessing the internet, etc.. with my wireless connection is no prob with my host OS using the broadcom adapter.
are there other router configurations i should take care of maybe ?

when i ifconfig -a i get this under eth1

Code: Select all   Expand viewCollapse view
Link encap:Ethernet  HWaddr 08:00:27:60:47:10 
          inet6 addr: fe80::a00:27ff:fe60:4710/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:517 errors:0 dropped:0 overruns:0 frame:0
          TX packets:8 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:48830 (48.8 KB)  TX bytes:888 (888.0 B)
          Interrupt:9 Base address:0xd240


so there's no ipaddress..only a mac ..?

when doing sudo dhclient eth1, i get the following results

Code: Select all   Expand viewCollapse view
Listening on LPF/eth1/08:00:27:60:47:10
Sending on   LPF/eth1/08:00:27:60:47:10
Sending on   Socket/fallback
DHCPDISCOVER on eth1 to 255.255.255.255 port 67 interval 4
DHCPDISCOVER on eth1 to 255.255.255.255 port 67 interval 5
DHCPDISCOVER on eth1 to 255.255.255.255 port 67 interval 7
DHCPDISCOVER on eth1 to 255.255.255.255 port 67 interval 7
DHCPDISCOVER on eth1 to 255.255.255.255 port 67 interval 8
DHCPDISCOVER on eth1 to 255.255.255.255 port 67 interval 12
DHCPDISCOVER on eth1 to 255.255.255.255 port 67 interval 10
DHCPDISCOVER on eth1 to 255.255.255.255 port 67 interval 8
No DHCPOFFERS received.
No working leases in persistent database - sleeping.


thanx!

Re: ubuntu10 guest OS not able to connect to wireless network

PostPosted: 24. May 2010, 23:00
by Sasquatch
Could you post your VM configuration here please? I'll see tomorrow (or someone else will before me) what is wrong here. The router shouldn't need any configuration at all, not even the VM MAC address in it's accept list.

Re: ubuntu10 guest OS not able to connect to wireless network

PostPosted: 25. May 2010, 06:55
by gbk18030
I am also experiencing the same problem.

Host OS: Windows 7 pro 64-bit
Guest OS: Ubuntu 104

Both ifconfig -a and sudo dhclient eth1 have the same results as the above post.

Re: ubuntu10 guest OS not able to connect to wireless network

PostPosted: 25. May 2010, 19:19
by Dest
You will want to check the properties of your wireless card on the host and make sure that the 'Virtualbox Bridged Network Driver" is bound.

If for some reason it isn't you are bound to have issues.

Re: ubuntu10 guest OS not able to connect to wireless network

PostPosted: 25. May 2010, 21:55
by 30equals
the 'VirtualBox Bridged Networking Driver' is checked in the list of network properties of my wireless adapter.. if that's what you mean ?

i've put a screenshot of my settings online here http://dl.dropbox.com/u/2187895/screen-virtualbox.jpg

Re: ubuntu10 guest OS not able to connect to wireless network

PostPosted: 25. May 2010, 22:32
by Sasquatch
Ok, then the Guest should be able to get a DHCP offer on eth1 from the Linux Guest, if the Host is configured with DHCP too. What happens if you set a static address on it, in the same range as the Host? For example, if the Host has 192.168.1.100, use these commands and ping the host and router from the Guest:
Code: Select all   Expand viewCollapse view
sudo ifconfig eth1 192.168.1.90 255.255.255.0
sudo route add default gw 192.168.1.1

If you want to go even further, put 'nameserver 192.168.1.1' in /etc/resolv.conf for DNS server.

This is all if the wifi connection is actually working from the Guest, but somehow the router doesn't respond to DHCP calls.

Re: ubuntu10 guest OS not able to connect to wireless network

PostPosted: 25. May 2010, 22:38
by gbk18030
wireless property1.PNG
wireless card property 1
wireless property1.PNG (50.27 KiB) Viewed 4095 times
wireless property2.PNG
wireless card property 2
wireless property2.PNG (37.86 KiB) Viewed 4089 times

Re: ubuntu10 guest OS not able to connect to wireless network

PostPosted: 26. May 2010, 00:05
by 30equals
Sasquatch wrote:Ok, then the Guest should be able to get a DHCP offer on eth1 from the Linux Guest, if the Host is configured with DHCP too. What happens if you set a static address on it, in the same range as the Host? For example, if the Host has 192.168.1.100, use these commands and ping the host and router from the Guest:
Code: Select all   Expand viewCollapse view
sudo ifconfig eth1 192.168.1.90 255.255.255.0
sudo route add default gw 192.168.1.1

If you want to go even further, put 'nameserver 192.168.1.1' in /etc/resolv.conf for DNS server.

This is all if the wifi connection is actually working from the Guest, but somehow the router doesn't respond to DHCP calls.



thanx! this worked! i'm connected to the wireless network and i can access my guest server from my host now :D

Re: ubuntu10 guest OS not able to connect to wireless network

PostPosted: 26. May 2010, 03:57
by gbk18030
Thanks. After followed all your suggestions and checked the "Cable connected" at "Adapter 2". My guess OS (Ubuntu104) can now get connected through wireless NIC.

Re: ubuntu10 guest OS not able to connect to wireless network

PostPosted: 27. May 2010, 19:57
by Sasquatch
I can assume you removed the ICS setting you posted above?

Re: ubuntu10 guest OS not able to connect to wireless network

PostPosted: 28. May 2010, 20:35
by 30equals
yes, i removed the ics settings.

strangely enough, everything worked untill today. after booting up the vm it doesn't connect anymore.
when i ifconfig -a, i notice that the ipaddress isn't set anymore. so when i set the ipaddress again and the gateway, it workst again.
do i need to repeat the previous commands everytime ? or can i prevent the machine from losing it's ipaddress.

in my router settings there's also the option to bind an ipaddress to a mac address, is this what i need to do ?

thanx once again.