Wired Internet doesn't work on ubuntu 12.04

18
2014-04
  • Bakai

    Wired internet works on Windows but doesn't work on Ubuntu 12.04. I set it up manually. I am sure I did everything correctly. It even says Connection established but Internet doesn't work in any program.

    I installed it on my PC. I didn't delete Windows yet.

    My settings:

    IPv4

    IP: 192.168.1.2
    Netmask: 255.255.255.0
    Gateway: 192.168.1.1
    DNS servers: 213.145.129.20,213.145.129.19

    My router: TP-Link TD-w8101g

  • Answers
  • exIT Solutions

    Open the terminal and type in the following

    ping 192.168.1.1
    

    You should get replies not host not found or request timed out. I am assuming the 192.168.1.1 is your router's IP address.

    If the above worked it means it's connected to the router. Next try ping google servers and see if you are able to

    ping www.google.com
    

    if that works you should be able to access the internet but if it doesn't there might be a problem with DNS. If so try pinging the IP address of google servers just to make sure it can be reached via IP address

    ping 8.8.8.8
    

    (this is a google DNS server IP address which doesn't change)

    If that works you have your answer... DNS issue. If it doesn't work then check the resolv configuration file to see what the default nameserver is set to and change it to your router. The resolv.conf (base) can be accessed by typing

    sudo nano /etc/resolvconf/resolv.conf.d/base
    

    and change the name-server to your router's IP address as

    nameserver 192.168.1.1

    Now restart your computer and test again.

  • user29165

    I believe that your problem is with the DNS server. Look at this post internet access problem in 12.04 for the solution to that problem.

  • sri_barence

    Your IP address information appears to be correct, but I would verify that the router's address is actually "192.168.1.1," as you have it listed (this is the Gateway address). Some routers use 192.168.2.1, or some other 192.168.x.x address. Also, if you have other machines on your network, and you have DHCP enabled on your router, you might already have another machine with the same address (192.168.1.2). This will prevent your connection from working properly.

    Unless you MUST have a static IP address, I recommend using DHCP, as this is the easiest way to set up your network properly.

  • K.K Patel

    Check your configuration on router.your router to laptop connection is perfect, but due to wrong configuration it may not able to share internet to your laptop or pc.

  • user157272

    I had this exact problem. I edited the wired connection using the default GUI. Under IPv6 Settings, I set the Method to "Ignore." This solved the problem.


  • Related Question

    LAN works but Internet gone after going to static IP
  • Paul

    I had a perfectly functioning Ubuntu 12.04 system. I saw a YouTube video from DEFCON where a guy was discussing attacking home routers. In an Internet search of home router security I found a 2011 CERT paper on strengthening SOHO routers. One tip was to reduce the number of IPs on the LAN and to use static IPs.

    I went into my 12.04 machine. I set up the static IP address, 192.168.1.7, that I had prepared at the router and lost Internet access. The LAN still works. When I boot to Windows 7, Windows 7 has Internet access. When I go back to DCHP in Ubuntu, reboot, and check I again have LAN access but no Internet access - different IP [192.168.1.11] from DHCP.

    I completely reinstalled Ubuntu from a CD - same problem.

    I did a search on askubuntu and found 2 previous posts

    Wired Internet doesn't work on ubuntu 12.04 from April 29
    internet access problem in 12.04 from April 28
    

    I tried those things and they didn't work.

    Any ideas, strategies, and tactics for troubleshooting this issue would be much appreciated.

    Here are some diagnostics which may be helpful:

    ifconfig eth0
    eth0      Link encap:Ethernet  HWaddr e0:cb:4e:b1:26:dc  
          inet addr:192.168.1.11  Bcast:192.168.1.255  Mask:255.255.255.0 
          inet6 addr: fe80::e2cb:4eff:feb1:26dc/64 Scope:Link 
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1 
          RX packets:1816 errors:0 dropped:0 overruns:0 frame:0 
          TX packets:2168 errors:0 dropped:0 overruns:0 carrier:0 
          collisions:0 txqueuelen:1000 
          RX bytes:162945 (162.9 KB)  TX bytes:162147 (162.1 KB) 
          Interrupt:49 
    
    
    route
    Kernel IP routing table 
    Destination     Gateway         Genmask         Flags Metric Ref    Use Iface 
    default         192.168.1.1     0.0.0.0         UG    0      0        0 eth0 
    link-local      *               255.255.0.0     U     1000   0        0 eth0 
    192.168.1.0     *               255.255.255.0   U     1      0        0 eth0
    
    cat /etc/resolv.conf
    # Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8) 
    #     DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN 
    nameserver 127.0.0.1 
    search charter.net 
    
    ping -c 4 8.8.8.8
    PING 8.8.8.8 (8.8.8.8) 56(84) bytes of data. 
    --- 8.8.8.8 ping statistics --- 
    4 packets transmitted, 0 received, 100% packet loss, time 3024ms 
    
    
    The output of nm-tool:
    NetworkManager Tool 
    
    State: connected (global) 
    
    - Device: eth0  [Wired connection 1] ------------------------------------------- 
      Type:              Wired 
      Driver:            jme 
      State:             connected 
      Default:           yes 
      HW Address:        E0:CB:4E:B1:26:DC 
    
      Capabilities: 
        Carrier Detect:  yes 
        Speed:           1000 Mb/s 
    
      Wired Properties 
        Carrier:         on 
    
      IPv4 Settings: 
        Address:         192.168.1.11 
        Prefix:          24 (255.255.255.0) 
        Gateway:         192.168.1.1 
    
        DNS:             208.67.222.222 
        DNS:             208.67.220.220 
        DNS:             192.168.1.1 
    

    Results of ping -c 4 192.168.1.1 PING 192.168.1.1 (192.168.1.1) 56(84) bytes of data.

    --- 192.168.1.1 ping statistics --- 4 packets transmitted, 0 received, 100% packet loss, time 3024ms

    Note: This non-response by the router may be because I have set under Security | Firewall | Attack Check | Respond to Ping on Internet Ports [unchecked]. 192.168.1.1 brings up the router login screen on the laptop running Ubuntu 12.04.

    I fixed it. Thank you for your assistance. I really appreciate your input on where to look as I tried to resolve this issue.

    I went into the UP|Down arrow Icon on the menu bar. This brings up Network Connections. Under the Wired tab I picked Wired Connection 1 and choose [Edit]. That bring up a new options list with 4 tabs. I choose the 3rd Tab [IPv4 Settings].

    Choices Method:Manual Addresses [Add] Address:192.168.1.7, Netmask:255.255.255.0 Gateway:192.168.1.1 DSN Servers: 208.67.222.222, 208.67.220.220, 192.168.1.1 Search Domains: charter.net DHCP Client ID: blank - no entry, no change Require IPv4 addressing for this connection to complete: unchecked - no entry, no change Routes - brings up a new options listing [Add] Address:192.168.1.7 Netmask:255.255.255.0 Gateway:192.168.1.1 - I left the 2 check box options blank and clicked OK. Back one screen "Available to all users" [checked] - no change, no entry Save Back one screen to Network Connections | Wired Close

    Please excuse me if this fix explanation is too long or detailed. Having searched this resource for answers to questions in the past I know I appreciated when there was more detail. I am new to this forum and don't want to raise the ire of the Sys Admins, Power Users, and the like.


  • Related Answers
  • Marty Fried

    There are two different settings you need to think about - one is for the IP address, and the other is for the DNS address. Automatic DHCP (default) will set both. Your other choices under the IPv4 Settings tab, are:

    Automatic (DHCP) addresses only, which sets the IP addresses via DHCP, but allows you to set the DNS addresses yourself, in case you want to use an alternate such as Google or EasyDNS, etc.

    Manual, means you set both the IP address and the DNS address. This may be what you selected, and so you have an IP address, but you cannot use domain names, only IP addresses, to connect out, since DNS translates the names to IP addresses.

    Under "DNS servers:" in the IPv4 Settings tab, you can enter any number of DNS addresses, separated by commas. For example, if you wanted to use Google's public DNS servers, you would enter 8.8.8.8,8.8.4.4. If you want to use the same ones as your Windows system, you can check them under Windows using "IPCONFIG", or if you have the original Default network profile (you should), you can switch to that, then enter nmcli dev list iface eth0 | grep IP4 at a commandline prompt, and get the DNS addresses (usually 2).

    Another way is to look into whether your router can assign static IP addresses. I find this to be easier to maintain.

    Also, if you're worried about router security, you can probably simply disable external access completely. Most people never use it anyway.

  • reverendj1

    You most likely have an incorrect setting, I'm guessing either your default gateway or DNS server. Please update your question with output from the following:

    ifconfig eth0
    
    route
    
    cat /etc/resolv.conf
    
    ping -c 4 8.8.8.8
    
  • lal_x

    i had the same issue with mine and finally sorted this out by uninstalling the network manager and putting in the correct dns settings (from the router) into the network configuration file and when i restarted - everything worked fine.

    you can try commenting out the settings from the network config file and letting the network manager sort this out with the static ip address and dns server - but this did not work for me.

    all the best

  • Eliah Kagan

    In Network Settings > IPv4 Settings, first set ip address manually, boot Ubuntu, then select automatic (DHCP) address only.