LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 03-20-2015, 02:32 AM   #1
Vjayht
LQ Newbie
 
Registered: Mar 2015
Posts: 4

Rep: Reputation: Disabled
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.
 
Old 03-20-2015, 02:39 AM   #2
jdkaye
LQ Guru
 
Registered: Dec 2008
Location: Westgate-on-Sea, Kent, UK
Distribution: Debian Testing Amd64
Posts: 5,464

Rep: Reputation: Disabled
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
 
Old 03-20-2015, 03:05 AM   #3
Vjayht
LQ Newbie
 
Registered: Mar 2015
Posts: 4

Original Poster
Rep: Reputation: Disabled
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.
 
Old 03-20-2015, 04:17 AM   #4
ferrari
Senior Member
 
Registered: Sep 2003
Location: Auckland, NZ
Distribution: openSUSE Leap
Posts: 1,436

Rep: Reputation: 191Reputation: 191
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.
 
Old 03-20-2015, 05:28 AM   #5
Vjayht
LQ Newbie
 
Registered: Mar 2015
Posts: 4

Original Poster
Rep: Reputation: Disabled
Ok .Thanks for information
 
Old 03-20-2015, 06:09 AM   #6
TenTenths
Senior Member
 
Registered: Aug 2011
Location: Dublin
Distribution: Centos 5 / 6 / 7
Posts: 2,166

Rep: Reputation: 751Reputation: 751Reputation: 751Reputation: 751Reputation: 751Reputation: 751Reputation: 751
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.
 
Old 03-20-2015, 10:10 AM   #7
rtmistler
Moderator
 
Registered: Mar 2011
Location: Sutton, MA. USA
Distribution: MINT Debian, Angstrom, SUSE, Ubuntu
Posts: 4,087
Blog Entries: 10

Rep: Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520
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.
 
  


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
[SOLVED] ping www.google.co.in gives unknown host error ,ping to LAN address works fine aspiring_stellar Linux - Newbie 10 05-24-2011 04:26 PM
[SOLVED] Weird ping and ping replies from google.... corp769 Linux - General 6 03-07-2011 08:43 PM
can ping network computer, cannot ping google.com (help needed) ben_build#2.1.0 Linux - Wireless Networking 23 11-07-2010 01:55 PM
why host google.com working and ping google.com not ? gudneo Linux - Networking 3 10-19-2006 01:56 AM
I can ping google.com successfully,but ping client(in my intranet) failed.Why? whepin Linux - Newbie 4 12-30-2001 05:54 AM


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