LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 01-09-2015, 11:31 AM   #1
blackhawk2165
LQ Newbie
 
Registered: Jan 2015
Posts: 13

Rep: Reputation: Disabled
issues with connecting to a ip address


Hello,

I have a mac mini with ubuntu server 14.04 running on it. I haven't had this problem before but now it won't let me ping any ip address. It gives me back connect: network is unreachable. I went into the interfaces file and before when it worked, I set up a static IP address and also specified the net mask, network, and gateway. I had it set to 192.168.0.44 which was working before and now is not. I changed it to 192.168.0.1 because I have a linksys router.
 
Old 01-09-2015, 01:07 PM   #2
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 16,368

Rep: Reputation: 2335Reputation: 2335Reputation: 2335Reputation: 2335Reputation: 2335Reputation: 2335Reputation: 2335Reputation: 2335Reputation: 2335Reputation: 2335Reputation: 2335
If I see that, I check the contents of /etc/resolv.conf

That should have dns servers for you to use. Now that you have changed isps, that could be an issue.
 
Old 01-09-2015, 01:22 PM   #3
blackhawk2165
LQ Newbie
 
Registered: Jan 2015
Posts: 13

Original Poster
Rep: Reputation: Disabled
All my resolv.conf file has in it is this:

# Dynamic resolv.conf(5) file for glib resolver(3) generated by resolvconf(8)
# DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN

should there be more in there?
 
Old 01-10-2015, 03:22 AM   #4
veerain
Senior Member
 
Registered: Mar 2005
Location: Earth bound to Helios
Distribution: Custom
Posts: 2,524

Rep: Reputation: 319Reputation: 319Reputation: 319Reputation: 319
Run this command:

Code:
ip a
It will list network devices along with their allocated ip address. Then ping that ip address to see ping works.


And /etc/resolv.conf is used mostly in desktop setups to provide two DNS nameservers.

Code:
nameserver 8.8.8.8
nameserver 8.8.4.4
With these if you type ping google.com it will lookup nameservers in the resolv.conf and give the ping app a ip address and with that ip address it would ping.
 
Old 01-10-2015, 10:03 AM   #5
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,684

Rep: Reputation: 7971Reputation: 7971Reputation: 7971Reputation: 7971Reputation: 7971Reputation: 7971Reputation: 7971Reputation: 7971Reputation: 7971Reputation: 7971Reputation: 7971
Quote:
Originally Posted by veerain View Post
Run this command:
Code:
ip a
It will list network devices along with their allocated ip address. Then ping that ip address to see ping works.
This won't do ANYTHING helpful at all. The ping to an address on that machine will ALWAYS work, since it's locally attached. The OP posted that they get a "network unreachable" error, which is usually indicative of a missing default route.

OP, you mention both 192.168.0.44 and 192.168.0.1. Typically, the default route will be the address of whatever router (in a SOHO environment, at least) you're attached to. With my cable connection, my default route is 192.168.0.xx, but when I had DSL with Linksys, they're typically 192.168.1.xx. Are you sure that you're using the right network?
Quote:
And /etc/resolv.conf is used mostly in desktop setups to provide two DNS nameservers.
No, it *MIGHT* provide two DNS servers...it could only have one, or up to three. Also resolv.conf is ALWAYS used on EVERY system, to identify DNS servers.
Quote:
Code:
nameserver 8.8.8.8
nameserver 8.8.4.4
With these if you type ping google.com it will lookup nameservers in the resolv.conf and give the ping app a ip address and with that ip address it would ping.
Partially correct, misleading, and (unless the OP can attach to a network other than their own), useless. The OP clearly said they can't ping ANY addresses, and that their network is 192.168.xx.xx. So, without a default route (which lets their system know how to get to other network), they will NEVER be able to see anything 8.x.x.x. Also, the OP is having problem pinging ADDRESSES...which is a different symptom than not being able to ping by NAMES.

OP, once you fix your default route, things should start working. Best advice would be to get on to the router configuration web page, and check your network information. If you confirm that it's 192.168.0.xx, your default route should be the .1 (TYPICALLY...but verify). After that, if you REALLY want to add the Google DNS servers (which is optional, since your ISP is providing DNS), add them to /etc/resolvconf/resolv.conf.d/tail (create it if not present). Then, when resolvconf runs, it SHOULD shove those two at the bottom of the /etc/resolv.conf file.
 
1 members found this post helpful.
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to Know from given IP Address to which machine we are connecting sachingoel0409 Linux - Newbie 4 09-30-2013 04:33 PM
[SOLVED] No IP address when connecting wirelessly through Xubuntu youngaa Linux - Wireless Networking 11 12-03-2009 01:26 PM
Connecting to MySQL as <IP address> instead of <machine name> narc Linux - Software 2 07-29-2008 10:04 AM
Connecting socket with non-local ip address igoshen Linux - Networking 3 04-23-2007 05:13 AM
Connecting to a VPN from a NAT, ipchain'd address chibione Linux - Networking 1 10-06-2004 05:29 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 12:17 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration