From: Tony Houghton on
In <lKqdnSmR4paGMIvRnZ2dnUVZ7rGdnZ2d(a)brightview.co.uk>,
PeeGee <triessuk(a)yahoo.co.uk> wrote:

> Have you tried using:
> send dhcp-client-identifier "\000<hostname>";
> to replace the default 1:<MAC ADDR>?
>
> You can then reserve addresses by name rather than MAC ADDR.
>
> This seems to work better than send host-name (on OpenSUSE system).

I have tried that. The DHCP server is in the router, not another Linux
box, and it only seems to work with host-name, not client id.

--
TH * http://www.realh.co.uk
From: Jim Price on
Tony Houghton wrote:
> In <hv5se4$hg8$1(a)news.eternal-september.org>,
> Geoff Clements <bitbucket(a)electron.me.uk> wrote:

>> I know you've found the answer but with avahi pretty common these days it's
>> very easy to use hostnames as addresses, at least if the machines are on the
>> same physical network.
>
> The main way my PCs communicate with each other is ssh, plus a bit of
> NFS. AIUI avahi is service-specific and I think I'd have to do some
> twiddling to get those services available over avahi.

I use ssh with avahi. The only tweak I use specific to that combination
is to set the ssh option to not check the IP as well as the hostname
when the machine can end up changing address in a DHCP pool. If you use
fixed addresses (whether provided by a DHCP server or defined on the
host) then this is not needed. Other than that, it works fine. I haven't
used NFS with avahi.

--
JimP
From: PeeGee on
On 15/06/10 00:06, Tony Houghton wrote:
> In <lKqdnSmR4paGMIvRnZ2dnUVZ7rGdnZ2d(a)brightview.co.uk>,
> PeeGee <triessuk(a)yahoo.co.uk> wrote:
>
>> Have you tried using:
>> send dhcp-client-identifier "\000<hostname>";
>> to replace the default 1:<MAC ADDR>?
>>
>> You can then reserve addresses by name rather than MAC ADDR.
>>
>> This seems to work better than send host-name (on OpenSUSE system).
>
> I have tried that. The DHCP server is in the router, not another Linux
> box, and it only seems to work with host-name, not client id.
>

Ah! not that clear :-( - should have said "from an OpenSUSE system to a
DHCP server on a Thomson TG585v7 router"

BTW, should also have thanked you for posting - I've been meaning to
find how to do this for a while, but not actually done anything about
it. It took a couple of attempts before I twigged that the "\000" was
needed to insert a <NULL> and use the name properly (it's not mentioned
in the documentation/examples). I've finally got my netbook to register
with different IDs (and IP addresses) for wired and wireless connections
(in case I want different filtering/control) :-)

--
PeeGee

"Nothing should be able to load itself onto a computer without the
knowledge or consent of the computer user. Software should also be able
to be removed from a computer easily."
Peter Cullen, Microsoft Chief Privacy Strategist (Computing 18 Aug 05)
From: Tony Houghton on
In <F9mdnYxIovmhrorRnZ2dnUVZ7ridnZ2d(a)brightview.co.uk>,
PeeGee <triessuk(a)yahoo.co.uk> wrote:

> On 15/06/10 00:06, Tony Houghton wrote:
>> In <lKqdnSmR4paGMIvRnZ2dnUVZ7rGdnZ2d(a)brightview.co.uk>,
>> PeeGee <triessuk(a)yahoo.co.uk> wrote:
>>
>>> Have you tried using:
>>> send dhcp-client-identifier "\000<hostname>";
>>> to replace the default 1:<MAC ADDR>?
>>>
>>> You can then reserve addresses by name rather than MAC ADDR.
>>>
>>> This seems to work better than send host-name (on OpenSUSE system).
>>
>> I have tried that. The DHCP server is in the router, not another Linux
>> box, and it only seems to work with host-name, not client id.
>>
>
> Ah! not that clear :-( - should have said "from an OpenSUSE system to a
> DHCP server on a Thomson TG585v7 router"

Odd, because that's effectively the same model as my router, but mine is
rebranded O2 (including the firmware), who performed the firmware
upgrade remotely. You might want to avoid firmware 8.2.23.0 ;). Besides
the problems I've had with it there are known problems with VPN. But
instead of waiting for a fixed 8.* O2 just slowed down their roll-out of
the current version. Apparently it can improve throughput (but
definitely not performance of its web interface!), which is good for
marketing I suppose.

