Page 2 of 2 FirstFirst 12
Results 11 to 19 of 19

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

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

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

    Indeed I just looked at /etc/network/interfaces on this machine with an active Ethernet connection and a disabled wifi adapter. I created the wired connection via NetworkManager. Only the stanza for the localhost interface appears in the interfaces file. NM must manage eth0 separately.

    So perhaps you should try removing any stanza you created for eth0 from the interfaces file, then try setting up the Ethernet adapter using NetworkManager.
    Last edited by SeijiSensei; April 14th, 2014 at 10:31 PM.
    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

  2. #12
    Join Date
    Feb 2013
    Beans
    13

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

    Okay folks, please pay attention. Post #1 "The routing table remains empty." In other words
    the result of "netstat -rn" was just the column headings, no data. This has to be a big
    clue as to the source of the problem. Which script(s) is/are responsible for writing to the routing table?

    Also, in post #4 I gave a pretty clear description of what was odd about the output from "ifconfig -a", when
    the machine in question was not to hand. What software is responsible for setting up the addresses here?

    Thanks for getting back to this thread SeijiSensei, your suggestions are highly valued!
    I have to report that the interfaces file is deficient and looks like this at the moment:
    Code:
    auto eth0
    iface eth0 inet dhcp
    So, no entries for eth0, and I'm tempted to ask the question:
    What software is responsible for setting up the NIC device in interfaces?

    Btw, I confirm that the PC addressing is obtained by DHCP under WinXP.
    I would like to use the same method under Ubuntu!

    In the meantime I have been researching and trying various things.
    e.g. sudo apt-get install ethtool.
    The result was disappointing:
    "Package ethtool is not available."
    "E: Package 'ethtool' has no installation candidate."
    (Any suggestions as to how to fix this?)

    However, I had success with nm-tool. Output of "nm-tool"

    Code:
    NetworkManager Tool
    
    State: disconnected
    
    - Device: eth0 -----------------------------------------------------------------
      Type:              Wired
      Driver:            sundance
      State:             unavailable
      Default:           no
      HW Address:        00:23:CD:00:19:83
    
      Capabilities:
    
      Wired Properties
        Carrier:         off
    So, the NIC is not in a happy state under Ubuntu, yet this same card is allowing me to make this post under WinXP. I would be very grateful for any help to resolve this situation urgently or my friend might loose patience with this software. If Ubuntu can't get this machine online soon then I fear the O/S will have to be uninstalled and replaced by some expensive alternative, i.e. Win7 or Win8. Please don't let that happen!!

    What's going on here? The same installation disk was used for this PC and my laptop, yet the results are very different.
    My laptop connects to the internet in about five seconds under Ubuntu, this PC still can't connect under Ubuntu.
    Grrr.

  3. #13
    Join Date
    Nov 2008
    Location
    Metro Boston
    Beans
    9,344
    Distro
    Kubuntu 14.04 Trusty Tahr

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

    As I said above, if NetworkManager is handling the connection, you won't see a stanza for eth0 in /etc/network/interfaces.

    Did you configure your PC using the NetworkManager GUI application? That's by far the simplest method. I just did that today for a machine I moved. I clicked on the network icon in the panel and chose to create a new wired connection. I didn't have to do anything more than that. It created the connection and used DHCP to configure the adapter. I don't use stock Ubuntu with the Unity interface, but this technique works on both Kubuntu and Lubuntu. I suspect it works with regular Ubuntu as well.
    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

  4. #14
    Join Date
    Feb 2013
    Beans
    13

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

    Actually, SeijiSensei I missed your post #11 simply because it was on the next page and, being in a hurry, I overlooked it - sorry. Anyway, I have some good news. This post is being composed under Ubuntu on the PC which presented such an annoying problem! How did I do it? Well, not using the GUI, that failed even when I tried deleting the wired connection and created a new one. So, I edited interfaces to include the eth0 stanza and restarted networking...and it worked!! Easy once you know how.
    Thanks to everyone who has helped me to resolve this connection problem.
    How do I mark this thread as solved?

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

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

    Quote Originally Posted by phil215 View Post
    How do I mark this thread as solved?
    Using the "Thread Tools" link above the top post on this page. Would be more helpful for others if you could also post the current contents of your /etc/network/interfaces file.
    Varun
    Help others by marking threads as [SOLVED], if they are. (See how)
    Wireless Script | Use Code Tags
    Am I not replying you? Perhaps this is why.

  6. #16
    Join Date
    Feb 2013
    Beans
    13

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

    Thanks Varun.
    Correction:
    In post #12 the code box showing the contents of "/etc/network/interfaces" was wrong.
    It should have been:
    Code:
    auto lo
    iface lo inet loopback
    Apologies for that.

    Now the file contains these lines:
    Code:
    auto eth0
    iface eth0 inet dhcp
    
    auto lo
    iface lo inet loopback
    The command to get connected was this:
    Code:
    sudo /etc/init.d/networking restart
    To comply with your request Varun, the second line (the missing one!) in the output of "ifconfig -a" now takes the form:
    Code:
    inet addr:192.168.hhh.hhh  Bcast:192.168.hhh.255  Mask:255.255.255.0
    The hhh represents up to three digits of the host part of the IP address.
    So, for example:
    Code:
    inet addr:192.168.1.97  Bcast:192.168.1.255  Mask:255.255.255.0
    The third line is now the one beginning "inet6" as in post #6, and there are no other changes.

    There's one outstanding issue with the PC setup that I noticed after sending post #14. Although it now has internet connectivity, the desktop icon for networking is the 'arc plus radii', not the double arrow - one pointing up (upstream) and one pointing down (downstream).
    The "Connection Information" menu item is greyed-out and the GUI tells me the machine is offline. No so, I made post #14 under those conditions, so the GUI is being deceptive.
    It's not a high priority but I would like to see this corrected in the near future. If you know how to correct this please tell me!
    However, now that internet connectivity has been achieved I'm willing to consider this thread solved.

  7. #17
    Join Date
    Nov 2008
    Location
    Metro Boston
    Beans
    9,344
    Distro
    Kubuntu 14.04 Trusty Tahr

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

    I don't think the GUI network applet monitors devices started from /etc/network/interfaces. You might as well remove it from the panel to avoid confusion.
    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

  8. #18
    Join Date
    Apr 2012
    Beans
    5,824

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

    ... or you can edit /etc/NetworkManager/NetworkManager.conf and change

    Code:
    [ifupdown]
    managed=false
    Code:
    [ifupdown]
    managed=true
    to tell network-manager not to ignore interfaces defined via /etc/network/interfaces

    You should bear in mind that they are intrinsically different services though, and people HAVE had problems making them 'play nice'

  9. #19
    Join Date
    Feb 2013
    Beans
    13

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

    Thanks for your input SeijiSensei and steeldriver. As suggested, I set "managed=true" and the GUI is responding as expected. I'll watch for problems, but it would be an advantage to know if these occur in any particular area. In other words steeldriver, could you please provide a link to a thread that shows how others have had problems trying to make the different services inter-operate?

Page 2 of 2 FirstFirst 12

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
  •