LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
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 07-26-2011, 04:19 AM   #1
chenbo
LQ Newbie
 
Registered: Jul 2011
Posts: 13

Rep: Reputation: Disabled
Centos cannot ping hosts on the same subnet after change to static ip


Hi

I am using centOS 5.0.

After I change from DHCP to static IP address, I cannot ping hosts on the same subnet. The error message says destination host unreachable. Before I made the changes I was able to ping and now even I change it back to DHCP I still cannot ping with the same destination host unreachable message.

The centOS is running on VMware on a Windows host.

ifconfig shows

eth0 Link encap:Ethernet HWaddr 00:0C29:A1:9A:10
inet addr: 192.168.0.202 Bcast:192.168.0.255 Mask: 255.255.255.0
inet6 addr ......

After pinging 192.168.0.106 (106 is on and other host can ping it), arp -a shows
? (192.168.0.106) at <incomplete> on eth0

I tried different ways by disabling the firewall and and disabling SE protection. No Luck.

It looks arp has some problem. But how to solve it.

Can anyone please help me ..

Thanks in Advance.
 
Old 07-26-2011, 04:34 AM   #2
zer0signal
Member
 
Registered: Oct 2010
Location: Cleveland
Distribution: Slackware, Fedora, RHEL (4,5), LFS 6.7, CentOS
Posts: 258

Rep: Reputation: 29
What is your default gateway IP?

Try to traceroute to the 106 address
 
Old 07-26-2011, 04:52 AM   #3
chenbo
LQ Newbie
 
Registered: Jul 2011
Posts: 13

Original Poster
Rep: Reputation: Disabled
I did not set default gateway.

But after I set the default gateway to 192.168.0.99, I still cannot ping 109 or the gateway

traceroute to 192.168.0.106 shows

1 (192.168.0.202) 3000.784 ms !H 3000.779 ms !H 3000.770 ms !H

Not able to ping after traceroute.
 
Old 07-26-2011, 04:55 AM   #4
zer0signal
Member
 
Registered: Oct 2010
Location: Cleveland
Distribution: Slackware, Fedora, RHEL (4,5), LFS 6.7, CentOS
Posts: 258

Rep: Reputation: 29
after you set your default gateway... did you do a

service network restart

?
 
Old 07-26-2011, 04:58 AM   #5
chenbo
LQ Newbie
 
Registered: Jul 2011
Posts: 13

Original Poster
Rep: Reputation: Disabled
Yes, I did /etc/init.d/network restart. And I can see the default gateway using route -n.
 
Old 07-26-2011, 05:12 AM   #6
zer0signal
Member
 
Registered: Oct 2010
Location: Cleveland
Distribution: Slackware, Fedora, RHEL (4,5), LFS 6.7, CentOS
Posts: 258

Rep: Reputation: 29
What happens when you ping

127.0.0.1
 
Old 07-26-2011, 05:16 AM   #7
chenbo
LQ Newbie
 
Registered: Jul 2011
Posts: 13

Original Poster
Rep: Reputation: Disabled
I am able to ping myself, both 127.0.0.1 and 192.168.0.202.
 
Old 07-26-2011, 05:18 AM   #8
zer0signal
Member
 
Registered: Oct 2010
Location: Cleveland
Distribution: Slackware, Fedora, RHEL (4,5), LFS 6.7, CentOS
Posts: 258

Rep: Reputation: 29
Type route

And paste the output here. Plus you're positive. .99 is the router for this LAN.
 
Old 07-26-2011, 05:27 AM   #9
chenbo
LQ Newbie
 
Registered: Jul 2011
Posts: 13

Original Poster
Rep: Reputation: Disabled
The output for route is attached.
Attached Images
File Type: jpg route.jpg (26.1 KB, 22 views)
 
Old 07-26-2011, 05:33 AM   #10
chenbo
LQ Newbie
 
Registered: Jul 2011
Posts: 13

Original Poster
Rep: Reputation: Disabled
And Yes, .99 is the default gateway for the LAN.
 
Old 07-26-2011, 05:35 AM   #11
thegarlicman
LQ Newbie
 
Registered: Jan 2011
Posts: 1

Rep: Reputation: 0
Quote:
Originally Posted by chenbo View Post
Hi

I am using centOS 5.0.

After I change from DHCP to static IP address, I cannot ping hosts on the same subnet. The error message says destination host unreachable. Before I made the changes I was able to ping and now even I change it back to DHCP I still cannot ping with the same destination host unreachable message.

The centOS is running on VMware on a Windows host.

ifconfig shows

eth0 Link encap:Ethernet HWaddr 00:0C29:A1:9A:10
inet addr: 192.168.0.202 Bcast:192.168.0.255 Mask: 255.255.255.0
inet6 addr ......

After pinging 192.168.0.106 (106 is on and other host can ping it), arp -a shows
? (192.168.0.106) at <incomplete> on eth0

I tried different ways by disabling the firewall and and disabling SE protection. No Luck.

It looks arp has some problem. But how to solve it.

Can anyone please help me ..

Thanks in Advance.
1. Check to see if your network service is running? /etc/init.d/network status
2. Ping your loopback. ping 127.0.0.1
3. Ensure you are on the correct subnet as your other systems.

Good luck!
 
Old 07-26-2011, 05:43 AM   #12
chenbo
LQ Newbie
 
Registered: Jul 2011
Posts: 13

Original Poster
Rep: Reputation: Disabled
1. The network service is running.
2. I am able to ping 127.0.0.1 and its own ip 192.168.0.202
3. Yes, all are on the same subnet 192.168.0.0 with mask 255.255.255.0
 
Old 07-26-2011, 11:13 PM   #13
chenbo
LQ Newbie
 
Registered: Jul 2011
Posts: 13

Original Poster
Rep: Reputation: Disabled
Problem solved.

The problem was that the centOS was running in VMware and the VMware network adapter was configured as NAT. After I change it to Bridged, it works.
 
Old 07-27-2011, 01:40 AM   #14
zer0signal
Member
 
Registered: Oct 2010
Location: Cleveland
Distribution: Slackware, Fedora, RHEL (4,5), LFS 6.7, CentOS
Posts: 258

Rep: Reputation: 29
Damn I did not even think you were using a VMware Guest.... SMH, yeah its has to be bridge mode, not nat'd from VMware Server..
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
CentOS 3.5 Enterprise Server -- I need to change my Local Static IP address. kexpert Red Hat 12 11-08-2009 06:33 AM
Redhat Centos 5.2 - How to change subnet mask rust8y Linux - Networking 1 11-26-2008 06:20 PM
ping broadcast doesn't yield reply from all alive hosts on my subnet?? rs_vijay Linux - Networking 3 07-06-2007 09:58 AM
Static IP on Server, cannot ping outside of subnet. icesickle Linux - Networking 2 04-01-2004 09:21 PM


All times are GMT -5. The time now is 06:55 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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration