[SOLVED] network is unreachable
Forums
Tutorials
Articles
Register
User Name
Remember Me?
Password
Linux – Newbie
This Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to’s this is the place!
Notices
Page 1 of 2
1
2
>
Search this Thread
12-26-2017, 02:22 PM
#1
bkelly
Member
Registered: Jan 2008
Distribution: Centos 7-4
Posts: 205
Rep:
network is unreachable
Ping returns message:
Connect: Network is unreachable
Wireshark shows that device cdev is sending messages
I edited /etc/host such that I left the first few lines unchanged as shown here
Code:
127.0.0.1 local host 127.0.1.1 esdev // I added the three lines below but not this comment 192.168.1.10 laptop 192.168.1.20 edev 192.168.1.43 cdev
The laptop really did now want me to change hosts so I copied it to another directory, saved the original, edited a copy, then copied it back to directory /etc with sudo cp command. Then I rebooted and the results are unchanged. I used the “more” command to see that /etc/hosts realy did get changed.
What do I need to do different?
Ubuntu Linux, private network with three devices: laptop, cdev, and edev. All three connected to a switch that shows all active.Ping returns message:Connect: Network is unreachableWireshark shows that device cdev is sending messagesI edited /etc/host such that I left the first few lines unchanged as shown here// and left the remainder of the file unchangedThe laptop really did now want me to change hosts so I copied it to another directory, saved the original, edited a copy, then copied it back to directory /etc with sudo cp command. Then I rebooted and the results are unchanged. I used the “more” command to see that /etc/hosts realy did get changed.What do I need to do different?
Last edited by bkelly; 12-26-2017 at
04:49 PM
.
Reason: formatting
12-26-2017, 02:38 PM
#2
AwesomeMachine
LQ Guru
Registered: Jan 2005
Location: USA and Italy
Distribution: Debian testing/sid; OpenSuSE; Fedora; Mint
Posts: 5,521
Rep:
Code:
$ ifconfig
What is the output of
12-26-2017, 03:52 PM
#3
bkelly
Member
Registered: Jan 2008
Distribution: Centos 7-4
Posts: 205
Original Poster
Rep:
Code:
enp0s25 Link encap:Ethernet HWaddr <six pair hex digits> intet 6 addr: <more address> Scope:Link UP BROADCAST RUNNING MULTICASE MTU;1500 Metric:1 RX packets:0 errors:0 dropped:0 overruns:0 frame: 0 TX packets:29 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:0 (0.0 B) TX bytes 4563 (4.5 KB) Interrupt:20 Memory: ca100000-ca120000
Do you need any of those two sets of statistics?
edit
I followed some instructions that said to right click “nm” which I take to mean “network manager” which I take to mean the little antenna looking icon in the upper right. That open a dialog with title: Editing ETH. Select the tab: IPv4 Settings.
Clicking on Add allows the editing of an IP address. Enter 192.168.1.10
Tab gets me to what looks like network mask where I recall from somewhere I should enter 255.255.255.0. Which does not entirely make sense because the last octect is the only one that changes.
There is no gateway on this network, just the three devices connected to a network switch box.
Pressing Tag again gets me back to the IP address that was just entered. Save button is not enabled.
Do not know how to get Save enabled.
ifconfig returns the below, in partThere is a second paragraph of similiar data that instead of enp0s25 it has lo, and a third with wlp61s0.Do you need any of those two sets of statistics?editI followed some instructions that said to right click “nm” which I take to mean “network manager” which I take to mean the little antenna looking icon in the upper right. That open a dialog with title: Editing ETH. Select the tab: IPv4 Settings.Clicking on Add allows the editing of an IP address. Enter 192.168.1.10Tab gets me to what looks like network mask where I recall from somewhere I should enter 255.255.255.0. Which does not entirely make sense because the last octect is the only one that changes.There is no gateway on this network, just the three devices connected to a network switch box.Pressing Tag again gets me back to the IP address that was just entered. Save button is not enabled.Do not know how to get Save enabled.
Last edited by bkelly; 12-26-2017 at
04:38 PM
.
Reason: formatting
12-26-2017, 03:59 PM
#4
jsbjsb001
Senior Member
Registered: Mar 2009
Location: Earth, unfortunately…
Distribution: Currently: OpenMandriva. Previously: openSUSE, PCLinuxOS, CentOS, among others over the years.
Posts: 3,881
Rep:
Quote:
bkelly
Originally Posted by
ifconfig returns the below, in part
enp0s25 Link encap:Ethernet HWaddr <six pair hex digits>
intet 6 addr: <more address> Scope:Link
UP BROADCAST RUNNING MULTICASE MTU;1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame: 0
TX packets:29 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes 4563 (4.5 KB)
Interrupt:20 Memory: ca100000-ca120000
There is a second paragraph of similiar data that instead of enp0s25 it has lo, and a third with wlp61s0.
Do you need any of those two sets of statistics?
Here’s my output from my machine:
Code:
wlp4s0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500 inet 192.168.43.204 netmask 255.255.255.0 broadcast 192.168.43.255 inet6 fe80::c6e9:84ff:fe2b:2797 prefixlen 64 scopeid 0x20<link> ether c4:e9:84:2b:27:97 txqueuelen 1000 (Ethernet) RX packets 12693 bytes 6374063 (6.0 MiB) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 12241 bytes 1907158 (1.8 MiB) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
inet part means inet6 part means lo part means the “local loopback” device.
So if you want to test your ethernet card, type the following into a terminal:
Code:
ping 127.0.0.1
First, please look at the first link in my signature and use CODE tags.Here’s my output from my machine:Thepart means IPv4 and thepart means IPv6 , if that’s what your referring to. Thepart means the “local loopback” device.So if you want to test your ethernet card, type the following into a terminal:That should always work, even without having the Internet connected.
Last edited by jsbjsb001; 12-26-2017 at
04:05 PM
.
Reason: more info
12-26-2017, 04:48 PM
#5
bkelly
Member
Registered: Jan 2008
Distribution: Centos 7-4
Posts: 205
Original Poster
Rep:
I edited my previous post and added the CODES
The ping to the loopback address does work. Ping to 192.168.1.10, the desired local address, returns Network unreachable.
I am unable to extract something to try different from your reply. That is probably because of not understanding something
The laptop cannot be connected to this network so I took a pic with my cell phone, emailed to my work address, and attempted to attach it here. Looking at this post does not reveal that attachment. Maybe it will be visible after Submit Reply.
Edit:
The attachment is visible. Am not able to do anything to get the Save button to be enabled.
Note that in my first post I wrote that wireshark shows that the device referred to as cdev, ip 192.168.1.43, posts messages. That indicates that the network proper is functioning, the switch is functioning, and at least one other device is functioning. It proves that the NIC on this laptop is functional.
But, something in the configuration is not right.
Attached Thumbnails
Last edited by bkelly; 12-26-2017 at
04:59 PM
.
Reason: more info
12-26-2017, 05:09 PM
#6
jsbjsb001
Senior Member
Registered: Mar 2009
Location: Earth, unfortunately…
Distribution: Currently: OpenMandriva. Previously: openSUSE, PCLinuxOS, CentOS, among others over the years.
Posts: 3,881
Rep:
Thanks for using CODE tags, it makes it a lot easier to read.
From your post #3, it looks like your ethernet is not getting an IPv4 address at boot time. You also have your connection set as “Manual” from your screenshot.
Any reason for the “Manual” connection setting?
12-26-2017, 05:23 PM
#7
bkelly
Member
Registered: Jan 2008
Distribution: Centos 7-4
Posts: 205
Original Poster
Rep:
Why “manual”? Because there are three devices on the network. Two have fixed IP addresses, 192,168.1.20 and .43. The third is the laptop that must also have a fixed address. That would be 192.168.1.10. there is no DNS server and no gateway computer.
What should be different?
12-26-2017, 05:23 PM
#8
rnturn
Senior Member
Registered: Jan 2003
Location: Illinois (SW Chicago ‘burbs)
Distribution: openSUSE, Raspbian, Slackware. Older: Coherent, MacOS, Red Hat, Big Iron IXs: AIX, Solaris, Tru64
Posts: 2,739
Rep:
Quote:
bkelly
Originally Posted by
I edited my previous post and added the CODES
The ping to the loopback address does work. Ping to 192.168.1.10, the desired local address, returns Network unreachable.
detailed info on what’s going on, but whenever I see “Network unavailable” I wonder whether a default route has been defined or whether the network has been fully configured.
What do you see when you issue:
Code:
netstat -r
Code:
ip route
Code:
$ ip route default via 192.168.13.1 dev enp3s0 192.168.13.0/24 dev enp3s0 proto kernel scope link src 192.168.13.7
What does your system return?
I’m not an Ubuntu guru so I may not be able to get youinfo on what’s going on, but whenever I see “Network unavailable” I wonder whether a default route has been defined or whether the network has been fully configured.What do you see when you issue:orWhen I issue the latter, I see:My workstation has address “192.168.13.7” and “192.168.13.1” is the (uh) “clean” interface on my firewall/router system. I’m going to go out on a limb and posit that you do not see a line like “default via … “.Whatyour system return?
12-26-2017, 05:36 PM
#9
bkelly
Member
Registered: Jan 2008
Distribution: Centos 7-4
Posts: 205
Original Poster
Rep:
Code:
Kernel IP routing table Destination Gateway Genmask Flags MSS Window irtt Iface
enter: ip route
to get,…, nothing. Well not quite, it does provide another copy of the command prompt line.
That looks like a good clue but I don’t know where to go with it.
enter netstat -r to getand nothing more. There are more spaces in the second line that looks like making it look column friendly, but no characters below that line, just the next command line prompt.enter: ip routeto get,…, nothing. Well not quite, it does provide another copy of the command prompt line.That looks like a good clue but I don’t know where to go with it.
12-26-2017, 05:51 PM
#10
jsbjsb001
Senior Member
Registered: Mar 2009
Location: Earth, unfortunately…
Distribution: Currently: OpenMandriva. Previously: openSUSE, PCLinuxOS, CentOS, among others over the years.
Posts: 3,881
Rep:
Code:
ifconfig enp0s25 192.168.1.10
Try giving it an IPv4 address and see if you still get the same error:
12-26-2017, 06:37 PM
#11
bkelly
Member
Registered: Jan 2008
Distribution: Centos 7-4
Posts: 205
Original Poster
Rep:
three groups of responses that are mostly status items. It does not describe, to the novice,
what is wrong or what might be changed.
Use this command
Code:
ifconfig enp0s25
use this command as suggested
Code:
ifconfig enp0s25 192.168.1.10
Code:
SIOCSIFADDR: Operation not permitted SIOCIFFLAGS: Operation not permitted
Code:
sudo apt install ethtool
Code:
sudo ethtool enp0s25 Settings for enp0s25: Supported port [ TP ] Supported link modes: 10baseT/Half 10baseTFull ….
Looking up the various ifconfig and ip and route commands provides a huge amount of information. However, as a novice, I am not able to determine what should be and how to change my system to match the should be condition.
Enter the command ifconfig and the returned the same as I posted earlier,three groups of responses that are mostly status items. It does not describe, to the novice,what is wrong or what might be changed.Use this commandand it gives the same response, but a single block with the lead in “enp0s25″use this command as suggestedand it responds withFound a page that said to do thisDid that then ran this command with the shown responseIt continue on to list more information such as 100 Mbit and 1000 Mbit interfaces and a list of attributes. To my ability, it is telling me that all is good and describes port enp0s25. I am unable to discover something wrong that bears changing.Looking up the various ifconfig and ip and route commands provides a huge amount of information. However, as a novice, I am not able to determine what should be and how to change my system to match the should be condition.
Last edited by bkelly; 12-26-2017 at
06:54 PM
.
Reason: more information
12-26-2017, 07:00 PM
#12
jsbjsb001
Senior Member
Registered: Mar 2009
Location: Earth, unfortunately…
Distribution: Currently: OpenMandriva. Previously: openSUSE, PCLinuxOS, CentOS, among others over the years.
Posts: 3,881
Rep:
ifconfig command as root?
Try this:
Code:
sudo ifconfig enp0s25 192.168.1.10
Did you run thecommand as root?Try this:PS: Sorry I should have said that before, lack of sleep will do that to ya.
Last edited by jsbjsb001; 12-26-2017 at
07:03 PM
.
Reason: forgot cmd
12-26-2017, 07:11 PM
#13
bkelly
Member
Registered: Jan 2008
Distribution: Centos 7-4
Posts: 205
Original Poster
Rep:
Code:
sudo ifconfig epn0s25 192168.1.10
That is almost all for today. I will try again tomorrow, after asking about mounting a USB drive.
Yes, tried that as rootAnd it just presented the next prompt. No information, no error.That is almost all for today. I will try again tomorrow, after asking about mounting a USB drive.
12-26-2017, 07:14 PM
#14
jsbjsb001
Senior Member
Registered: Mar 2009
Location: Earth, unfortunately…
Distribution: Currently: OpenMandriva. Previously: openSUSE, PCLinuxOS, CentOS, among others over the years.
Posts: 3,881
Rep:
Quote:
bkelly
Originally Posted by
Code:
sudo ifconfig epn0s25 192168.1.10
That is almost all for today. I will try again tomorrow, after asking about mounting a USB drive.
Yes, tried that as rootAnd it just presented the next prompt. No information, no error.That is almost all for today. I will try again tomorrow, after asking about mounting a USB drive.
Code:
sudo ifconfig epn0s25 192.168.1.10
As your reply is a little unclear to me.
It should be the following, rather than the above:If it give no error, do you still have the same problem?As your reply is a little unclear to me.
12-27-2017, 01:39 AM
#15
rnturn
Senior Member
Registered: Jan 2003
Location: Illinois (SW Chicago ‘burbs)
Distribution: openSUSE, Raspbian, Slackware. Older: Coherent, MacOS, Red Hat, Big Iron IXs: AIX, Solaris, Tru64
Posts: 2,739
Rep:
Quote:
bkelly
Originally Posted by
Code:
Kernel IP routing table Destination Gateway Genmask Flags MSS Window irtt Iface
enter: ip route
to get,…, nothing. Well not quite, it does provide another copy of the command prompt line.
That looks like a good clue but I don’t know where to go with it.
enter netstat -r to getand nothing more. There are more spaces in the second line that looks like making it look column friendly, but no characters below that line, just the next command line prompt.enter: ip routeto get,…, nothing. Well not quite, it does provide another copy of the command prompt line.That looks like a good clue but I don’t know where to go with it.
If it’s standalone, something still needs to act as the router for your network. (You did say thre was no “gateway computer” in your original post—I missed that and I think that’s the source of your problem.) Perhaps one of the systems is acting as a server of some sort? That might be a good choice.
List the three devices you have on your network and their IP addresses. You’re using a 192.168.x.x address space, right? Might be a good idea to issue the “ip route” (or “netstat -r”) command on all three systems (laptop?, cdev?, and edev?) as well as the “ifconfig -a” or “ip addr list” command on each and post the output for all systems.
Later…
You have no routes configured. Is this a standalone network? Do you have a router from your ISP?If it’s standalone, something still needs to act as the router for your network. (You did say thre was no “gateway computer” in your original post—I missed that and I think that’s the source of your problem.) Perhaps one of the systems is acting as a server of some sort? That might be a good choice.List the three devices you have on your network and their IP addresses. You’re using a 192.168.x.x address space, right? Might be a good idea to issue the “ip route” (or “netstat -r”) command on all three systems (laptop?, cdev?, and edev?) as well as the “ifconfig -a” or “ip addr list” command on each and post the output for all systems.Later…
Page 1 of 2
1
2
>
Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
OnBB code isOnSmilies areOff[IMG] code is
HTML code is Off
Forum Rules
Similar Threads
Thread
Thread Starter
Forum
Replies
Last Post
Network is Unreachable/Unknown host/Destination Host Unreachable [Debian]
denv
Linux – Networking
4
03-27-2014
03:58 PM
Network Unreachable for Destination Network other than Interface
Jack10
Linux – Networking
3
08-17-2010
08:50 AM
Network is unreachable
ahtesham0123
Linux – Software
4
04-25-2010
09:45 AM
network unreachable
zigzagooo
Linux – Networking
6
05-24-2009
11:17 AM
Network Is Unreachable!!!!!!!!!!!!!!!!!!!!!
koodoo
Linux – Newbie
4
02-19-2005
10:51 AM
All times are GMT -5. The time now is
04:53 PM
.