LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   cannot ping hostnames (https://www.linuxquestions.org/questions/linux-networking-3/cannot-ping-hostnames-63614/)

joadoor 06-04-2003 08:51 AM

cannot ping hostnames
 
I have been playing with this for a while and am getting nowhere fast :)

My setup is as follows:

All PC's are using:
Workgroup = Home

PC1: Windows 2000 / RH9
~~~~~~~~~~~~~~~~~
Computer name: Server
IP Address #1: 10.37.1.1 (static) - LAN
IP Address #2: ISP assigned (dynamic) - WAN

Running: WinRoute as DHCP and DNS server
Also setup as Apache weserver, FTP server, email server etc.

PC2: Windows 2000
~~~~~~~~~~~~~
Computer name: GamesPC
IP Address: dhcp assigned from PC1

When all PCs are running windows they can ping each other either by their IP address or computer name.


My project is to replicate all the services on PC1 that currently run in Windows into the Linux world ... as Windows sucks :)

I am fortunate enough to have a spare set of PCs to 'test' with.
So far I have setup on the RH9 server a DHCP server that dishes out IP's to the connected Windows PC's.

My dhcpd.conf file:
~~~~~~~~~~~~
# Sample /usr/sbin/dhcpd.conf
# (add your comments here)
ddns-update-style ad-hoc;
default-lease-time 600;
max-lease-time 7200;
option subnet-mask 255.255.255.0;
option broadcast-address 10.37.1.255;
option routers 10.37.1.1;
option domain-name-servers 10.37.1.1;
#option domain-name "home";

subnet 10.37.1.0 netmask 255.255.255.0 {
range 10.37.1.10 10.37.1.150;
}


I can currently ping as follows:

From / To / using
~~~~~~~~~~~
Server / GamesPC / IPaddress = yes
Server / GamesPC / computer name = yes
GamesPC / Server / IPaddress =yes
GamesPC / Server / computer name = NO

it just says "Unknown host server."

I have put the Servers IP 10.37.1.1 into the Windows HOSTS file, but it makes no difference.

Basically I think the Server's DNS service is not working.
Here are some of my files from /etc


hosts.conf
~~~~~~~
order hosts,bind


hosts
~~~~
# Do not remove the following line, or various programs
# that require network functionality will fail.
127.0.0.1 server.localhost.localdomain localhost.localdomain localhost
10.37.1.1 server
10.37.1.150 client
10.37.1.149 uk30530


hosts.allow
~~~~~~~
#
# hosts.allow This file describes the names of the hosts which are
# allowed to use the local INET services, as decided
# by the '/usr/sbin/tcpd' server.
#


hosts.deny
~~~~~~~
#
# hosts.deny This file describes the names of the hosts which are
# *not* allowed to use the local INET services, as decided
# by the '/usr/sbin/tcpd' server.
#
# The portmap line is redundant, but it is left to remind you that
# the new secure portmap uses hosts.deny and hosts.allow. In particular
# you should know that NFS uses portmap!


resolv.conf
~~~~~~~
nameserver 10.37.1.1


Please help, I don't have much hair left!

hotrodowner 06-04-2003 10:40 AM

you cann't ping a windows machine from linux? try turning on samba or using bind.

joadoor 06-04-2003 11:17 AM

with the windows machine names and IP addresses in my hosts file I can. but obviously this is "static" info and not "dynamically" updated by DNS / DHCP.

Is this what Samba takes care of?

If so, I have tinkered with Samba and managed to 'somehow' get to see the Linux Server from the Windows machine by typing "net view" but still couldn't ping it or see any of the shared folders I had setup.

I basically just took the sample smb.conf file and changed: workgroup = HOME
netbios name = SERVER

1. Is it a must for me to get Samba running 'before' I will be able ping using computer names and not their IP's

2. Is there any other settings that I need to change in the smb.conf file for my setup.

3. How do I get local (ie not internet) LAN hostnames to work via DNS?

I have read numerous HOW-TO's on DNS / Samba etc and tried many different settings but nothing really helped.

hotrodowner 06-04-2003 12:12 PM

1) comment out the netbios name entry in /etc/samba/smb.conf
2) add "server string = SERVER"
3) type as root "nmbd start"

Then try to "ping SERVER" from the game pc like you wanted.

joadoor 06-04-2003 03:55 PM

thanks hotrodowner, i'll try that tomorrow at work on the test pc's and post back here!

joadoor 06-05-2003 08:42 AM

nah, still didn't work.

can still "ping 10.37.1.1" but not "ping server"

do i need to go down the route of setting up a 'zone' file as it looks abit on the unfriendly-newbie side

on a positive note (sort of) i have however manged to get samba working. i can see it in network neighbourhood and with 'net view' but still cannot map to it or click on it. just says:

"\\server is not available"
"the computer or sharename could not be found"

:confused:

theres something obvious that i'm missing but can't for the life of me see it.

hotrodowner 06-05-2003 08:55 AM

