LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
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 07-26-2011, 03: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, 03: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, 03: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, 03: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, 03: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, 04: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, 04: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, 04: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, 04:27 AM   #9
chenbo
LQ Newbie
 
Registered: Jul 2011
Posts: 13

Original Poster
Rep: Reputation: Disabled
The output for route is attached.
Attached Thumbnails
Click image for larger version

Name:	route.jpg
Views:	2543
Size:	26.1 KB
ID:	7669  
 
Old 07-26-2011, 04: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, 04: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, 04: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, 10: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, 12: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



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

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

All times are GMT -5. The time now is 05:29 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
Open Source Consulting | Domain Registration