?
Solved

Why can't I ping Gateway from centOS install?

Posted on 2009-02-19
21
Medium Priority
?
2,903 Views
Last Modified: 2013-12-15
I have centOS 5 installed on a server.

ifconfig gives the following:
inet addr:192.168.1.106 Bcast:192.168.1.255 Mask: 255.255.255.0
UP BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overrus:0 frame:0
TX packets:0 errors:0 dropped:0 overrus:0 carrier:0

cat /etc/sysconfig/network:
NETWORKING=yes
HOSTNAME=MAXVNSRV2
GATEWAY=192.168.1.1

cat ifcfg-eth0:
DEVICE=eth0
BOOTPROTO=static
BROADCAST=192.168.1.255
IPADDR=192.168.1.106
NETMASK=255.255.255.0
NETWORK=192.168.1.0
ONBOOT=yes

I think everything is correct, but I can't pig out to gateway. (I can from Windows box) Please help.
0
Comment
Question by:gtoliver0922
  • 8
  • 5
  • 4
  • +1
20 Comments
 
LVL 29

Expert Comment

by:fosiul01
ID: 23686748
what is the output for route -an

check if your default gateway is correct in their

when you ping what does it say ??
some time, its try to ping via different gateway ..

0
 
LVL 27

Expert Comment

by:Nopius
ID: 23687591
It seems that your network cable is not good, disconnected or on different VLAN.
If you have multiple ethernet ports, try another one.
Do you mean you can ping from Windows machine, connected to the same ethernet cable?
0
 
LVL 48

Expert Comment

by:Tintin
ID: 23688392
In addition to the above requests, what's the output of

mii-tool -v eth0
0
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 

Author Comment

by:gtoliver0922
ID: 23691383
Starting from the top:
route -n Gives following:

Destination         Gateway          Genmask              Flags         Metric         Ref           Use Iface
192.168.1.0        0.0.0.0            255.255.255.0          U             0                 0               0  eth0
169.254.0.0        0.0.0.0            255.255.255.0          U             0                 0               0  eth0
0.0.0.0                192.168.1.1    0.0.0.0                     UG           0                 0               0 eth0

The cable is good because if I use it on an Windows box it works fine and pings out fine.


Output from mii-tool -v eth0:

eth0: negotiated 100baseTx-FD flow-control, link ok
    product info: vendor 00:aa:00, model 56 rev 0
    basic mode: autonegotiation enabled
    basic status: autonegotiation complete, link ok
    capabilities: 100baseTx-FD 100baseTx-HD 10baseT-FD 10baseT-HD
    advertising: 100baseTx-FD 100baseTx-HD 10baseT-FD 10baseT-HD flow-control
    link partner: 100baseTx-FD 100baseTx-HD 10baseT-FD 10baseT-HD flow-control

Thank you so much for your help so far. Anything you can add would be GREATLY appreciated.
0
 
LVL 27

Expert Comment

by:Nopius
ID: 23691717
> The cable is good because if I use it on an Windows box it works fine and pings out fine.

Just to be sure, do you mean the cable and the ethernet ports are the same?

Next question - what is your kernel version, NIC vendor/model and eth driver?

dmesg | grep eth
uname -r
lsmod
0
 
LVL 29

Expert Comment

by:fosiul01
ID: 23691857
this is little bit of wired,

can windows pc ping this linux box ??

can linux box ping any windows pc ??

do you have Gateway address define in windows pc ??
0
 

Author Comment

by:gtoliver0922
ID: 23691922
OK, well I mean the cable is good for sure. I didn't not pull the NIC card as it is built into the motherboard, but I do have an Intel card somewhere I could pop in if I need to.

Other info:
dmesg | grep eth:

e1000: eth0: e1000_probe: Intel(R) PR/1000 Network Connection
ADDRCONF(NETDEV_UP): eth0: link is not ready
ADDRCONF(NETDEV_UP): eth0: link is not ready
ADDRCONF(NETDEV_UP): eth0: link is not ready
ADDRCONF(NETDEV_UP): eth0: link is not ready

uname -r:

2.6.18-92.e15

lsmod:

too much stuff, but e1000 had the number 155601 0 after it.

Are you thinking the NIC is bad? It was working when this box was setup as a Vista machine.

Just so you now it's an Intel Dual Xeon 3.4 with 4GIG ram and built in NIC card.
0
 

