LinuxQuestions.org
Visit Jeremy's Blog.
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 02-12-2013, 06:18 PM   #1
Electromancer
LQ Newbie
 
Registered: Jan 2013
Posts: 12

Rep: Reputation: Disabled
Ping to google hangs


Hi,

I am using CentOS.

I'm trying to set a static ipaddress


Every time I ping google.com I get the following..
OUTPUT: PING google.com (74.125.224.41) 56(84) bytes of data.

And it just hangs there..

Here is my /etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE=eth0
BOOTPROTO=static
DHCPCLASS=
HWADDR=AA:AA:AA:AA:AA:AA
IPADDR=10.1.0.80
NETMASK=255.255.0.0
ONBOOT=yes
NM_CONTROLLED=no
GATEWAY=10.1.0.49

Here is my /etc/resolv.conf (all are DNS servers)
search domain.org
nameserver 10.1.0.49
nameserver 10.1.0.181
nameserver 10.4.0.180

Here is my /etc/hosts
127.0.0.1 localhost localhost.localdomain localhost4 locahost4.localdomain4
::1 localhost localhost.localdomain localhost6 locahost6.localdomain6

After I configure all settings
/etc/init.d/network restart

I am doing all this under root.

What should I change? Could this be a router problem?

Last edited by Electromancer; 02-12-2013 at 07:52 PM.
 
Old 02-13-2013, 12:46 AM   #2
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,829

Rep: Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308
what is your routing table?
 
Old 02-13-2013, 11:57 AM   #3
Electromancer
LQ Newbie
 
Registered: Jan 2013
Posts: 12

Original Poster
Rep: Reputation: Disabled


---------- Post added 02-13-13 at 12:58 PM ----------

Code:
Kernel IP routing table
Destination       Gateway         Genmask      Flags Metric Ref  Use Iface
10.1.0.0          *               255.255.0.0  U     0      0     0 eth0
link-local        *               255.255.0.0  U     1002   0     0 eth0
default           huey.domain.org 0.0.0.0      UG    0      0     0 eth0

Last edited by Electromancer; 02-13-2013 at 12:32 PM.
 
Old 02-13-2013, 01:13 PM   #4
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,829

Rep: Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308
it can be still a firewall problem either on the router or on the host.
 
Old 02-13-2013, 02:12 PM   #5
Electromancer
LQ Newbie
 
Registered: Jan 2013
Posts: 12

Original Poster
Rep: Reputation: Disabled
The machine can reach and recognize google.com, but will not receive any packets. It hangs.

I can reach other machines on another subnet, but can't receive any packets.

I turned off the host firewall and no luck.

So I will try to turn off the hardware firewall.

Last edited by Electromancer; 02-13-2013 at 02:17 PM.
 
Old 02-13-2013, 08:31 PM   #6
Electromancer
LQ Newbie
 
Registered: Jan 2013
Posts: 12

Original Poster
Rep: Reputation: Disabled
Okay I found the problem, which I'm very embarrassed and ashamed of myself.

I was pointing my gateway to my first dns server and I changed the gateway to point to the router instead.

All is good now, what was I thinking..

Anyhow, pan64 I appreciate your support during the process of troubleshooting this.
 
Old 02-14-2013, 12:05 AM   #7
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,829

Rep: Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308
glad to help you
if you really want to say thanks just press YES (bottom right corner)
 
  


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
Ping command hangs indefinitely i.e.system(ping -w 10 [ip address]) Anshu Tomar Linux - Newbie 4 07-05-2012 07:16 AM
[SOLVED] ping www.google.co.in gives unknown host error ,ping to LAN address works fine aspiring_stellar Linux - Newbie 10 05-24-2011 03:26 PM
[SOLVED] Weird ping and ping replies from google.... corp769 Linux - General 6 03-07-2011 07:43 PM
can ping network computer, cannot ping google.com (help needed) ben_build#2.1.0 Linux - Wireless Networking 23 11-07-2010 12:55 PM
I can ping google.com successfully,but ping client(in my intranet) failed.Why? whepin Linux - Newbie 4 12-30-2001 04:54 AM

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

All times are GMT -5. The time now is 01:03 AM.

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