FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > CentOS > CentOS

 
 
LinkBack Thread Tools
 
Old 11-29-2011, 12:57 PM
Timothy Madden
 
Default DHCP_HOSTNAME in ifcfg-eth0

Hello

Is there a way for the dhcp client to send the current host name of the
machine when requesting a lease ?

Currently I have to include a line like
DHCP_HOSTNAME=appserver2
in my /etc/sysconfig/network-scripts/ifcfg-eth0, but I would like to
tell the dhcp client to just 'also send the hostname' and then the
client to get the current hostname itself, instead of having the name
hard-coded in the ifcfg-eth0 file.

I am trying to get my router to know the names of all my CentOS
machines, as currently I can access none of my CentOS machines by their
node name (I get 'unknown host' upon name lookup) and maybe it will help
if the router knows all the computer names.

Thank you,
Timothy Madden

_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 11-29-2011, 01:03 PM
Barry Brimer
 
Default DHCP_HOSTNAME in ifcfg-eth0

> Is there a way for the dhcp client to send the current host name of the
> machine when requesting a lease ?
>
> Currently I have to include a line like
> DHCP_HOSTNAME=appserver2
> in my /etc/sysconfig/network-scripts/ifcfg-eth0, but I would like to
> tell the dhcp client to just 'also send the hostname' and then the
> client to get the current hostname itself, instead of having the name
> hard-coded in the ifcfg-eth0 file.

For some reason I think you need to have "HOSTNAME=" in your
/etc/sysconfig/network file .. meaning make the variable blank. There is
also a dhclient option you can create in /etc/dhcp/dhclient-<int>.conf
something like send fqdn.fqdn <hostname> but usually you don't need that
if your use DHCP_HOSTNAME correctly ...

Barry
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 11-29-2011, 02:52 PM
Timothy Madden
 
Default DHCP_HOSTNAME in ifcfg-eth0

On 29.11.2011 15:57, Timothy Madden wrote:
> Hello
>
> Is there a way for the dhcp client to send the current host name of the
> machine when requesting a lease ?
>
> Currently I have to include a line like
> DHCP_HOSTNAME=appserver2
> in my /etc/sysconfig/network-scripts/ifcfg-eth0, but I would like to
> tell the dhcp client to just 'also send the hostname' and then the
> client to get the current hostname itself, instead of having the name
> hard-coded in the ifcfg-eth0 file.
>
> I am trying to get my router to know the names of all my CentOS
> machines, as currently I can access none of my CentOS machines by their
> node name (I get 'unknown host' upon name lookup) and maybe it will help
> if the router knows all the computer names.

Sorry for the wrong wording: what I want is the DHCP client to send the
hostname when a lease is requested, but I do not want to give dhclient
any explicit hostname to be sent.

I want dhclient to read the hostname from `hostname` or from
/etc/sysconfig/network or any other way, and use that name to send the
hostname to DHCP server.

Thank you,
Timothy Madden

_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 11-29-2011, 02:54 PM
Stephen Harris
 
Default DHCP_HOSTNAME in ifcfg-eth0

On Tue, Nov 29, 2011 at 05:52:06PM +0200, Timothy Madden wrote:
> > Currently I have to include a line like
> > DHCP_HOSTNAME=appserver2

> I want dhclient to read the hostname from `hostname` or from
> /etc/sysconfig/network or any other way, and use that name to send the
> hostname to DHCP server.

Can't you just do
DHCP_HOSTNAME=`hostname`
?

Many of the config files are just parsed as shell scripts, so this
might work :-)

--

rgds
Stephen
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos

