Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm somewhat new to Linux, but I'm trying to network a few Linux machines. I can't seem to be able ping the gateway or the other Linux machines.

My scenario: I have a few Linux boxes set up on a 10.45.89.x subnet with the gateway being On all of these, I'm unable to ping anything except I'm wondering if I need to modify any of the routing tables or hosts file. Below is a few commands and their output. Perhaps I need to check something else?

netstat -r output:   *    U    *    U    *    U
default    UG

/etc/hosts localhost.localdomain  localhost localhost.localdomain  localhost rpt.rhn.linux.ul.com


domain demolotus.com



ip route show dev eth0  proto  kernel  scope  link  src
default via


eth0    Link encap:Ethernet  HWaddr 00:0C:29:01:28:CD
inet addr:  Bcast: Mask:

eth0:0 Link encap:Ethernet HWaddr 00:0C:29:01:28:CD
inet addr:  Bcast: Mask:

ip addr show dev eth0

2: etho0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast qlen 1000
link/ether 00:0c:29:01:28:cd brd ff:ff:ff:ff:ff:ff
inet brd scope global eth0
inet brd scope global secondary eth0:0

Any suggestions are greatly appreciated. Thanks!

share|improve this question * U Do you have another network configured on the same interface? Or are you running a firewall? And on top of that etho0: < NO-CARRIER ,BROADCAST,MULTICAST,UP> you don't seem to have a physical connection reported by eth0. – Karlson Jan 3 '13 at 17:14
Thanks, I started playing around with it and got it working. One of the problems was it seemed that I had eth0 disabled, which ifup eth0 corrected. Thanks again. – ms1013 Jan 3 '13 at 18:39
The "no carrier" means that there is no connection on that interface (bad cable, not plugged in correctly, broken switch at the other end, ...). – vonbrand Jan 18 '13 at 0:31
up vote 1 down vote accepted

on each host, they should have at least their hostname and a corresponding entry in /etc/hosts with their IP in the relevant network, no? ^^ You only show in there, and the "localhost" hostname... So how can it know it is also part of the 192.whatever network and should therefore be able to ping all the other hosts on there? In other words: just edit the hosts file and add a line with:

10.45.89.xxx  st852.demolotus.com

xxx being the last IP digit of st852.demolotus.com in the 10.45.89.X/24 subnetwork

share|improve this answer
and restart (stop ; start) networking, or reboot, to have it re-read its hostname and ip and create its routing information. – Olivier Dulac Jan 3 '13 at 18:43
I assume the hostname command does indeed reply "st852.demolotus.com", otherwise you need to edit the relevant filse for it to know it is its hostname (it's unix/linux/distribution dependant) – Olivier Dulac Jan 3 '13 at 18:44
otherwise, even if ping does go out, the remote machine sees it coming from "" : when replying, it goes to themselves (as will also be that machine's localhost ip) so you never see the packet go back to the machine who originated the ping. – Olivier Dulac Jan 4 '13 at 14:10

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.