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 |
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
|
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 |
But mine is DHCP
So i could not add other pc's ip and biosname into my /etc/hosts.
|
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? |
All times are GMT -5. The time now is 07:25 AM. |