Tue Nov 29 18:30:01 2011
Return-path: <kubuntu-devel-bounces@lists.ubuntu.com>
Envelope-to: tom@linux-archive.org
Delivery-date: Tue, 29 Nov 2011 17:56:22 +0200
Received: from chlorine.canonical.com ([91.189.94.204]:53619)
by s2.java-tips.org with esmtp (Exim 4.69)
(envelope-from <kubuntu-devel-bounces@lists.ubuntu.com>)
id 1RVQ2f-0008O7-UI
for tom@linux-archive.org; Tue, 29 Nov 2011 17:56:22 +0200
Received: from localhost ([127.0.0.1] helo=chlorine.canonical.com)
by chlorine.canonical.com with esmtp (Exim 4.71)
(envelope-from <kubuntu-devel-bounces@lists.ubuntu.com>)
id 1RVQ2b-0006fD-Ru; Tue, 29 Nov 2011 15:56:17 +0000
Received: from youngberry.canonical.com ([91.189.89.112])
by chlorine.canonical.com with esmtp (Exim 4.71)
(envelope-from <aurelien.gateau@canonical.com>) id 1RVQ2Z-0006ed-Ol
for kubuntu-devel@lists.ubuntu.com; Tue, 29 Nov 2011 15:56:15 +0000
Received: from amontsouris-158-1-47-71.w92-128.abo.wanadoo.fr ([92.128.70.71]
helo=[192.168.1.12]) by youngberry.canonical.com with esmtpsa
(TLS1.0HE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71)
(envelope-from <aurelien.gateau@canonical.com>) id 1RVQ2Z-00035q-K1
for kubuntu-devel@lists.ubuntu.com; Tue, 29 Nov 2011 15:56:15 +0000
Message-ID: <4ED5009E.6090601@canonical.com>
Date: Tue, 29 Nov 2011 16:56:14 +0100
From: =?ISO-8859-1?Q?Aur=E9lien_G=E2teau?=
<aurelien.gateau@canonical.com>
User-Agent: Mozilla/5.0 (X11; Linux x86_64;
rv:7.0.1) Gecko/20110929 Thunderbird/7.0.1
MIME-Version: 1.0
To: Kubuntu Developer Discussion <kubuntu-devel@lists.ubuntu.com>
Subject: Jonathan Riddell
References: <4ED3EE1A.9060508@canonical.com>
In-Reply-To: <4ED3EE1A.9060508@canonical.com>
X-Forwarded-Message-Id: <4ED3EE1A.9060508@canonical.com>
X-BeenThere: kubuntu-devel@lists.ubuntu.com
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: Kubuntu Developer Discussion <kubuntu-devel@lists.ubuntu.com>
List-Id: Kubuntu Developer Discussion <kubuntu-devel.lists.ubuntu.com>
List-Unsubscribe: <https://lists.ubuntu.com/mailman/options/kubuntu-devel>,
<mailto:kubuntu-devel-request@lists.ubuntu.com?subject=unsubscribe>
List-Archive: <https://lists.ubuntu.com/archives/kubuntu-devel>
List-Post: <mailto:kubuntu-devel@lists.ubuntu.com>
List-Help: <mailto:kubuntu-devel-request@lists.ubuntu.com?subject=help>
List-Subscribe: <https://lists.ubuntu.com/mailman/listinfo/kubuntu-devel>,
<mailto:kubuntu-devel-request@lists.ubuntu.com?subject=subscribe>
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain; charset="iso-8859-1"; Format="flowed"
Sender: kubuntu-devel-bounces@lists.ubuntu.com
Errors-To: kubuntu-devel-bounces@lists.ubuntu.com

Hi all,

Jonathan got in a car crash last week-end. Here is a forward of the mail =

Paul Sladen sent to our internal Canonical mailing-list.

---------------------------------------------------------------
Sujet: Jonathan Riddell
Date : Mon, 28 Nov 2011 20:24:58 +0000
De : Paul Sladen <sladen@canonical.com>

TL;DR: Jonathan Riddell is alive! Although slightly concussed. I've
spoken to him on IRC then video+Skype and he's back at his flat now.
(This is good).


Jonathan appears to have been in a car crash at some point on Saturday
(2011-11-26), probably in a supermarket car-park, possibly somewhere in
the bit of France that is in the Caribbean (Guadeloupe).

Calling his phone won't work for the moment; as the local Police have
it, along with (presumably) the remaining three-quarters of the
unfortunate car. The car might have been a "Peugeot/Renault sort of
thing" but he can't remember. First thing he asked me was "heard
anything of me?".

The concussion/memory loss applies to various other things in the same
timeframe too; and he's been ordered to keep one eye closed at all times
to try and cure the double vision. His parents and family are aware.

From the video I could see that he's got bandages on the left side,
which is apparently where the injuries were. He got out of hospital
sometime today (two days in), and seems to have woken up at somepoint on
the Sunday (out for a day?).
---------------------------------------------------------------

I (aurelien again) had a brief mail exchange with Jonathan, he told me =

he was "a bit cross eyed and unclear about the world" but his dad is =

coming out to help him.

Aur=E9lien
More details when I have them. Email is probably the best for the
moment (ASCII-art flowers?) as I'm not sure of a postal address that works:

Jonathan Riddell <jriddell@canonical.com>

Hopefully he'll be a bit more alert/responsive in a few days! I
certainly hope so and wish him the best!

-Paul

-- =

warthogs mailing list
warthogs@lists.canonical.com
https://lists.ubuntu.com/mailman/listinfo/warthogs

-- =

kubuntu-devel mailing list
kubuntu-devel@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinf=
o/kubuntu-devel
 
Old 11-29-2011, 03:04 PM
"Scot P. Floess"
 
Default DHCP_HOSTNAME in ifcfg-eth0

