URN Logo
UNIX Resources » Linux » Linux Forum » Linux Networking » Page.56 » My hostname not being registered via DHCP
announcement The content of this page is collected from Linux Forum, All copyrights and other associated rights are reserved by the original authors of the articles.
Resources
China Linux Forum(finished)
Linux Forum(finished)
FreeBSD China(finished)
linuxforum.com
  LinuxForum General Chat
  Linux Advocacy
  LinuxForum Polls
  Introductions
  Linux Kernel Support
  Patch Management
  Development Release
  Linux Programming
  Linux Security
  Linux Software
  Linux Hardware Problems
    Linux Video Problems
    Linux Sound Problems
  Linux Networking Support
  Linux Printing Support
  Linux Human Interface Devices Support
  Linux Data Storage Support
  Linux Applications Support
  Linux Installation Support
  Linux Laptops Support
  Linux Motherboard, Chipsets, CPU, Memory
  Miscellaneous
  Debian Linux Support
  Ubuntu Linux Support
  LiveCD Discussions
  Gentoo Linux Support
  Mandrake Linux Support
  Redhat / Fedora Linux Support
  Slackware Linux Support
  SuSE Linux Support
  CentOS Linux Support
  Linux Web Servers
  Linux DNS Servers
  Linux Database Servers
  Linux Email Servers
  Linux FTP Servers
  Linux Squid Proxy Server
  Linux Samba Help
  Linux cPanel Help
  Linux Ensim Help
  Linux Plesk Help
  Linux Webmin / Usermin Help
  Qmail Toaster Help
  Linux Games
  Windows Game Emulation
  Linux Discussions
  General Linux Discussions
  Red Hat Linux Discussions
  More Red Hat Linux Discussions
  Mandrake Linux Discussions
  Slackware Linux Discussions
  SuSE Linux Discussions
  Debian Discussions
  Samba Help
  Linux Security
  Linux Networking
  Gentoo Help
  Operating System Rant Forum
  Hardware Rants
   
