Page 1 of 2 12 LastLast
Results 1 to 10 of 19

Thread: Why am I getting "Network is unreachable"?

  1. #1
    Join Date
    Feb 2013
    Beans
    19

    Why am I getting "Network is unreachable"?

    Hi Forum,
    I installed Ubuntu 12.04 LTS alongside WinXP for a dual boot system on a PC yesterday.
    Ubuntu failed to connect to the network, but WinXP had no trouble at all.
    I tried editing the wired connection information, using the manual option to input the relevant numbers for IP addr., Netmask, Gateway and DNS server.
    Still no joy.
    The network card is being recognised because the MAC addr. is displayed.
    Attempting to ping the gateway gives "connect: Network is unreachable".
    The routing table remains empty.
    How best to proceed with getting Ubuntu talking to the network?

    (P.S. I have successfully achieved the same dual boot system on my laptop and that works without a hitch.)

  2. #2
    Join Date
    Feb 2014
    Beans
    93

    Re: Why am I getting "Network is unreachable"?

    There isn't enough information to answer your question. Could you post the output of ifconfig -a?

  3. #3
    Join Date
    Mar 2010
    Location
    India
    Beans
    8,175
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: Why am I getting "Network is unreachable"?

    Plus the output of -
    Code:
    sudo lshw -numeric -C network
    While posting the outputs, please use 'Code' tags. It preserves the output's formatting and makes the post cleaner, compact and more readable. To see a quick 'HowTo' with screenshots, please follow the "Using Code Tags" link in my signature.
    Varun
    Help others by marking threads as [SOLVED], if they are. (See how)
    Wireless Script | Use Code Tags
    Am I not replying your post? This is why.

  4. #4
    Join Date
    Feb 2013
    Beans
    19

    Re: Why am I getting "Network is unreachable"?

    Thanks for your reply m-dw. At the moment I can't supply the output verbatim but by comparison with the laptop the obvious missing line is the one beginning "inet" for eth0.
    So there are only 7 lines on the PC for this device instead of 8. The loopback settings (8 lines) are present and correct.

    When the wired connection method "Automatic (DHCP)" failed, I decided to try "Manual". However, I left "Search domains" blank and didn't add anything under the "Routes" button. Could this be a possible reason for the current connection failure?
    Ubuntu didn't complain so it would appear that those fields were not mandatory.
    If possible I would prefer to use automatic, but any troubleshooting that gets the PC connected would be good.
    (Btw, it's not my machine, it belongs to a friend.)

    Varunendra, I don't have access to the problem PC at the moment, but hope to run the lshw command tomorrow.

    From memory, the NIC is probably the TP-Link TF-3200 and from initial investigations before my post I believe the Sundance driver is installed.
    I'll get back with more as soon as I can. Thanks for your patience.

  5. #5
    Join Date
    Nov 2008
    Location
    Metro Boston
    Beans
    11,404
    Distro
    Kubuntu 14.04 Trusty Tahr

    Re: Why am I getting "Network is unreachable"?

    Pick an LAN address in the subnet your router supports that is not in use. Let's say you choose 192.168.1.97. Now open a terminal and enter:
    Code:
    sudo /sbin/ifconfig eth0 192.168.1.97 netmask 255.255.255.0 broadcast 192.168.1.255
    Now try to ping the router; let's say its address is 192.168.1.1. Does that work? If so, try this:
    Code:
    sudo ip route add default via 192.168.1.1
    Now try to ping Google's DNS server at 8.8.8.8. How about that?

    If all this works correctly, then we just have to diagnose why your machine doesn't get an address at boot.
    If you ask for help, please have the courtesy to check for responses and thank the people who helped you.

    Blog · Linode System Administration Guides · Android Apps for Ubuntu Users

  6. #6
    Join Date
    Feb 2013
    Beans
    19

    Re: Why am I getting "Network is unreachable"?

    Okay, here's the gen:
    Output of "ifconfig -a"
    Code:
    eth0   Link encap:Ethernet  HWaddr 00:23:cd:00:19:83  
              inet6 addr: fe80::223:cdff:fe00:1983/64 Scope:Link
              UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
              RX packets:14 errors:0 dropped:0 overruns:0 frame:0
              TX packets:21 errors:0 dropped:0 overruns:0 carrier:0
              collisions:0 txqueuelen:1000 
              RX bytes:1225 (1.2 KB)  TX bytes:4156 (4.1 KB)
    
    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:28 errors:0 dropped:0 overruns:0 frame:0
              TX packets:28 errors:0 dropped:0 overruns:0 carrier:0
              collisions:0 txqueuelen:0 
              RX bytes:2032 (2.0 KB)  TX bytes:2032 (2.0 KB)
    Output of "sudo lshw -numeric -C network"
    Code:
      *-network
           description: Ethernet interface
           product: IC Plus IP100A Integrated 10/100 Ethernet MAC + PHY [13F0:200]
           vendor: Sundance Technology Inc / IC Plus Corp [13F0]
           physical id: c
           bus info: pci@0000:02:0c.0
           logical name: eth0
           version: 31
           serial: 00:23:cd:00:19:83
           size: 100Mbit/s
           capacity: 100Mbit/s
           width: 32 bits
           clock: 33MHz
           capabilities: pm bus_master cap_list rom ethernet physical tp mii 10bt 10bt-fd 100bt 100bt-fd autonegotiation
           configuration: autonegotiation=on broadcast=yes driver=sundance driverversion=1.2 duplex=full latency=32 link=yes maxlatency=10 mingnt=10 multicast=yes port=MII speed=100Mbit/s
           resources: irq:9 ioport:b400(size=128) memory:de000000-de0001ff memory:dff00000-dff0ffff
    Thank you SeijiSensei, that was a real guru reply. Yes, the first command allowed me to ping the router! The second command allowed me to ping the Google DNS server!
    So far, so good. As you say, it's now a case of determining why the TCP/IP configuration is not being set at boot time. Looking forward to your next diagnostic suggestion.

  7. #7
    Join Date
    Mar 2010
    Location
    India
    Beans
    8,175
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: Why am I getting "Network is unreachable"?

    I would be curious to see what SeijiSensei thinks, everything on the driver and connectivity part looks solid to me.

    My suggestion would be to try resetting the /etc/network/interfaces file (or wherever you tried manual configuration mentioned in your first post) to default and check router settings to make sure it is able to deliver a DHCP offer and the Ubuntu machine is able to request and accept it.

    But I would wait for SeijiSensei's post which may offer more precise instructions on what to check/try.
    Varun
    Help others by marking threads as [SOLVED], if they are. (See how)
    Wireless Script | Use Code Tags
    Am I not replying your post? This is why.

  8. #8
    Join Date
    Mar 2014
    Beans
    31

    Re: Why am I getting "Network is unreachable"?

    Just a quick look shows that there is no IP address assigned to eth0 for ipv4.

    You might want to do a "netstat -nr" to see where the default route points. It should show the IP address of your router going out to the Internet.

    If you are using DHCP addressing from your router, it might not be working properly.

  9. #9
    Join Date
    Nov 2008
    Location
    Metro Boston
    Beans
    11,404
    Distro
    Kubuntu 14.04 Trusty Tahr

    Re: Why am I getting "Network is unreachable"?

    Those of us who learned Unix the hard way some decades ago were forced to rely on ifconfig and route!

    As John observes, there is no address assigned to eth0 in the ifconfig results you posted. So let's start by seeing if you can get an address with DHCP. I assume you didn't need to set up static addressing for XP, so you shouldn't need it for Ubuntu either.

    In /etc/network/interfaces, you should have only this entry for the Ethernet connection:
    Code:
    auto eth0
    iface eth0 inet dhcp
    If you do need to use static addressing, follow the steps described here: https://help.ubuntu.com/12.04/server...#ip-addressing.
    If you ask for help, please have the courtesy to check for responses and thank the people who helped you.

    Blog · Linode System Administration Guides · Android Apps for Ubuntu Users

  10. #10
    Join Date
    Jan 2006
    Location
    Not heaven... Iowa
    Beans
    Hidden!
    Distro
    Ubuntu

    Re: Why am I getting "Network is unreachable"?

    Quote Originally Posted by SeijiSensei View Post
    In /etc/network/interfaces, you should have only this entry for the Ethernet connection:
    Might not be that much if NM is running the show.
    (or did I miss the manual configuration?)

    Never mind... I'm curious if the Manual configuration method (in NM) might be part of the problem.
    Last edited by Iowan; April 14th, 2014 at 10:19 PM.
    Linux User #415691 Ubuntu User #8629
    Iowa Team (LoCo): [Wiki] [Launchpad]
    IRC channel: #ubuntu-us-ia on irc.freenode.net

Page 1 of 2 12 LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •