LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   I am not able to ping google.com. (https://www.linuxquestions.org/questions/linux-newbie-8/i-am-not-able-to-ping-google-com-4175537310/)

Vjayht 03-20-2015 01:32 AM

I am not able to ping google.com.
 
Hi

I am not able to ping google.com.
I made the changes in ifcfg-eth0 IP address to static.it was dchp.

please help.

jdkaye 03-20-2015 01:39 AM

What linux distro and version are you running?
Quote:

it was dchp.
??? Did you mean dhcp?
Do you have an internet connection?
What is the complete path of the configuration file you changed?
jdk

Vjayht 03-20-2015 02:05 AM

Yes . i hv internet connection. i changed IP from /etc/sysconfig/network-scripts/ifcfg-eth0

Now i have done the BOOTPROTO=dhcp and now I am able to connect to google.but whenever m doing IP adress to static its stop working .
no idea why it is.

ferrari 03-20-2015 03:17 AM

When you configure with a static IP address, you'll also need to configure a domain name server manaually. Check /etc/resolv.conf for a nameserver entry, and add as necessary.

Vjayht 03-20-2015 04:28 AM

Ok .Thanks for information :)

TenTenths 03-20-2015 05:09 AM

If your static IP isn't on the same subnet as the IP you've been getting from DHCP then you may also have to change hostmasks and default gateways / routes accordingly.

rtmistler 03-20-2015 09:10 AM

If you're on a network which provides DHCP why are you trying to configure a static IP? Be aware that you also should select a static IP on the correct subnet, but also beyond the scope of the pool of dynamic addresses which can be assigned by the router.


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