My hostname not being registered via DHCP
Subject: My hostname not being registered via DHCP
Author: UncleStoner    Posted: 2005-01-31 17:42:19    Length: 1,462 byte(s)
[Original] [Print] [Top]
Hello,
I'm a Linux newbie.
I have just installed Redhat Linux 8.0.  I'm using DHCP to get a IP
address, DNS servers, etc.  That's all working fine.  The problem is,
the hostname of my linux box isn't being registered with DNS by DHCP.
The hostname of my Linux box is "seratonin", and I can't ping it from
other machines on my network (either by "seratonin" or
"seratonin.mycompany.com".

Below are all the setup files that might be relevant

/etc/hosts:
127.0.0.1   localhost.localdomain   localhost   seratonin

/etc/resolv.conf
; generated by /sbin/dhclient-script
search mycompany.com
nameserver 10.9.3.23
nameserver 10.9.3.22

/etc/sysconfig/network
NETWORKING=yes
HOSTNAME=seratonin.mycompany.com

/etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE=eth0
BOOTPROTO=dhcp
ONBOOT=yes
USERCTL=no
PEERDNS=yes
TYPE=Ethernet
DHCP_HOSTNAME=3D"seratonin.mycompany.com"

Note that for DHCP_HOSTNAME above I've tried "seratonin",
"seratonin.mycompany.com", 3D"seratonin", and leaving it out.  I don't
know what the deal with the '3D' is, I saw it suggested somewhere.

Can anyone help me?  It seems like it should be a pretty common
configuration.

Thanks,
Dave

[Original] [Print] [Top]
Subject: My hostname not being registered via DHCP
Author: Tommy Reynolds    Posted: 2005-01-31 18:03:29    Length: 3,440 byte(s)
[Original] [Print] [Top]
On Mon, 31 Jan 2005 14:42:19 -0800, UncleStoner wrote:

QUOTE
I'm a Linux newbie.

Hello, noob.

QUOTE
I have just installed Redhat Linux 8.0.

First mistake.  Install something reasonably current such as Fedora
Core 3; don't even bother with RH9 unless you have mitigating
circumstances.

QUOTE
I'm using DHCP to get a IP address, DNS servers, etc.

The problem is, the hostname of my linux box isn't being registered
with DNS by DHCP.

Well, that's because DHCP doesn't register your hostname with DNS --
the DHCP server assigns the name and maybe tells DNS about it.

QUOTE
/etc/hosts:
127.0.0.1   localhost.localdomain   localhost   seratonin

IP address 127.0.0.1 is not going to be accessible from _any_ machine
other than yours; it's not a network address: it's a local address.
 
QUOTE
/etc/sysconfig/network
NETWORKING=yes
HOSTNAME=seratonin.mycompany.com

This HOSTNAME setting is so that your local machine knows its name so
you can get pretty shell prompts and the like.
 
QUOTE
/etc/sysconfig/network-scripts/ifcfg-eth0 DEVICE=eth0
BOOTPROTO=dhcp
ONBOOT=yes
USERCTL=no
PEERDNS=yes
TYPE=Ethernet
DHCP_HOSTNAME=3D"seratonin.mycompany.com"

Lose the '3D': this ain't no steenkin' URL.  This sets the name
_your_ machine thinks it is when using this NIC.  Still have nothing
to give to DNS.

QUOTE
Can anyone help me?  It seems like it should be a pretty common
configuration.

The fault lies in you DHCP server, not in your local machine.  You
can set it up to provide your IP address, as you have, but to also
provide the DNS info:

host seratonin.mycompany.com   {
   fixed-address xxx.xxx.xxx.xxx;
}

Check the "/etc/dhcpd.conf" file on the DHCP server.  Use

$ man dhcp.conf

for more details.

HTH.

[Original] [Print] [Top]
Subject: My hostname not being registered via DHCP
Author: prg    Posted: 2005-01-31 18:13:09    Length: 3,215 byte(s)
[Original] [Print] [Top]
UncleStoner wrote:
QUOTE
Hello,
I'm a Linux newbie.
I have just installed Redhat Linux 8.0.  I'm using DHCP to get a IP
address, DNS servers, etc.  That's all working fine.  The problem is,
the hostname of my linux box isn't being registered with DNS by DHCP.
The hostname of my Linux box is "seratonin", and I can't ping it from
other machines on my network (either by "seratonin" or
"seratonin.mycompany.com".

Unless it's an IP/domain you registered, your ISP most likely
automatically generates a name like 216-34-isps-subnet-domain.  The ISP
updates DNS servers and can't be bothered with naming conflicts unless
you pay fer 'em.

QUOTE
Below are all the setup files that might be relevant

/etc/hosts:
127.0.0.1 localhost.localdomain localhost seratonin

/etc/resolv.conf
; generated by /sbin/dhclient-script
search mycompany.com
nameserver 10.9.3.23
nameserver 10.9.3.22

/etc/sysconfig/network
NETWORKING=yes
HOSTNAME=seratonin.mycompany.com

This name only useful on localhost and on your LAN only if _you_
provide some kind of name resolution -- eg., /etc/hosts files or
dnsmasq or running bind/named on your LAN.

QUOTE
/etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE=eth0
BOOTPROTO=dhcp
ONBOOT=yes
USERCTL=no
PEERDNS=yes
TYPE=Ethernet
DHCP_HOSTNAME=3D"seratonin.mycompany.com"

Just another form of client-id.  The ISP likely ignores it in favor of
your MAC address.

QUOTE
Note that for DHCP_HOSTNAME above I've tried "seratonin",
"seratonin.mycompany.com", 3D"seratonin", and leaving it out.  I
don't
know what the deal with the '3D' is, I saw it suggested somewhere.

If you want to see the name the ISP is assigning to your computer you
will have to _not_ assign a name yourself.  The name you are assigned
will be almost guaranteed ugly, very ugly, I mean really very ugly --
and will vary as/if your IP changes.

If you want a static IP and registered domain name, you will have to
buy it from your ISP or someone they work with.  dyndns may provide a
way for you to have a publicly accessible name if you need that.  See:
www.dyndns.org/
..
hth
prg
email above disabled

[Original] [Print] [Top]
Subject: My hostname not being registered via DHCP
Author: UncleStoner    Posted: 2005-02-01 08:33:24    Length: 2,790 byte(s)
[Original] [Print] [Top]
Thanks for taking the time to reply.

QUOTE
I have just installed Redhat Linux 8.0.

First mistake.  Install something reasonably current such as Fedora
Core 3; don't even bother with RH9 unless you have mitigating
circumstances.

I've got circumstances.  I'm working on an appliance product that runs
on RH8, and the development environment is also RH8  (maybe I could use
a different platform for development, but others on the project use RH8
and since I'm new to both the project and to Linux, I just want to
follow the herd for now).

QUOTE
Well, that's because DHCP doesn't register your hostname with DNS --
the DHCP server assigns the name and maybe tells DNS about it.

Maybe I'm using the word "register" to casually.  I'm not sure what you
call it, but isn't it possible to get DHCP to co-operate with DNS in
order to make my DHCP client's hostname resolvable?

QUOTE
/etc/hosts:
127.0.0.1   localhost.localdomain   localhost   seratonin

IP address 127.0.0.1 is not going to be accessible from _any_ machine
other than yours; it's not a network address: it's a local address.

Yeah, that I acutally knew, I just included it for completeness.

QUOTE
The fault lies in you DHCP server, not in your local machine.  You
can set it up to provide your IP address, as you have, but to also
provide the DNS info:

The problem is I don't control the DHCP server on the network.  I
suspect it's a Windows DHCP server.

My Windows boxes have names I assign them, and they somehow make those
names resolvable on the network.  I assume they do this in co-operation
with the DHCP server.  However, maybe they are using some other
mechanism that is Windows-specific (blech), and so not available to
Linux.

Maybe this is all a fool's errand?

[Original] [Print] [Top]
Subject: My hostname not being registered via DHCP
Author: UncleStoner    Posted: 2005-02-01 08:38:11    Length: 870 byte(s)
[Original] [Print] [Top]
Thanks for taking the time to reply.

I should have provided more high-level detail in my original post.  I'm
actually on a corporate LAN, which hosts mostly windows boxes and whose
various services (DHCP, DNS, etc) are presumably provided by Windows as
well.

I'm one of the few people in this environment trying to get a Linux box
up.  My Windows boxes all have hostnames that I assign them, and they
all use DHCP.  Somehow, they are able to get their names resolvable on
the network.  I assumed that they did this by sending their names to
the DHCP server when they requested an IP (and all the other stuff a
DHCP client requests from a DHCP server), and then the DHCP server did
some magic, in conjunction with the DNS server, to make those hostnames
resolvable.

[Original] [Print] [Top]
Subject: My hostname not being registered via DHCP
Author: Captain Dondo    Posted: 2005-02-01 09:11:13    Length: 1,356 byte(s)
[Original] [Print] [Top]
On Tue, 01 Feb 2005 05:33:24 -0800, UncleStoner wrote:


QUOTE
My Windows boxes have names I assign them, and they somehow make those
names resolvable on the network.  I assume they do this in co-operation
with the DHCP server.  However, maybe they are using some other
mechanism that is Windows-specific (blech), and so not available to
Linux.

Maybe this is all a fool's errand?

From my limited experience, windows DHCP is either 'broken' or 'extended',
depending on which side of the fence you're on.

Windows boxes do not accept the hostname assigned by DHCP; they completely
ignore it.  This wreaks havoc with my DHCP setup, which uses DDNS (dynamic
DNS) to do exactly what you are trying to do.

It would not surprise me if MS 'extended' the protocol to include the
ability for the client to tell the server its name, which would then be
added to DNS, inlcuding its FQDN.  The pitfalls of this are obvious....

I don't know how to break (pardon, extend) the linux dhcp client to work
the same way as windows....

[Original] [Print] [Top]
Subject: My hostname not being registered via DHCP
Author: Tommy Reynolds    Posted: 2005-02-01 10:06:54    Length: 617 byte(s)
[Original] [Print] [Top]
On Tue, 01 Feb 2005 05:33:24 -0800, UncleStoner wrote:

QUOTE
Maybe I'm using the word "register" to casually.  I'm not sure what you
call it, but isn't it possible to get DHCP to co-operate with DNS in
order to make my DHCP client's hostname resolvable?

Ah, the larger picture emerges.  You need to get the IT gang to add
an entry into their WINS server.

HTH.

[Original] [Print] [Top]
Subject: My hostname not being registered via DHCP
Author: prg    Posted: 2005-02-01 10:12:52    Length: 2,272 byte(s)
[Original] [Print] [Top]
UncleStoner wrote:
QUOTE
Thanks for taking the time to reply.

I should have provided more high-level detail in my original post.
I'm
actually on a corporate LAN, which hosts mostly windows boxes and
whose
various services (DHCP, DNS, etc) are presumably provided by Windows
as
well.

I'm one of the few people in this environment trying to get a Linux
box
up.  My Windows boxes all have hostnames that I assign them, and they
all use DHCP.  Somehow, they are able to get their names resolvable
on
the network.  I assumed that they did this by sending their names to
the DHCP server when they requested an IP (and all the other stuff a
DHCP client requests from a DHCP server), and then the DHCP server
did
some magic, in conjunction with the DNS server, to make those
hostnames
resolvable.

Ah-hah....;-)

So, you do have local dhcp/dns servers -- that's good for what you
want.

So, you are using Windows (W2K or W2K03?) for these servers -- that may
not be so good for what you want ;-)

