LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
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, 01: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, 01:39 AM   #2
jdkaye
LQ Guru
 
Registered: Dec 2008
Location: Westgate-on-Sea, Kent, UK
Distribution: Debian Testing Amd64
Posts: 5,465

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, 02: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, 03:17 AM   #4
ferrari
LQ Guru
 
Registered: Sep 2003
Location: Auckland, NZ
Distribution: openSUSE Leap
Posts: 5,790

Rep: Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140
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, 04:28 AM   #5
Vjayht
LQ Newbie
 
Registered: Mar 2015
Posts: 4

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

Rep: Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553
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, 09:10 AM   #7
rtmistler
Moderator
 
Registered: Mar 2011
Location: USA
Distribution: MINT Debian, Angstrom, SUSE, Ubuntu, Debian
Posts: 9,879
Blog Entries: 13

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

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 03:15 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