Connected to wifi, but no internet [16.04]

11,495

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.

Share:
11,495

Related videos on Youtube

Max
Author by

Max

Updated on September 18, 2022

Comments

  • Max
    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)
    

    enter image description here enter image description here enter image description here

    enter image description here

    Anything helps!

    • AzkerM
      AzkerM over 7 years
      can you post the output for cat /etc/resolv.conf & route -n when connected to the said network.
    • Max
      Max over 7 years
      @AzkerM did it.
    • AzkerM
      AzkerM over 7 years
      Are 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
      Max over 7 years
      Not able to ping 8.8.8.8 :(
    • AzkerM
      AzkerM over 7 years
      can you also do a tracepath 8.8.8.8
    • Max
      Max over 7 years
      @AzkerM tracepath 8.8.8.8 replies with 1?: [LOCALHOST] pmtu 1500 1: no reply 2: no reply ... .
    • David Foerster
      David Foerster over 7 years
      Could 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
      meccooll over 7 years
      can you ping: your current IP is from the output of ifconfig -a wlp3s0 what about your gateway ping 10.12.152.1
    • edwinksl
      edwinksl over 7 years
      Are you sure you don't need a CA certificate?
  • Max
    Max over 7 years
    Also show how to do this. I'm not too sure...
  • Max
    Max over 7 years
    For some reason my ipv4 settings where on manual(not sure how it switched) & the etc/network/interfaces file was using auto lo.