Sounds to me like you want to set up DDNS internally? I do that for my
home network - but you need to have both DHCP and DNS working
together...meaning DHCP needs to be able to update the DNS server with the
names of the DHCP clients. I've got a Linksys router and have never
gotten that to work with it (I haven't tried), but I have a CentOS box
acting as both my DNS server and DHCP server. I also spin up VMs that use
DHCP...my kickstart file actually write the DHCP client name into
ifcfg-eth0, so when the DHCP clients start up I can refer to them by
name...



On Tue, 29 Nov 2011, Timothy Madden wrote:

> On 29.11.2011 15:57, Timothy Madden wrote:
>> Hello
>>
>> Is there a way for the dhcp client to send the current host name of the
>> machine when requesting a lease ?
>>
>> Currently I have to include a line like
>> DHCP_HOSTNAME=appserver2
>> in my /etc/sysconfig/network-scripts/ifcfg-eth0, but I would like to
>> tell the dhcp client to just 'also send the hostname' and then the
>> client to get the current hostname itself, instead of having the name
>> hard-coded in the ifcfg-eth0 file.
>>
>> I am trying to get my router to know the names of all my CentOS
>> machines, as currently I can access none of my CentOS machines by their
>> node name (I get 'unknown host' upon name lookup) and maybe it will help
>> if the router knows all the computer names.
>
> Sorry for the wrong wording: what I want is the DHCP client to send the
> hostname when a lease is requested, but I do not want to give dhclient
> any explicit hostname to be sent.
>
> I want dhclient to read the hostname from `hostname` or from
> /etc/sysconfig/network or any other way, and use that name to send the
> hostname to DHCP server.
>
> Thank you,
> Timothy Madden
>
> _______________________________________________
> CentOS mailing list
> CentOS@centos.org
> http://lists.centos.org/mailman/listinfo/centos
>

Scot P. Floess RHCT (Certificate Number 605010084735240)
Chief Architect FlossWare http://sourceforge.net/projects/flossware
http://flossware.sourceforge.net
https://github.com/organizations/FlossWare
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 12-02-2011, 01:52 PM
Timothy Madden
 
Default DHCP_HOSTNAME in ifcfg-eth0

On 02.12.2011 13:25, Александр Кириллов wrote:
>> Sorry for the wrong wording: what I want is the DHCP client to send
>> the
>> hostname when a lease is requested, but I do not want to give
>> dhclient
>> any explicit hostname to be sent.
>>
>> I want dhclient to read the hostname from `hostname` or from
>> /etc/sysconfig/network or any other way, and use that name to send
>> the
>> hostname to DHCP server.
>
> DHCP_HOSTNAME=$(hostname -s)

Yes, thank you.

Unfortunately I find that if I ever use the GUI tool
(system-config-network) to configure network than the '$' there gets
automatically escaped on save !

The back tick form of shell command substitution is preserved though, so
I can write:
DHCP_HOSTNAME=`hostname -s`

For some strange reasone, when I do that, I get 'host name lookup
failure' during `service network restart´ invocation, so in the end I
resorted to using just:
DHCP_HOSTNAME=`hostname`
which seems to work properly until now, and now my router can see the
computer names for its DHCP clients, which is a big step compared to
seeing just the MAC address.

Thank you,
Timothy Madden

_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 12-02-2011, 01:59 PM
 
Default DHCP_HOSTNAME in ifcfg-eth0

Timothy Madden wrote:
> On 02.12.2011 13:25, ?лек?анд? ?и?иллов wrote:
>>> Sorry for the wrong wording: what I want is the DHCP client to send
>>> the hostname when a lease is requested, but I do not want to give
>>> dhclient any explicit hostname to be sent.
>>>
>>> I want dhclient to read the hostname from `hostname` or from
>>> /etc/sysconfig/network or any other way, and use that name to send
>>> the hostname to DHCP server.
>>
>> DHCP_HOSTNAME=$(hostname -s)
<snip>
> For some strange reasone, when I do that, I get 'host name lookup
> failure' during `service network restart´ invocation, so in the end I
> resorted to using just:
> DHCP_HOSTNAME=`hostname`
> which seems to work properly until now, and now my router can see the
> computer names for its DHCP clients, which is a big step compared to
> seeing just the MAC address.

I haven't closely followed this thread - did someone mention just putting
HOSTNAME= in /etc/sysconfig/network?

mark

_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 12-02-2011, 04:27 PM
Timothy Madden
 
Default DHCP_HOSTNAME in ifcfg-eth0

On 02.12.2011 16:59, m.roth@5-cent.us wrote:

Timothy Madden wrote:

On 02.12.2011 13:25, Ð?лекÑ?андр Кириллов wrote:

[...]

For some strange reasone, when I do that, I get 'host name lookup
failure' during `service network restart´ invocation, so in the end I
resorted to using just:
DHCP_HOSTNAME=`hostname`
which seems to work properly until now, and now my router can see the
computer names for its DHCP clients, which is a big step compared to
seeing just the MAC address.


I haven't closely followed this thread - did someone mention just putting
HOSTNAME= in /etc/sysconfig/network?



Yes, this thread actually starts at
nntp://news.gmane.org/gmane.linux.centos.general/120489

I have the 'HOSTNAME= ' line in /etc/sysconfig/network, and the DHCP
client still does not send the hostname to the DHCP server on start-up.
So my router never knows my computer name.


The point was how to tell DHCP client to send the *current* hostname to
the server, instead of hard-coding the hostname in the dhclient
configuration file.


Timothy Madden

_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 

Thread Tools




All times are GMT. The time now is 03:06 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org