Been some time since I've played with Windows dhcp/dns/wins running
things.

First thing that may cause a hiccup is how your LAN is setup -- NT or
AD domains -- and whether you're using WINS for Netbios name
resolution.  We'll ignore those for the moment, foolishly hoping we
won't have to make special provision for them.

This provides more succinct and clearer steps of how to set up your
hostname on Linux and provides RH/FC specific guidance (and others):
http://www.cpqlinux.com/hostname.html

Give these instructions a try and see how far it gets you.  Post again
with results if it's not a complete success.

You could also google something like this:
windows dhcp server host name
..
hth,
prg
email above disabled

[Original] [Print] [Top]
Subject: My hostname not being registered via DHCP
Author: Frank Sweetser    Posted: 2005-02-01 16:50:41    Length: 893 byte(s)
[Original] [Print] [Top]
["Followup-To:" header set to comp.os.linux.networking.]
UncleStoner [unclestoner@hotmail.com] wrote:
QUOTE
I'm one of the few people in this environment trying to get a Linux box
up.  My Windows boxes all have hostnames that I assign them, and they
all use DHCP.  Somehow, they are able to get their names resolvable on
the network.  I assumed that they did this by sending their names to

That would be Active Directory.  A few web searches should give you the
basic architecture.

--
Frank Sweetser fs at wpi.edu
WPI Network Engineer
GPG fingerprint = 6174 1257 129E 0D21 D8D4  E8A3 8E39 29E3 E2E8 8CEC

