Connected to wifi, but no internet [16.04]
Just because you've joined the Wi-Fi access point doesn't mean you're really connected to the overall network. It's basically just the wireless equivalent of "plugging in."
The IP router info and DNS settings is what "connecting to the Internet" requires. And your Ubuntu 16.04 computer doesn't seem to be getting it.
127.0.1.1, for example, is a loopback to your own computer, not a real DNS server.
Normally on Wi-Fi, once you join the SSID, there is a DHCP server that is reachable on the broadcast domain. So DHCP clients will broadly ask on that local part of the network (which is all it can reach at that point, since it doesn't know how to get out), "Are you a DHCP server? Can you give me an IP?" The DHCP server replies to the query with an address that your laptop can use to join the wider IP network, and usually also provides router/gateway, DNS server IP, and sometimes more if there's DHCP options.
Since your other laptop can connect to the network, we know the DHCP server exists exists. And since your Ubuntu 16.04 laptop can use DHCP on other networks (assuming you haven't changed the interface configuration), we know your laptop's DHCP client can theoretically work. It's unlikely to be a software bug. So the question is why that specific DHCP server does not want to talk to your laptop's DHCP client, or why your DHCP client isn't talking to the network.
Could it be that you're actually using a manual IP, and it's the wrong one for this network, but your settings work on others?
Manual IP, gateway, and DNS assignment is not the answer. In fact, if you do that with an IP the network admin didn't give you, it can create an IP conflict on the network, and neither you nor the other guy will be able to connect.
Pinging the gateway won't get you name servers, either. All it does is add the gateway to the ARP cache.
Get the output to:
sudo cat /etc/network/interfaces
It's possible to accidentally combine DHCP (to retrieve the DNS/gateway settings) with manually assigned IP addresses, since it's a valid use although most people don't do it, and it can cause problems like this. Let's see if your DHCP config is truly all DHCP, and valid for this network. What I'm expecting to see for a working config is simple:
auto wlp3s0
iface wlp3s0 inet dhcp
Note: No "address 10.12.152.1", no netmask, no gateway, no "dns-search uoguelph.ca". That needs to be empty, or your computer won't grab it from the DHCP server.
- Network configuration https://help.ubuntu.com/lts/serverguide/network-configuration.html
- Automatic IP Address Assignment: How DHCP Works https://www.youtube.com/watch?v=RUZohsAxPxQ
Related videos on Youtube
Max
Updated on September 18, 2022Comments
-
Max over 1 year
Just moved into university and am able to connect to wifi, but not to the internet (using ubuntu 16.04). I get internet on other wifi connections but not this one. Here are my settings:
This wifi connection requires a username and password. For some reason it works on my other laptop which was orignally 14.04(now 16.04 but working).
max@max-X751LX:~$ ifconfig -a enp2s0f1 Link encap:Ethernet HWaddr 34:97:f6:6b:b8:d1 UP BROADCAST MULTICAST MTU:1500 Metric:1 RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:0 (0.0 B) TX bytes:0 (0.0 B) lo Link encap:Local Loopback inet addr:127.0.0.1 Mask:255.0.0.0 inet6 addr: ::1/128 Scope:Host UP LOOPBACK RUNNING MTU:65536 Metric:1 RX packets:626 errors:0 dropped:0 overruns:0 frame:0 TX packets:626 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1 RX bytes:43479 (43.4 KB) TX bytes:43479 (43.4 KB) wlp3s0 Link encap:Ethernet HWaddr b0:c0:90:93:25:49 inet addr:10.12.155.177 Bcast:10.12.159.255 Mask:255.255.248.0 inet6 addr: fe80::b2c0:90ff:fe93:2549/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:38 errors:0 dropped:0 overruns:0 frame:0 TX packets:1002 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:8275 (8.2 KB) TX bytes:103832 (103.8 KB)
Anything helps!
-
AzkerM over 7 yearscan you post the output for
cat /etc/resolv.conf
&route -n
when connected to the said network. -
Max over 7 years@AzkerM did it.
-
AzkerM over 7 yearsAre you able ping ip addresses? such like
ping 8.8.8.8
? and do you get replies? seems to be either proxy or DNS... -
Max over 7 yearsNot able to
ping 8.8.8.8
:( -
AzkerM over 7 yearscan you also do a
tracepath 8.8.8.8
-
Max over 7 years@AzkerM
tracepath 8.8.8.8
replies with1?: [LOCALHOST] pmtu 1500 1: no reply 2: no reply ...
. -
David Foerster over 7 yearsCould you please post text files and program output listings as text, not as images (see How do I save terminal output to a file?)? Thanks.
-
meccooll over 7 yearscan you ping: your current IP is from the output of
ifconfig -a wlp3s0
what about your gatewayping 10.12.152.1
-
edwinksl over 7 yearsAre you sure you don't need a CA certificate?
-
-
Max over 7 yearsAlso show how to do this. I'm not too sure...
-
Max over 7 yearsFor some reason my ipv4 settings where on manual(not sure how it switched) & the
etc/network/interfaces
file was usingauto lo
.