The reason you can see it, but not access it is because we only turned on the netbios naming system. If you want true smb networking, you need to run:

"service smb start"

You are trying to ping from windows to linux, right? Why do you just want to ping anyways?

joadoor 06-05-2003 09:24 AM

i am following a tutorial on how to get samba setup and working and one of the steps is to ensure you can ping the server, which i can't.

i want to get DNS setup correctly (as it is in windows) so that later on i can get RH connected to DSL and beyond.

i have also got the full samba service running, changed settings in smb.conf and then run service smb restart. changes that i do (like server string = bobs elephant) appear on the windows pc, but there must be a setting or .conf file that needs amending so that i can get through to the share.

hotrodowner 06-05-2003 10:32 AM

whats the setup look like? whats connected to what, and how is the dsl modem connected? does it use dhcp? if both computers are in the same workgroup, then you should be able to ping the server from windows, I dont know why it doesn't work. you shouldn't need a dns server for this setup <which would be overkill>.

joadoor 06-05-2003 11:04 AM

my setup is as per the original post:

---------------------

All PC's are using:
Workgroup = Home

DSL > Cable Modem > PC1 NIC#2
PC1 NIC#1 > Switch
PC2 NIC > Switch

PC1: Windows 2000 / RH9
~~~~~~~~~~~~~~~~~
Computer name: Server
IP Address #1: 10.37.1.1 (static) - LAN
IP Address #2: ISP assigned (dynamic) - WAN

Running: WinRoute as DHCP and DNS server
Also setup as Apache weserver, FTP server, email server etc.

PC2: Windows 2000
~~~~~~~~~~~~~
Computer name: GamesPC
IP Address: dhcp assigned from PC1's WinRoute - LAN

the above is all in windows (ie WinRoute, Apache etc)

I know that a full blown DNS server is probalby overkill on my small setup, but I like to learn these things. Don't like things I don't understand :rolleyes:


Hope the above makes sense ... a little.
BTW, thanks for your help so far.

hotrodowner 06-05-2003 11:18 AM

There are only two internet servers I havn't learned so far, thats email <pop3, imap, and smtp>, and dns.

I believe your trying to access /home/<username> on the linux machine from windows 2000, am I correct? If so, I can help you there too, I had lots of trouble from that at first, then I got the hang of it <after doing it over and over 50 times :) >.

Also, an easy way to make it ping is to add your server's ip info into c:\winnt\system32\drivers\etc\hosts <since your dhcp server probably doesn't give it a different ip address every time>

what clients and protocols do you have on your game machine?

joadoor 06-05-2003 11:21 AM

yeah, i want to get the hang of it as well :) but getting frustrated now. I have put

127.0.0.1 localhost
10.37.1.1 server

into the hosts file on the Windows PC, but

a. is still won't "ping server"
b. surely this is the job of DHCP/DNS. I shouldn't have to maintain the hosts files on the connected boxes.

hotrodowner 06-05-2003 11:50 AM

Usually I play with things till something works. Just the dhcp server might make it work, an example /etc/dhcp.conf file is as follows (you might watn to change the values to what winroute uses, I put in the ones I figure you might use):

ddns-update-style none;
subnet 10.0.0.0 netmask 255.0.0.0 {
# default gateway
option routers 10.0.0.1;
option subnet-mask 255.0.0.0;

option domain-name "test.tst";
option domain-name-servers <ip of your isp's dns server>;

range dynamic-bootp 10.0.0.1 10.254.254.254;
default-lease-time 21600;
max-lease-time 43200;
}

<NOTE: dhcp servers give ipaddress from the last number to the first, example:
10.4.4.4 gets assigned after 10.4.4.5>

joadoor 06-06-2003 11:05 AM

thanks mate, i have been tinkering with dhcpd.conf and the windows pc all day - not got much work done but hey, i'm leaving soon :)

anyway, this is my current dhcpd.conf file:

# Sample /usr/sbin/dhcpd.conf
# (add your comments here)

#ddns-update-style ad-hoc;
ddns-update-style none;

subnet 10.37.1.0 netmask 255.255.255.0 {
range dynamic-bootp 10.37.1.2 10.37.1.254;

#default gateway
option routers 10.37.1.1;

option subnet-mask 255.255.255.0;
#option broadcast-address 10.37.1.255;

option domain-name "server";
option domain-name-servers 10.37.1.1;

default-lease-time 21600;
max-lease-time 43200;

}



but it still won't ping the server :( :confused:

i have now started tinkering with the Red Hat DNS config program
RedHat Start ~ System Settings ~ Server settings ~ Domain Name Service
which puts entries into 'zone' files, but am wading in deep water without any wellies on!!
Help!

hotrodowner 06-06-2003 01:56 PM

I really dont know much about dns, you said you were using a gui, so maybe you should just lookup how dns works, learn the "lingo" and then just play with it. If you got samba working, they should have pinged. Do you have netbios over tcp enabled in the tcp/ip properties in windows?


All times are GMT -5. The time now is 12:37 PM.