LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 06-13-2004, 02:46 PM   #1
degraffenried13
Member
 
Registered: Sep 2003
Posts: 228

Rep: Reputation: 30
no hostname on router


Hello,

I am trying to set up a network between my linux computer and my windows 95 computer. I have many problems at this point, but am learning. One question I have is that my linux computer was name localhost.localdomain adn I renamed the hostname to mylinuxpc because when I look at my router I see the hostname for the 95 computer, but not the linux computer. I thought maybe changing the name would help, but it hasn't. I am wondering if this is one of my problems. I don't know how the router, which is a D-Link DI-205, gets the hostname from the computer or how the computer sends out the name, but is there a file I need to change in linux to fix this? Any ideas?

thanks
 
Old 06-13-2004, 03:10 PM   #2
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 914Reputation: 914Reputation: 914Reputation: 914Reputation: 914Reputation: 914Reputation: 914Reputation: 914
No ideas, just questions :)

Is that router using DHCP for the boxes, if so,
is the Linux machine getting a lease?


Cheers,
Tink
 
Old 06-13-2004, 03:34 PM   #3
degraffenried13
Member
 
Registered: Sep 2003
Posts: 228

Original Poster
Rep: Reputation: 30
Yeah that is whyI am a bit confused. It is using DHCP, and both computers are getting a lease with their own IP, but the 95 computer shows its hostname on the router and the linux box doesn't.

thanks
 
Old 06-13-2004, 04:53 PM   #4
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 914Reputation: 914Reputation: 914Reputation: 914Reputation: 914Reputation: 914Reputation: 914Reputation: 914
In this case run your net configuration again, dhcpd, dhclient
and pump all allow you to send a hostname to the dhcp server.

If you were running Slack you probably find it odd that you
need to set the hostname twice ;)


Cheers,
Tink
 
Old 06-13-2004, 05:35 PM   #5
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 678Reputation: 678Reputation: 678Reputation: 678Reputation: 678Reputation: 678
Look in the manpage for your dhcp client, and it's set up file if it has a seperate man page. An entry will tell it to supply the host name to the dhcp server. I don't know which client slackware uses. On my Mandrake linux system, the Linksys router does display the host-name of the computer.
 
Old 06-14-2004, 06:14 PM   #6
degraffenried13
Member
 
Registered: Sep 2003
Posts: 228

Original Poster
Rep: Reputation: 30
here is what I found when I locate dhcp:

/usr/bin/kpac_dhcp_helper
/usr/share/doc/iproute-2.4.7/examples/dhcp-client-script
/usr/share/man/man5/dhcp-options.5.gz
/var/lib/dhcp
/var/lib/dhcp/dhclient-eth0.leases
/etc/log.d/conf/services/dhcpd.conf
/etc/log.d/scripts/services/dhcpd

I looked at each of these files and didn't find anything relating to a computer name. The first three won't run, the lases one describes what lease information I have been give and the dhcpd and the conf file are very bare. Here is the dhcpd.conf file

###########################################################################
# $Id: dhcpd.conf,v 1.2 2002/10/12 02:08:09 kirk Exp $
###########################################################################

# You can put comments anywhere you want to. They are effective for the
# rest of the line.

# this is in the format of <name> = <value>. Whitespace at the beginning
# and end of the lines is removed. Whitespace before and after the = sign
# is removed. Everything is case *insensitive*.

# Yes = True = On = 1
# No = False = Off = 0

Title = "dhcpd"

# Which logfile group...
LogFile = messages

# Only give lines pertaining to the dhcpd service...
*OnlyService = dhcpd
*RemoveHeaders

########################################################
# This was written and is maintained by:
# Kirk Bauer <kirk@kaybee.org>
#
# Please send all comments, suggestions, bug reports,
# etc, to kirk@kaybee.org.
########################################################


Which doesn't look like I can add anything that would help. Any other suggestions? The only file that looks promising is dhclient.conf.5.gz, I assume this is the file that dhclient is looking into, but again I find only one place where it says send host-name, but if that is true it is sending andare.fugue.com, which doesn't show up. I will post this file if you think it will help. Okay, I will shut up and listen now.

thanks

PS I am running redhat not slack
 
Old 06-14-2004, 09:59 PM   #7
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 914Reputation: 914Reputation: 914Reputation: 914Reputation: 914Reputation: 914Reputation: 914Reputation: 914
Quote:
Originally posted by degraffenried13
/usr/bin/kpac_dhcp_helper
/usr/share/doc/iproute-2.4.7/examples/dhcp-client-script
/usr/share/man/man5/dhcp-options.5.gz
/var/lib/dhcp
/var/lib/dhcp/dhclient-eth0.leases
/etc/log.d/conf/services/dhcpd.conf
/etc/log.d/scripts/services/dhcpd
Means that you have at least two clients installed, both
dhclient (which seems to be active given the entry in /var)
and dhcpd .... to configure dhclient have a look at /etc/dhclient.conf
(or where ever RH sticks is).


Quote:
PS I am running redhat not slack
Nobody is perfect ;}

Ego te absolvo, in nomine patris et filii et spirituus sancti. :}


Cheers,
Tink
 
Old 06-15-2004, 02:37 AM   #8
MS3FGX
LQ Guru
 
Registered: Jan 2004
Location: NJ, USA
Distribution: Slackware, Debian
Posts: 5,852

Rep: Reputation: 357Reputation: 357Reputation: 357Reputation: 357
On Slackware it is in rc.inet1:

Code:
# If your provider requires a DHCP hostname, uncomment and edit below:
#DHCP_HOSTNAME="CCHOSTNUM-A"
Perhaps Red Hat does it in a similar way?
 
Old 06-15-2004, 04:16 AM   #9
jpostma
Member
 
Registered: Jun 2003
Location: Alphen ad Rijn -- The Netherlands
Distribution: Fedora Core 2 - Slackware 12
Posts: 119

Rep: Reputation: 15
I your hostname couldn't found your hostname will probably a . (dot). Add to your /etc/hosts the alias name . (dot).
127.0.0.1 localhost.localdomain localhost .

Another solution is to change the nameservers. I think that your nameservers are 192.168.1.1. Change these to the nameservers of your ISP. I haven't tested it yet.
 
Old 06-15-2004, 03:28 PM   #10
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 914Reputation: 914Reputation: 914Reputation: 914Reputation: 914Reputation: 914Reputation: 914Reputation: 914
Quote:
Originally posted by jpostma
I your hostname couldn't found your hostname will probably a . (dot). Add to your /etc/hosts the alias name . (dot).
127.0.0.1 localhost.localdomain localhost .
Nope mate, the /etc/hosts is ONLY for local use... no matter what you
put there, it will NOT show on his router.

Quote:
Another solution is to change the nameservers. I think that your nameservers are 192.168.1.1. Change these to the nameservers of your ISP. I haven't tested it yet.
If his router doesn't pick up his hostname, what do you
think the chances of his ISP knowing about it are? :)



Cheers,
Tink
 
  


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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Strange hostname - Router Problem? logosys Linux - Networking 2 09-30-2005 02:54 PM
hostname setup for router RoughEdge Linux - Newbie 5 04-29-2004 10:16 AM
Unknown hostname on router ToTLaugher Linux - Networking 1 02-10-2004 04:04 PM
router not displaying hostname Robin01 Linux - Newbie 1 09-05-2003 10:33 PM
Router DHCP and Linux Hostname ccpirate Linux - Networking 30 07-05-2003 01:18 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 02:52 AM.

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
Open Source Consulting | Domain Registration