[Original] [Print] [Top]
Subject: My hostname not being registered via DHCP
Author: Jim Patterson    Posted: 2005-02-02 23:42:46    Length: 2,523 byte(s)
[Original] [Print] [Top]
UncleStoner wrote:
QUOTE
Thanks for taking the time to reply.

I should have provided more high-level detail in my original post.  I'm
actually on a corporate LAN, which hosts mostly windows boxes and whose
various services (DHCP, DNS, etc) are presumably provided by Windows as
well.

I'm one of the few people in this environment trying to get a Linux box
up.  My Windows boxes all have hostnames that I assign them, and they
all use DHCP.  Somehow, they are able to get their names resolvable on
the network.  I assumed that they did this by sending their names to
the DHCP server when they requested an IP (and all the other stuff a
DHCP client requests from a DHCP server), and then the DHCP server did
some magic, in conjunction with the DNS server, to make those hostnames
resolvable.

DHCP and DNS is not likely how the Windows machines are discovering each
other; it's usuall based on NETBIOS naming (though Windows does use DNS
as well).

You should be able to do the same from your RH8 box wit a little work:

- Run SAMBA on your RH8 box. Just running the SAMBA server should be
enough to get it to broadcast your hostname so other Windows machines
will see it. However, you may need to do some configuration depending on
how your LAN is set up (check out the Samba docs or http://www.samba.org
for info).

- Set up your own name resolution mechanism to check "wins". You can do
this by editing the file /etc/nsswitch.conf . Look for a line like this:

   hosts:      files dns

and add the token "wins" to the end e.g.

   hosts:      files dns wins

At least, that works on FC3 and slackware 10. I don't know about Redhat
8. In any case, what it should do is add a "wins" resolver to the
resolver list for hostnames, so if the name resolver doesn't find a
network hostname in the hosts file or from DNS it will try WINS next.
You can check the man page for nsswitch.conf for more info.

Hope this helps!


Jim P.
Ottawa

[Original] [Print] [Top]
« Previous thread
dumping internet packets
Linux Networking
Page. 56
Next thread »
Mobile VPn Client
     

Copyright © 2007 UNIX Resources Network, All Rights Reserved.      About URN | Privacy & Legal | Help | Contact us
Powered by FreeBSD    webmaster: webmaster@unixresources.net
This page created on 2007-08-01 13:13:18, cost 0.034018039703369 ms.