All I know for sure is that after the upgrade DNS stopped working for my
Debian PCs which weren't sending host-name, now it's working again, but
that might not necessarily be because of the changes I've made to the
PCs! The router's list of connected devices seems to take a while to
respond to changes after reconnecting a client, to say the least.

> BTW, should also have thanked you for posting - I've been meaning to
> find how to do this for a while, but not actually done anything about
> it. It took a couple of attempts before I twigged that the "\000" was
> needed to insert a <NULL> and use the name properly (it's not mentioned
> in the documentation/examples). I've finally got my netbook to register
> with different IDs (and IP addresses) for wired and wireless connections
> (in case I want different filtering/control) :-)

ISTR reading about the \000/<NULL> thing, either in one or two of the
forum posts Googling turned up, or in dhclient's man pages (which
weren't very helpful because I could find no clue about the context in
which to use host-name and dhcp-client-identifier). Could you explain a
bit more?

--
TH * http://www.realh.co.uk
From: PeeGee on
On 15/06/10 13:43, Tony Houghton wrote:
> In <F9mdnYxIovmhrorRnZ2dnUVZ7ridnZ2d(a)brightview.co.uk>,
> PeeGee <triessuk(a)yahoo.co.uk> wrote:
>
>> On 15/06/10 00:06, Tony Houghton wrote:
>>> In <lKqdnSmR4paGMIvRnZ2dnUVZ7rGdnZ2d(a)brightview.co.uk>,
>>> PeeGee <triessuk(a)yahoo.co.uk> wrote:
>>>
>>>> Have you tried using:
>>>> send dhcp-client-identifier "\000<hostname>";
>>>> to replace the default 1:<MAC ADDR>?
>>>>
>>>> You can then reserve addresses by name rather than MAC ADDR.
>>>>
>>>> This seems to work better than send host-name (on OpenSUSE system).
>>>
>>> I have tried that. The DHCP server is in the router, not another Linux
>>> box, and it only seems to work with host-name, not client id.
>>>
>>
>> Ah! not that clear :-( - should have said "from an OpenSUSE system to a
>> DHCP server on a Thomson TG585v7 router"
>
> Odd, because that's effectively the same model as my router, but mine is
> rebranded O2 (including the firmware), who performed the firmware
> upgrade remotely. You might want to avoid firmware 8.2.23.0 ;). Besides
> the problems I've had with it there are known problems with VPN. But
> instead of waiting for a fixed 8.* O2 just slowed down their roll-out of
> the current version. Apparently it can improve throughput (but
> definitely not performance of its web interface!), which is good for
> marketing I suppose.
>
> All I know for sure is that after the upgrade DNS stopped working for my
> Debian PCs which weren't sending host-name, now it's working again, but
> that might not necessarily be because of the changes I've made to the
> PCs! The router's list of connected devices seems to take a while to
> respond to changes after reconnecting a client, to say the least.
>
>> BTW, should also have thanked you for posting - I've been meaning to
>> find how to do this for a while, but not actually done anything about
>> it. It took a couple of attempts before I twigged that the "\000" was
>> needed to insert a <NULL> and use the name properly (it's not mentioned
>> in the documentation/examples). I've finally got my netbook to register
>> with different IDs (and IP addresses) for wired and wireless connections
>> (in case I want different filtering/control) :-)
>
> ISTR reading about the \000/<NULL> thing, either in one or two of the
> forum posts Googling turned up, or in dhclient's man pages (which
> weren't very helpful because I could find no clue about the context in
> which to use host-name and dhcp-client-identifier). Could you explain a
> bit more?
>

Right, this may be a bit "iffy" as I'm not an expert :-)

AIUI the DHCP request exchange sends an identifier which defaults to the
"name" for MS OSs and the MAC ADDR for many Linux systems. A <NULL> is
used to identify the following characters as a name, \001 is used before
a MAC ADDR. From what I've seen, the host-name parameter is used to
supply a name where the clientid is the MAC ADDR and doesn't seem to be
needed for the name method.

Assuming the facility has not been disabled, if you telnet to the
router, log in with the web interface user/password and type
dhcp server lease list
you will get a list with the clientid starting with [00] or [01]. Also,
hostmgr list
will give a list of stored local DNS entries.

--
PeeGee

"Nothing should be able to load itself onto a computer without the
knowledge or consent of the computer user. Software should also be able
to be removed from a computer easily."
Peter Cullen, Microsoft Chief Privacy Strategist (Computing 18 Aug 05)