LinuxQuestions.org
LinuxAnswers - the LQ Linux tutorial section.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices



Reply
 
Search this Thread
Old 06-04-2003, 09:51 AM   #1
joadoor
Member
 
Registered: Apr 2002
Location: Clevedon, UK
Distribution: SUSE 8.2, 9.2, 10.0 OSS
Posts: 57

Rep: Reputation: 15
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!
 
Old 06-04-2003, 11:40 AM   #2
hotrodowner
Member
 
Registered: Mar 2002
Distribution: Too many to count
Posts: 368

Rep: Reputation: 30
you cann't ping a windows machine from linux? try turning on samba or using bind.
 
Old 06-04-2003, 12:17 PM   #3
joadoor
Member
 
Registered: Apr 2002
Location: Clevedon, UK
Distribution: SUSE 8.2, 9.2, 10.0 OSS
Posts: 57

Original Poster
Rep: Reputation: 15
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.
 
Old 06-04-2003, 01:12 PM   #4
hotrodowner
Member
 
Registered: Mar 2002
Distribution: Too many to count
Posts: 368

Rep: Reputation: 30
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.
 
Old 06-04-2003, 04:55 PM   #5
joadoor
Member
 
Registered: Apr 2002
Location: Clevedon, UK
Distribution: SUSE 8.2, 9.2, 10.0 OSS
Posts: 57

Original Poster
Rep: Reputation: 15
thanks hotrodowner, i'll try that tomorrow at work on the test pc's and post back here!
 
Old 06-05-2003, 09:42 AM   #6
joadoor
Member
 
Registered: Apr 2002
Location: Clevedon, UK
Distribution: SUSE 8.2, 9.2, 10.0 OSS
Posts: 57

Original Poster
Rep: Reputation: 15
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"



theres something obvious that i'm missing but can't for the life of me see it.
 
Old 06-05-2003, 09:55 AM   #7
hotrodowner
Member
 
Registered: Mar 2002
Distribution: Too many to count
Posts: 368

Rep: Reputation: 30
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?
 
Old 06-05-2003, 10:24 AM   #8
joadoor
Member
 
Registered: Apr 2002
Location: Clevedon, UK
Distribution: SUSE 8.2, 9.2, 10.0 OSS
Posts: 57

Original Poster
Rep: Reputation: 15
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.
 
Old 06-05-2003, 11:32 AM   #9
hotrodowner
Member
 
Registered: Mar 2002
Distribution: Too many to count
Posts: 368

Rep: Reputation: 30
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>.
 
Old 06-05-2003, 12:04 PM   #10
joadoor
Member
 
Registered: Apr 2002
Location: Clevedon, UK
Distribution: SUSE 8.2, 9.2, 10.0 OSS
Posts: 57

Original Poster
Rep: Reputation: 15
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


Hope the above makes sense ... a little.
BTW, thanks for your help so far.
 
Old 06-05-2003, 12:18 PM   #11
hotrodowner
Member
 
Registered: Mar 2002
Distribution: Too many to count
Posts: 368

Rep: Reputation: 30
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?

Last edited by hotrodowner; 06-05-2003 at 12:21 PM.
 
Old 06-05-2003, 12:21 PM   #12
joadoor
Member
 
Registered: Apr 2002
Location: Clevedon, UK
Distribution: SUSE 8.2, 9.2, 10.0 OSS
Posts: 57

Original Poster
Rep: Reputation: 15
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.
 
Old 06-05-2003, 12:50 PM   #13
hotrodowner
Member
 
Registered: Mar 2002
Distribution: Too many to count
Posts: 368

Rep: Reputation: 30
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>

Last edited by hotrodowner; 06-05-2003 at 12:51 PM.
 
Old 06-06-2003, 12:05 PM   #14
joadoor
Member
 
Registered: Apr 2002
Location: Clevedon, UK
Distribution: SUSE 8.2, 9.2, 10.0 OSS
Posts: 57

Original Poster
Rep: Reputation: 15
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

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!
 
Old 06-06-2003, 02:56 PM   #15
hotrodowner
Member
 
Registered: Mar 2002
Distribution: Too many to count
Posts: 368

Rep: Reputation: 30
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?
 
  


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 03:47 AM
Cannot ping outside hostnames PeterLarsson Linux - Networking 1 08-05-2005 01:37 AM
Can't ping hostnames Nox UK Linux - Networking 3 04-19-2005 04:07 PM
Client (windows) can't ping hostnames HKDude Linux - Networking 5 05-12-2004 07:14 PM
Can ping MyDNS1.FQDN and IPs but no other hostnames? leecason Linux - Networking 3 10-06-2003 04:01 PM


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