WiFi network doesn't work

Hi
I'm new on FreeBSD, and I run it on a Virtual Machine.
The problem is that, after the installation, my network doesn't work.
The network adapter of the VM is set to NAT (I think this is the right choice)....obviusly the network on the host is working.

This is the output of the ifconfig command:
Schermata_del_2016_03_06_19_53_55.png


These are etc/hosts, /etc/rc.conf files
Schermata_del_2016_03_06_19_56_27.png

Schermata_del_2016_03_06_19_56_51.png


The output of ping www.google.com is:
Code:
ping: cannot resolve www.google.com: Host name lookup failure

The output of ifconfig em0 up scan is:
Code:
ifconfig: unable to get scan results

Someone could be help me?
Thanks
 
Why do you think that your virtual machine have a WiFi network card?
Your output shows that it has an em(4) network adapter. It also shows that your network adapter got an ip address, which is good.
Can you ping the ip address of any other machine? Or Google DNS servers? (8.8.8.8 or 8.8.4.4)
If so, the problem you have is with (domain) name resolution.
Does /etc/resolv.conf have any nameservers in it?
 
Hi, you are right, obviusly VM has a network adapter.
So, file /etc/resolv.conf is:

Schermata_del_2016_03_06_20_21_55.png


I ping 192.168.66.2, and it pings it.
I also ping 8.8.8.8, and it pings it.

So what is the problem?
 
192.168.66.2 is not really a DNS server, then.
Step A: edit /etc/resolv.conf, entering the IP address of a real DNS server. 8.8.8.8 will work, but it is Google, and it must be assumed that they monitor and track every query. This file will be overwritten by dhclient(8) each time the system boots.

Step B: figure out why 192.168.66.2 is being advertised by DHCP as a DNS server.
 
I'm not sure to understood...
Step A: I should add a new line to /etc/resolv.conf entering
Code:
nameserver 8.8.8.8
?
Step B: didn't understand
 
I'm not sure to understood...
Step A: I should add a new line to /etc/resolv.conf entering
Code:
nameserver 8.8.8.8
?
Yes. But it will be overwritten the next time the system is restarted. And Google will keep track of all of the sites you visit.
Step B: didn't understand
A DHCP server is saying that 192.168.66.2 is a DNS server, but it is not. It might be your VM software that is saying this, but it is obviously wrong because DNS does not work.

One way around this is to run the VM interface in bridged mode instead of NAT. The VM will appear on the local network as if it were another machine plugged in next to the VM host, and talk to the real DHCP server, which is going to provide the address of a real, working DNS server.
 
That 192.168.66.* address space smells like VirtualBox's host only network. Is this on VirtualBox? If it is make sure you don't have any host only networks configured and the VM is not attached to one.
 
Using the first solution it works, thanks. But it is a temporarly solution.

If I set the VM interface in bridged mode, instead, it doesn't work. I try also to ping 8.8.8.8 but it doesn't work.
 
Let's start with the basics. Which VM software is being used? What nameservers are being used by the host?
 
Let's start with the basics. Which VM software is being used? What nameservers are being used by the host?
I use VMWare as Virtual Machine.
The content of the /etc/resolv.conf file of the host is:
Code:
# Generated by resolvconf
domain m.unipi.it
nameserver 131.114.33.20
nameserver 131.114.33.21
 
All right, those should also work with the VM network in bridged mode. I don't know what settings are required in VMware, though.

Still, the host is getting those from DHCP. Why doesn't the VM?
 
All right, those should also work with the VM network in bridged mode. I don't know what settings are required in VMware, though.

Still, the host is getting those from DHCP. Why doesn't the VM?

Sorry, but I didn't understand. VM isn't set with DHCP?
 
Yes, but there's a DHCP server running on the VMWare side and it's this DHCP server that's supplying the wrong information.
 
So, should I "turn off" the DHCP server running on the VMWare side? I'm a little bit confused...with the VM network in bridged mode I use the DHCP of the host?
 
No, sorry. Just to be clear. With bridged networking your VM will be connected directly to your LAN. DHCP would then be served by a server (your router?) on your LAN. If you use Host-only or NAT network it will be the VMWare server that provides DHCP.
 
Back
Top