Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game. |
| Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
 |
GNU/Linux Basic Guide
This 255-page guide will provide you with the keys to understand the philosophy of free software, teach you how to use and handle it, and give you the tools required to move easily in the world of GNU/Linux. Many users and administrators will be taking their first steps with this GNU/Linux Basic guide and it will show you how to approach and solve the problems you encounter.
Click Here to receive this Complete Guide absolutely free. |
|
 |
05-09-2003, 10:42 PM
|
#1
|
|
Member
Registered: Nov 2002
Location: NZ
Distribution: freeBSD, slack
Posts: 156
Rep:
|
hostname problem
i am setting up samba, i can ping windows to linux ip but not hostname. on linux to windows i can ping ip and hostname. have i changed the right files? the error i get when trying to enter linux through windows is "cant find path" so im thinking it might have something to do with the hostname?????????? the hostname is changed so far as i can tell. except when i try to ping the hostname. i read somewhere to change the resolv.conf but still the same error
thanks
does redhat 8 have firewall setting that i have to change???
i have just ping the old hostname and it timed out?? i must have not changed the hostname properly? anyone know the files that i have to modify for redhat 8
Last edited by bm1; 05-09-2003 at 10:59 PM.
|
|
|
|
05-09-2003, 11:57 PM
|
#2
|
|
Guru
Registered: Jun 2001
Location: South Alabama
Distribution: Fedora / RedHat / SuSE
Posts: 7,154
Rep:
|
the hostname is set by the command..
hostname name
pinging by hostname requires the dns server your using to know the address of the name your pinging unless your pinging locally.
If you don't want to use dns you will need to add the hostnames and ip addresses to the files /etc/resolv.conf in linux, and hosts in windows .
|
|
|
|
05-10-2003, 12:06 AM
|
#3
|
|
Member
Registered: Nov 2002
Location: NZ
Distribution: freeBSD, slack
Posts: 156
Original Poster
Rep:
|
my network is connected through a cross over cable( only 2 comps) im not sure what type of network it is called. is it locally?
im not sure how linux dns works but its pinging my windows comp (hostname and ip). my windows comp cant ping my linux comp (hostname) but can ping the ip.
i left the dns blank in windows cause i dont know how to set it. is this the problem? and how do i set it?
thanks
Last edited by bm1; 05-10-2003 at 12:09 AM.
|
|
|
|
05-10-2003, 01:21 AM
|
#4
|
|
Guru
Registered: Jun 2001
Location: South Alabama
Distribution: Fedora / RedHat / SuSE
Posts: 7,154
Rep:
|
you can run bind on the linux box and use it for dns, or just add the hosts to the hosts file
when I say locally I mean on the box named rufus type this
ping rufus
|
|
|
|
05-10-2003, 01:57 AM
|
#5
|
|
Member
Registered: Nov 2002
Location: NZ
Distribution: freeBSD, slack
Posts: 156
Original Poster
Rep:
|
if i want windows to recognise the hostname of my linux comp. could i just add the linux comp ip address in the dns text box for winxp? or does the dns have to be something different. i just want windows to recognise the hostname of my linux comp.
|
|
|
|
05-10-2003, 09:05 PM
|
#6
|
|
Guru
Registered: Jun 2001
Location: South Alabama
Distribution: Fedora / RedHat / SuSE
Posts: 7,154
Rep:
|
no you add it to your hosts file
dns must have a dns server
|
|
|
|
05-11-2003, 02:03 AM
|
#7
|
|
Member
Registered: Nov 2002
Location: NZ
Distribution: freeBSD, slack
Posts: 156
Original Poster
Rep:
|
my hosts file is
127.0.0.1 bmlinux localhost.localdomain localhost
192.168.1.2 bmlinux
is there something wrong with this /etc/hosts file
i have also created a file called /etc/hostname which has
bmlinux.localdomain
i have also changed /etc/sysconfig/network to
HOSTNAME=bmlinux.localdaomain
can you see anything i have done wrong????
thanks
Last edited by bm1; 05-11-2003 at 02:05 AM.
|
|
|
|
05-11-2003, 05:45 PM
|
#8
|
|
Guru
Registered: Jun 2001
Location: South Alabama
Distribution: Fedora / RedHat / SuSE
Posts: 7,154
Rep:
|
That's not what I meant.
For windows to access linux by name (I thought that was the problem) on the windows machine without a valid dns entry you need to add the linux computers ip address and hostname to the hosts file
It needs to be in the path, the most common place to put it is in c:\hosts or c:\windows\hosts
see c:\windows\hosts.sam for a sample
|
|
|
|
05-12-2003, 05:34 AM
|
#9
|
|
Member
Registered: Nov 2002
Location: NZ
Distribution: freeBSD, slack
Posts: 156
Original Poster
Rep:
|
i found a file on windows called c:\WINDOWS\system32\drivers\etc
# Copyright (c) 1993-1999 Microsoft Corp.
#
# This is a sample HOSTS file used by Microsoft TCP/IP for Windows.
#
# This file contains the mappings of IP addresses to host names. Each
# entry should be kept on an individual line. The IP address should
# be placed in the first column followed by the corresponding host name.
# The IP address and the host name should be separated by at least one
# space.
#
# Additionally, comments (such as these) may be inserted on individual
# lines or following the machine name denoted by a '#' symbol.
#
# For example:
#
# 102.54.94.97 rhino.acme.com # source server
# 38.25.63.10 x.acme.com # x client host
127.0.0.1 localhost
192.168.1.2 bmlinux.localdomain
i added bmlinux.localdomain is this correct??
thanks
|
|
|
|
05-12-2003, 06:08 AM
|
#10
|
|
Guru
Registered: Jun 2001
Location: South Alabama
Distribution: Fedora / RedHat / SuSE
Posts: 7,154
Rep:
|
you can use that name now,
try this
ping bmlinux.localdomain
|
|
|
|
05-12-2003, 06:12 AM
|
#11
|
|
Member
Registered: Nov 2002
Location: NZ
Distribution: freeBSD, slack
Posts: 156
Original Poster
Rep:
|
thanks heaps its finally working. yeah(sigh of relief). i have a different prob now. and i posted it in software. just keep eliminating until theres no more probs. thanks david
|
|
|
|
05-12-2003, 02:14 PM
|
#12
|
|
Guru
Registered: Jun 2001
Location: South Alabama
Distribution: Fedora / RedHat / SuSE
Posts: 7,154
Rep:
|
cool
your welcome
|
|
|
|
| Thread Tools |
Search this Thread |
|
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -5. The time now is 11:30 AM.
|
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|