Fw: Re: How to request a specific IP address from DHCP server

2021-01-22 Thread Radek
Forward.

Begin forwarded message:

Date: Thu, 21 Jan 2021 16:32:55 +0100
From: Radek 
To: Allan Streib 
Subject: Re: How to request a specific IP address from DHCP server


> Can you configure a permanent IP address in the client configuration
> (hostname.if file) that is outside the range that DHCP allocates, but
> still on the same network?
I'm trying to find a way to use a permanent IP address that is inside the 
dynamic DHCP range and I want to configure it on the client side. I just want 
to know if there is any way to do it.


On Tue, 19 Jan 2021 23:25:29 -0500
Allan Streib  wrote:

> Radek  writes:
> 
> > I don't have an access to the DHCP server side. That's the problem and
> > I'm trying to find a way to have the same IP address at any time. The
> > client is permanently connected to the network.
> 
> Can you configure a permanent IP address in the client configuration
> (hostname.if file) that is outside the range that DHCP allocates, but
> still on the same network?
> 
> Allan


-- 
Radek


-- 
Radek



Re: How to request a specific IP address from DHCP server

2021-01-22 Thread Radek
> Instead of requesting a specific address, have you tried to supersede
> the given one with your address in /etc/dhclient.conf?
Yes, I have tried, but it doesn't work as expected. 
$ cat /etc/dhclient.conf
supersede dhcp-requested-address 192.168.1.104;

$ dhclient -v vr0
vr0: DHCPREQUEST to 255.255.255.255
vr0: DHCPACK from 192.168.1.1 (b0:48:7a:a5:86:15)
vr0: 192.168.1.103 lease accepted from 192.168.1.1 (b0:48:7a:a5:86:15)

Even if "supersede option" changes the gives IP address to the my_address I'm 
afraid it's not what I need because the given IP address is in 
/var/db/dhcpd.leases (instead of the my_addrees) and DHCPD can give my_address 
to other client. Am I rigth?


On Wed, 20 Jan 2021 09:38:13 +0100
Marco Scholz  wrote:

> On Tue, Jan 19, 2021 at 08:56:39PM +0100, Radek wrote:
> > I can't manage to request a specific IP address from DHCP server.
> [...]
> 
> Instead of requesting a specific address, have you tried to supersede
> the given one with your address in /etc/dhclient.conf?
> 
> man dhclient.conf
> 
> 
> Marco.
> 


-- 
Radek



Re: How to request a specific IP address from DHCP server

2021-01-20 Thread Marco Scholz
On Tue, Jan 19, 2021 at 08:56:39PM +0100, Radek wrote:
> I can't manage to request a specific IP address from DHCP server.
[...]

Instead of requesting a specific address, have you tried to supersede
the given one with your address in /etc/dhclient.conf?

man dhclient.conf


Marco.



Re: How to request a specific IP address from DHCP server

2021-01-19 Thread Allan Streib
Radek  writes:

> I don't have an access to the DHCP server side. That's the problem and
> I'm trying to find a way to have the same IP address at any time. The
> client is permanently connected to the network.

Can you configure a permanent IP address in the client configuration
(hostname.if file) that is outside the range that DHCP allocates, but
still on the same network?

Allan



Re: How to request a specific IP address from DHCP server

2021-01-19 Thread Radek
> You're using the wrong tool for the job, use an address reservation
> bound to the client MAC on the DHCP server instead.
I don't have an access to the DHCP server side. That's the problem and I'm 
trying to find a way to have the same IP address at any time. The client is 
permanently connected to the network. 

> configuration changes at the server end.
Nobody touches the server end.

On Tue, 19 Jan 2021 21:05:21 +
Peter Kay  wrote:

> On Tue, 19 Jan 2021 at 20:57, Radek  wrote:
> >
> > Hi,
> > I can't manage to request a specific IP address from DHCP server.  It is 
> > just a testing lab, the requiested IP address (.104) isn't used by any 
> > other client. What I'm doing wrong?
> You're using the wrong tool for the job, use an address reservation
> bound to the client MAC on the DHCP server instead.
> 
> Whether or not requesting an address client side works, at any time it
> could fail due to a change in leases allocated to other clients, or
> configuration changes at the server end. If a specific IP is needed,
> use reservations instead.
> 
> PK
> 


-- 
Radek



Re: How to request a specific IP address from DHCP server

2021-01-19 Thread Peter Kay
On Tue, 19 Jan 2021 at 20:57, Radek  wrote:
>
> Hi,
> I can't manage to request a specific IP address from DHCP server.  It is just 
> a testing lab, the requiested IP address (.104) isn't used by any other 
> client. What I'm doing wrong?
You're using the wrong tool for the job, use an address reservation
bound to the client MAC on the DHCP server instead.

Whether or not requesting an address client side works, at any time it
could fail due to a change in leases allocated to other clients, or
configuration changes at the server end. If a specific IP is needed,
use reservations instead.

PK



How to request a specific IP address from DHCP server

2021-01-19 Thread Radek
Hi,
I can't manage to request a specific IP address from DHCP server.  It is just a 
testing lab, the requiested IP address (.104) isn't used by any other client. 
What I'm doing wrong?

$ cat /etc/hostname.vr0
-inet
dhcp

$ cat /etc/dhclient.conf
send dhcp-requested-address 192.168.1.104;

$ sh /etc/netstart vr0
vr0: 192.168.1.103 lease accepted from 192.168.1.1 (b0:48:7a:a5:86:15)

$ dhclient -v vr0
vr0: DHCPREQUEST to 255.255.255.255
vr0: DHCPACK from 192.168.1.1 (b0:48:7a:a5:86:15)
vr0: 192.168.1.103 lease accepted from 192.168.1.1 (b0:48:7a:a5:86:15)

Thanks for any help.

-- 
Radek