Author Comment

by:gtoliver0922
ID: 23691961
fosiul01:

To answer your questions:
1) No
2) No
3) Yes. Well, the Windows machines are getting DHCP from domain controller.
0
 
LVL 29

Expert Comment

by:fosiul01
ID: 23692095
hi
i would not say your nic is bad, i never seen this problem but its likes there is a workwayround of this problem

have a look to this article, its big but should help you

http://linux.derkeiler.com/Mailing-Lists/Debian/2006-04/msg02353.html
0
 
LVL 27

Expert Comment

by:Nopius
ID: 23692240
> Are you thinking the NIC is bad?

May be. And I beleave that it was alive. If you can test in on Vista again and it would work, then it's OK :-)
Intel 1000 drivers are quite stable and theirs NICs too.

> ADDRCONF(NETDEV_UP): eth0: link is not ready

Here is a problem. Just for sure please change your cable. I know there are cables with intermittent problems. Also the PORT on your hub/switch may be dead or working unstable (if possible, connect it to another port and reset switch).
That's most probably a physical problem, change components one-by one and find what is failed.
0
 
LVL 48

Expert Comment

by:Tintin
ID: 23695505
The thing is, that mii-tool is reporting

eth0: negotiated 100baseTx-FD flow-control, link ok

Which indicates the link has auto-negotiated with the switch and set the interface to 100Mb full duplex.  It wouldn't be able to do that if it had no connection.

Couple more things to try

Do a

ping -s 192.168.1.1

and in another terminal session, do

tcpdump dst 192.168.1.1

and see what it reports
0
 

Author Comment

by:gtoliver0922
ID: 23695832
Tintin;

Did what you said. Session 1 is pinging away at 192.168.1.1 and session 2 is flashing at the tcpdump prompt not reporting anything. Says it's listen on eth0, link-type EN10MB bt nothing is happening. It's been about 10 minutes.
0
 
LVL 48

Expert Comment

by:Tintin
ID: 23696040
OK, try doing

tcpdump

to see if there are any packets whatsoever on the network.

0
 
LVL 48

Expert Comment

by:Tintin
ID: 23696045
Also, what messages do you get back from ping?
0
 

Author Comment

by:gtoliver0922
ID: 23696069
Nope, nothing. :) I wish I knew what I was doing wrong. I feel like I'm wasting everyone's time on something stupid. I do very much appreciate the help.
0
 

Author Comment

by:gtoliver0922
ID: 23696081
Message back from ping is "destination host unreachable"
0
 

Author Comment

by:gtoliver0922
ID: 23717723
New information:

I installed a new Intel NIC card EXACTLY like the one built into the mother board. I get the exact same messages to all of the questions about except as eth1. I'm thinking it's got to be something driver related. Any thoughts would be appreciated.
0
 

Accepted Solution

by:
gtoliver0922 earned 0 total points
ID: 23728255
This problem is solved. I had to reset the BIOS to factory "fail safe" settings and then the NIC worked fine. Thanks everyone for all of your help. I really appreciate all of the quick responses and awesome feedback.
0
 
LVL 27

Expert Comment

by:Nopius
ID: 23729524
> I had to reset the BIOS to factory "fail safe" settings and then the NIC worked fine

Very interesting... I recommend you to mark your post as self-answered, so it will be PAQed and come to knowledge base.
0
 
LVL 27

Expert Comment

by:Nopius
ID: 23729561
It whould be even better if you protocol here your motherboard/BIOS version and kernel verstion :-)
0

Featured Post

Visualize your virtual and backup environments

Create well-organized and polished visualizations of your virtual and backup environments when planning VMware vSphere, Microsoft Hyper-V or Veeam deployments. It helps you to gain better visibility and valuable business insights.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Join Greg Farro and Ethan Banks from Packet Pushers (http://packetpushers.net/podcast/podcasts/pq-show-93-smart-network-monitoring-paessler-sponsored/) and Greg Ross from Paessler (https://www.paessler.com/prtg) for a discussion about smart network …
Often times it's very very easy to extend a volume on a Linux instance in AWS, but impossible to shrink it. I wanted to contribute to the experts-exchange community a way of providing a procedure that works on an AWS instance. It can also be used on…
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.
Suggested Courses
Course of the Month17 days, 12 hours left to enroll

831 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question