LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (http://www.linuxquestions.org/questions/linux-networking-3/)
-   -   Centos cannot ping hosts on the same subnet after change to static ip (http://www.linuxquestions.org/questions/linux-networking-3/centos-cannot-ping-hosts-on-the-same-subnet-after-change-to-static-ip-893803/)

chenbo 07-26-2011 04:19 AM

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.

zer0signal 07-26-2011 04:34 AM

What is your default gateway IP?

Try to traceroute to the 106 address

chenbo 07-26-2011 04:52 AM

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.

zer0signal 07-26-2011 04:55 AM

after you set your default gateway... did you do a

service network restart

?

chenbo 07-26-2011 04:58 AM

Yes, I did /etc/init.d/network restart. And I can see the default gateway using route -n.

zer0signal 07-26-2011 05:12 AM

What happens when you ping

127.0.0.1

chenbo 07-26-2011 05:16 AM

I am able to ping myself, both 127.0.0.1 and 192.168.0.202.

zer0signal 07-26-2011 05:18 AM

Type route

And paste the output here. Plus you're positive. .99 is the router for this LAN.

chenbo 07-26-2011 05:27 AM

1 Attachment(s)
The output for route is attached.

chenbo 07-26-2011 05:33 AM

And Yes, .99 is the default gateway for the LAN.

thegarlicman 07-26-2011 05:35 AM

Quote:

Originally Posted by chenbo (Post 4425315)
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!

chenbo 07-26-2011 05:43 AM

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

chenbo 07-26-2011 11:13 PM

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.

zer0signal 07-27-2011 01:40 AM

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..


All times are GMT -5. The time now is 08:04 AM.