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 12-29-2001, 08:05 AM   #1
whepin
Member
 
Registered: Dec 2001
Location: thunder bay, on, Canada
Distribution: Windows vista & Ubuntu
Posts: 113

Rep: Reputation: 15
I can ping google.com successfully,but ping client(in my intranet) failed.Why?


I have the same configuration with that in windows.
And also they cannot ping me successfully.

But in windows,all is ok!
Why?i donot understand.
Note:my ip is 172.30.4.?,and his is 172.30.3.?
subnet mask:255.255.248.0

Last edited by whepin; 12-29-2001 at 08:06 AM.
 
Old 12-29-2001, 09:05 AM   #2
bluecadet
Member
 
Registered: Oct 2001
Distribution: MD81 RH71
Posts: 555

Rep: Reputation: 30
have you got ipchains / iptables set up properly?what do you mean by in windows? your sever or internal machine? on trhe client you need to specify your gateway in /etc/sysconfig/network to be the modem connected machine's internal interface
 
Old 12-29-2001, 12:29 PM   #3
Sylhouette
Member
 
Registered: Oct 2001
Location: Beverwijk (Holland
Distribution: Red Hat 7.1
Posts: 132

Rep: Reputation: 15
When you want to ping another machine on your local network it will do with ping 192.168.0.1

Then you will ping this ip adres

If the machine name is PC1 and you give ping PC1

You proberly get no responce because it does not know its ip adres

in your /etc/hosts file you can point linux the right way by adding the line or lines for more pc's

192.168.0.1..........PC1
192.168.0.2..........PC2

Now linux knows wich name belongs to wich ipadres

Normally he will look at the DNS server

Thats why ping google.com will work because the DNS server knows the ipadres of google.com

You can set up your own DNS server for your internal network with BIND.
Then the line 192.168.bla.bla in the hosts file is not needed
Hope this helped
 
Old 12-30-2001, 04:17 AM   #4
whepin
Member
 
Registered: Dec 2001
Location: thunder bay, on, Canada
Distribution: Windows vista & Ubuntu
Posts: 113

Original Poster
Rep: Reputation: 15
But mine is DHCP

So i could not add other pc's ip and biosname into my /etc/hosts.

Last edited by whepin; 12-30-2001 at 04:22 AM.
 
Old 12-30-2001, 04:54 AM   #5
Sylhouette
Member
 
Registered: Oct 2001
Location: Beverwijk (Holland
Distribution: Red Hat 7.1
Posts: 132

Rep: Reputation: 15
No you CAN add other pc's hostname and ip adressen in your /etc/hosts file if you want to ping or use there name you MUST add those lines in your /etc/hosts file

When you have a local dns you do not have to ad them in your /etc/hosts file because linux first ask the dns server for the ip adres for PC1

Then the dns server says somthing like PC1 has ip 192.168.0.1

You dont have a dns server for your local network only for the internet (the DNS server from your ISP)

If linux does not receive an answer from the DNS server then it will look in the /etc/hosts file..

so type this when you have not put the lines in the /etc/hosts file
ssh root@PC1

Now linux will try to make contact true ssh to PC1 it proberly will not work because the ipadres is unknown.
If you type
ssh root@192.168.0.1

Then there will be an answer (if the ssh deamon is active on PC1)

Add the line :
192.168.0.1..................PC1
to the /etc/hosts file

Then type:
ssh root@PC1

and the same thing happens with the command :
ssh root@192.168.0.1

You are just (linken) ip adresses with Names

Hope this is clear for you?
 
  


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
Strange Ping Issue - Can't ping localhost but can ping others on LAN code_slinger Linux - Networking 13 03-17-2011 02:47 AM
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
dhcp client can't ping gateway but can ping other local hosts dirty_forks Linux - Networking 7 10-08-2004 10:54 AM
Cannot PING Outside Intranet/LAN ryhackl Linux - Networking 4 09-11-2003 02:23 PM
I ping servername failed,but ping ipofservername successfully,Why? whepin Linux - Networking 2 12-20-2001 10:45 AM


All times are GMT -5. The time now is 03:02 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration