Re: [Dnsmasq-discuss] client q: both static and dhcp

2021-06-27 Thread Geert Stappers via Dnsmasq-discuss
On Sun, Jun 27, 2021 at 10:48:56AM -0500, Andrew Miskell via Dnsmasq-discuss 
wrote:
> On Jun 27, 2021, at 09:30, Carl Karsten  wrote:
> > On Sun, Jun 27, 2021 at 7:56 AM john doe  wrote:
> >> On 6/27/2021 9:17 AM, Carl Karsten wrote:
> >> > On Sun, Jun 27, 2021 at 2:10 AM john doe  wrote:
> >> >> On 6/27/2021 7:03 AM, Dominik wrote:
> >> >>> On Sat, 2021-06-26 at 19:16 -0500, Carl Karsten wrote:
> >>  I'm looking for advice on haveing some boxes to have both dynamic and
> >>  static IPs.
> >> >>>
> >> >>> Why use a static IP at all? We have often enough seen people use static
> >> >>> addresses for the wrong reasons.
> >> >>>
> >> >>
> >> >> As I understand it, the OP wants to use DHCP static leases.
> >> >>
> >> >
> >> > No.
> >> >
> >> > I need this for when move put a box on someone else's network.
> >> > So I don't have any control over the dhcp server.
> >> >
> >> 
> >> Then set an fix IP on dhcp client (dhclient ...) and remove it when you
> >> don't need it.
> >> 
> >> Basically, you set the dhcp client to have a static address or let the
> >> client get a lease from a dhcp server.
> > 
> > I'm trying to reduce the amount of work I need to do when I show up
> > and discover there is no dhcp server.
> > 
> > Example locations: university, coffee shop, convention center,
> > office meeting room.   In all cases I am a guest for a few days.
> > 
> >  
> >> 
> >> Why do you need dnsmasq into the mix?
> > 
> > I don't - I am just working on client config.
> > 
> 
> A couple things. It might help to state what the client device is
> running (Windows, Linux and what distribution/version).
> 
> dnsmasq is a DNS/DHCP server not a client,
> so I’m unsure what the role of dnsmasq would be here.

Dnsmasq has a mailinglist.
Behind a mailinglist are people.
People have knowledge and experience.
People do tend to exchange knowledge and experience.
Possible exchange place is a mailinglist.

 
> Most of the places you listed would already have a DHCP server available
> to hand out IP addresses (and associated network information) on its
> own. Otherwise, there’s no easy way to connect to the internet without
> knowing all that particular networks details (e.g. gateway address,
> subnet mask, etc, etc) which defeats the point of providing network
> access in a number of the locations you listed.



Groeten
Geert Stappers
-- 
Silence is hard to parse

___
Dnsmasq-discuss mailing list
Dnsmasq-discuss@lists.thekelleys.org.uk
https://lists.thekelleys.org.uk/cgi-bin/mailman/listinfo/dnsmasq-discuss


Re: [Dnsmasq-discuss] client q: both static and dhcp

2021-06-27 Thread Andrew Miskell via Dnsmasq-discuss


> On Jun 27, 2021, at 09:30, Carl Karsten  wrote:
> 
> 
> 
> 
>> On Sun, Jun 27, 2021 at 7:56 AM john doe  wrote:
>> On 6/27/2021 9:17 AM, Carl Karsten wrote:
>> > On Sun, Jun 27, 2021 at 2:10 AM john doe  wrote:
>> >
>> >> On 6/27/2021 7:03 AM, Dominik wrote:
>> >>> Hey Carl,
>> >>>
>> >>> On Sat, 2021-06-26 at 19:16 -0500, Carl Karsten wrote:
>>  I'm looking for advice on haveing some boxes to have both dynamic and
>>  static IPs.
>> >>>
>> >>> Why use a static IP at all? We have often enough seen people use static
>> >>> addresses for the wrong reasons.
>> >>>
>> >>
>> >> As I understand it, the OP wants to use DHCP static leases.
>> >>
>> >
>> > No.
>> >
>> > I need this for when move put a box on someone else's network.
>> > So I don't have any control over the dhcp server.
>> >
>> 
>> Then set an fix IP on dhcp client (dhclient ...) and remove it when you
>> don't need it.
>> 
>> Basically, you set the dhcp client to have a static address or let the
>> client get a lease from a dhcp server.
> 
> I'm trying to reduce the amount of work I need to do when I show up and 
> discover there is no dhcp server.
> 
> Example locations: university, coffee shop, convention center, office meeting 
> room.   In all cases I am a guest for a few days.  
> 
>  
>> 
>> Why do you need dnsmasq into the mix?
> 
> I don't - I am just working on client config.
> 
>  
>> 
>> --
>> John Doe
>> 
>> ___
>> Dnsmasq-discuss mailing list
>> Dnsmasq-discuss@lists.thekelleys.org.uk
>> https://lists.thekelleys.org.uk/cgi-bin/mailman/listinfo/dnsmasq-discuss
> 
> 
> -- 
> Carl K
> ___
> Dnsmasq-discuss mailing list
> Dnsmasq-discuss@lists.thekelleys.org.uk
> https://lists.thekelleys.org.uk/cgi-bin/mailman/listinfo/dnsmasq-discuss

A couple things. It might help to state what the client device is running 
(Windows, Linux and what distribution/version). 

dnsmasq is a DNS/DHCP server not a client, so I’m unsure what the role of 
dnsmasq would be here. 

Most of the places you listed would already have a DHCP server available to 
hand out IP addresses (and associated network information) on its own. 
Otherwise, there’s no easy way to connect to the internet without knowing all 
that particular networks details (e.g. gateway address, subnet mask, etc, etc) 
which defeats the point of providing network access in a number of the 
locations you listed. ___
Dnsmasq-discuss mailing list
Dnsmasq-discuss@lists.thekelleys.org.uk
https://lists.thekelleys.org.uk/cgi-bin/mailman/listinfo/dnsmasq-discuss


Re: [Dnsmasq-discuss] client q: both static and dhcp

2021-06-27 Thread john doe

On 6/27/2021 3:53 PM, Carl Karsten wrote:

On Sun, Jun 27, 2021 at 7:56 AM john doe  wrote:


On 6/27/2021 9:17 AM, Carl Karsten wrote:

On Sun, Jun 27, 2021 at 2:10 AM john doe  wrote:


On 6/27/2021 7:03 AM, Dominik wrote:

Hey Carl,

On Sat, 2021-06-26 at 19:16 -0500, Carl Karsten wrote:

I'm looking for advice on haveing some boxes to have both dynamic and
static IPs.


Why use a static IP at all? We have often enough seen people use static
addresses for the wrong reasons.



As I understand it, the OP wants to use DHCP static leases.



No.

I need this for when move put a box on someone else's network.
So I don't have any control over the dhcp server.



Then set an fix IP on dhcp client (dhclient ...) and remove it when you
don't need it.

Basically, you set the dhcp client to have a static address or let the
client get a lease from a dhcp server.



I'm trying to reduce the amount of work I need to do when I show up and
discover there is no dhcp server.

Example locations: university, coffee shop, convention center, office
meeting room.   In all cases I am a guest for a few days.



I'm pretty sure that all of those places provide dhcp services.

Regardless of the client you are using, there is always a way to have a
script/hook/... that will help you fallback to a static address.






Why do you need dnsmasq into the mix?



I don't - I am just working on client config.



Don't forget that Dnsmasq is a server, that would be lovely if you could
in future state clearly that your question is off topic (OT) in your
subject line.

--
John Doe

___
Dnsmasq-discuss mailing list
Dnsmasq-discuss@lists.thekelleys.org.uk
https://lists.thekelleys.org.uk/cgi-bin/mailman/listinfo/dnsmasq-discuss


Re: [Dnsmasq-discuss] client q: both static and dhcp

2021-06-27 Thread Geert Stappers via Dnsmasq-discuss
On Sun, Jun 27, 2021 at 02:17:20AM -0500, Carl Karsten wrote:
> On Sun, Jun 27, 2021 at 2:10 AM john doe  wrote:
> > On 6/27/2021 7:03 AM, Dominik wrote:
> > > On Sat, 2021-06-26 at 19:16 -0500, Carl Karsten wrote:
> > >> I'm looking for advice on haveing some boxes to have both dynamic and
> > >> static IPs.
> > >
> > > Why use a static IP at all? We have often enough seen people use static
> > > addresses for the wrong reasons.
> > >
> >
> > As I understand it, the OP wants to use DHCP static leases.
> >
> 
> No.
> 
> I need this for when move put a box on someone else's network.

That implies talking with the administrators of the network you visit.


> So I don't have any control over the dhcp server.

Switch from "I most be in total control"
to "I can work with others, I can find common ground"


Back to "computer network level".

Have access to the host network configuration at all time.
Yes, that has a price.


Groeten
Geert Stappers
-- 
Silence is hard to parse

___
Dnsmasq-discuss mailing list
Dnsmasq-discuss@lists.thekelleys.org.uk
https://lists.thekelleys.org.uk/cgi-bin/mailman/listinfo/dnsmasq-discuss


Re: [Dnsmasq-discuss] client q: both static and dhcp

2021-06-27 Thread Geert Stappers via Dnsmasq-discuss
> These machines are portable.

[0]


On Sun, Jun 27, 2021 at 01:26:24AM -0500, Carl Karsten wrote:
> On Sun, Jun 27, 2021 at 12:03 AM Dominik  wrote:
> 
> > Hey Carl,
> >
> > On Sat, 2021-06-26 at 19:16 -0500, Carl Karsten wrote:
> > > I'm looking for advice on haveing some boxes to have both dynamic and
> > > static IPs.
> >
> > Why use a static IP at all? We have often enough seen people use static
> > addresses for the wrong reasons.
> >
> > Consider using only DHCP and
> >
> > (a) use a hostname to access the device. In the end, memorizing some-
> > service.lan is more reliable than 192.168.1.149. You may think
> > differently, but let's see what you say after not having logged into
> > the box for half a year - do you still know the address without looking
> > it up? However, you may still recall a good hostname.
> >
> > (b) use a deterministic DHCP server like dnsmasq. It always tries to
> > assign the same IP addresses to the same devices (instead of numbering
> > them sequentially based on their appearance like cheap routers often
> > do).
> >
> > Using (a), (b) or (a)+(b) doesn't require you to have a static IP at
> > all.
> >
> 
> These machines are portable. they will likely start out on a lan where I
> control the dhcp server;  the os apps and config are setup, then they are
> moved to another room.   They live there for a few days to a week, and then
> are put back in storage, with a few being left out for R to experiment
> with.
> 
> There isn't always a dhcp server on the network.

There is the true problem.

And that problem implies manual assignment of IPv4 addresses
plus setting router and most likely DNS  (or even worse: At N servers
updating N entries in /etc/hosts)


> Sometimes there isn't even a network with the exception of a single
> run of cat 5 between 2 machines.
> 
> This is what is going on:
> https://debconf-video-team.pages.debian.net/docs/room_setup.html#room-setup
> 
> Sometimes there isn't a link to "DHCP – Gigabit feed out" (thus there is no
> live stream, just recording to local disk)
> 
> This is what I want the static IP for:
> The "Opsis PC" has a systemd script that connects to "Voctomix PC"
> The script uses a hostname, the hostname is set in /etc/hosts
> 
> If there is a network with dhcp, then it will be nice to get the gateway
> and be able to ssh into machines.

I recommend to add an OpenWRT device or another portable DHCP server + DNServer
to the equipment.


> > Best,
> > Dominik
> >
> 
> Carl K


Groeten
Geert Stappers


[0] Acknowlegde on "Allow me my ignorance"
Please do go beyond that and reply below previous text.

Do it for your future self that will be visiting the mailinglist archive.
-- 
Silence is hard to parse

___
Dnsmasq-discuss mailing list
Dnsmasq-discuss@lists.thekelleys.org.uk
https://lists.thekelleys.org.uk/cgi-bin/mailman/listinfo/dnsmasq-discuss


Re: [Dnsmasq-discuss] client q: both static and dhcp

2021-06-27 Thread Carl Karsten
On Sun, Jun 27, 2021 at 2:10 AM john doe  wrote:

> On 6/27/2021 7:03 AM, Dominik wrote:
> > Hey Carl,
> >
> > On Sat, 2021-06-26 at 19:16 -0500, Carl Karsten wrote:
> >> I'm looking for advice on haveing some boxes to have both dynamic and
> >> static IPs.
> >
> > Why use a static IP at all? We have often enough seen people use static
> > addresses for the wrong reasons.
> >
>
> As I understand it, the OP wants to use DHCP static leases.
>

No.

I need this for when move put a box on someone else's network.
So I don't have any control over the dhcp server.


> > Consider using only DHCP and
> >
> > (a) use a hostname to access the device. In the end, memorizing some-
> > service.lan is more reliable than 192.168.1.149. You may think
>
> Better to use '.home.arpa' (RFC 8375).
>
>
> With dinamic and static DHCP leases you could do:
>
> dhcp-range=192.168.23.2,192.168.23.253
>
> dhcp-host=11:22:33:44:55::66,192.168.23.254
>
> dnsmask will dish out dinamically IPv4 addresses from 192.168.23.2 to
> 192.168.23.253 and will asign 192.168.23.254 to host with MAC address
> "11:22:33:44:55:66'.
>
>
> Note that the IPs used in 'dhcp-host' don't need to be outside of the
> range.
>
> --
> John Doe
>
> ___
> Dnsmasq-discuss mailing list
> Dnsmasq-discuss@lists.thekelleys.org.uk
> https://lists.thekelleys.org.uk/cgi-bin/mailman/listinfo/dnsmasq-discuss
>


-- 
Carl K
___
Dnsmasq-discuss mailing list
Dnsmasq-discuss@lists.thekelleys.org.uk
https://lists.thekelleys.org.uk/cgi-bin/mailman/listinfo/dnsmasq-discuss


Re: [Dnsmasq-discuss] client q: both static and dhcp

2021-06-27 Thread john doe

On 6/27/2021 7:03 AM, Dominik wrote:

Hey Carl,

On Sat, 2021-06-26 at 19:16 -0500, Carl Karsten wrote:

I'm looking for advice on haveing some boxes to have both dynamic and
static IPs.


Why use a static IP at all? We have often enough seen people use static
addresses for the wrong reasons.



As I understand it, the OP wants to use DHCP static leases.


Consider using only DHCP and

(a) use a hostname to access the device. In the end, memorizing some-
service.lan is more reliable than 192.168.1.149. You may think


Better to use '.home.arpa' (RFC 8375).


With dinamic and static DHCP leases you could do:

dhcp-range=192.168.23.2,192.168.23.253

dhcp-host=11:22:33:44:55::66,192.168.23.254

dnsmask will dish out dinamically IPv4 addresses from 192.168.23.2 to
192.168.23.253 and will asign 192.168.23.254 to host with MAC address
"11:22:33:44:55:66'.


Note that the IPs used in 'dhcp-host' don't need to be outside of the range.

--
John Doe

___
Dnsmasq-discuss mailing list
Dnsmasq-discuss@lists.thekelleys.org.uk
https://lists.thekelleys.org.uk/cgi-bin/mailman/listinfo/dnsmasq-discuss


Re: [Dnsmasq-discuss] client q: both static and dhcp

2021-06-27 Thread Carl Karsten
These machines are portable. they will likely start out on a lan where I
control the dhcp server;  the os apps and config are setup, then they are
moved to another room.   They live there for a few days to a week, and then
are put back in storage, with a few being left out for R to experiment
with.

There isn't always a dhcp server on the network.  Sometimes there isn't
even a network with the exception of a single run of cat 5 between 2
machines.

This is what is going on:
https://debconf-video-team.pages.debian.net/docs/room_setup.html#room-setup

Sometimes there isn't a link to "DHCP – Gigabit feed out" (thus there is no
live stream, just recording to local disk)

This is what I want the static IP for:
The "Opsis PC" has a systemd script that connects to "Voctomix PC"
The script uses a hostname, the hostname is set in /etc/hosts

If there is a network with dhcp, then it will be nice to get the gateway
and be able to ssh into machines.



On Sun, Jun 27, 2021 at 12:03 AM Dominik  wrote:

> Hey Carl,
>
> On Sat, 2021-06-26 at 19:16 -0500, Carl Karsten wrote:
> > I'm looking for advice on haveing some boxes to have both dynamic and
> > static IPs.
>
> Why use a static IP at all? We have often enough seen people use static
> addresses for the wrong reasons.
>
> Consider using only DHCP and
>
> (a) use a hostname to access the device. In the end, memorizing some-
> service.lan is more reliable than 192.168.1.149. You may think
> differently, but let's see what you say after not having logged into
> the box for half a year - do you still know the address without looking
> it up? However, you may still recall a good hostname.
>
> (b) use a deterministic DHCP server like dnsmasq. It always tries to
> assign the same IP addresses to the same devices (instead of numbering
> them sequentially based on their appearance like cheap routers often
> do).
>
> Using (a), (b) or (a)+(b) doesn't require you to have a static IP at
> all.
>
> Best,
> Dominik
>
>

-- 
Carl K
___
Dnsmasq-discuss mailing list
Dnsmasq-discuss@lists.thekelleys.org.uk
https://lists.thekelleys.org.uk/cgi-bin/mailman/listinfo/dnsmasq-discuss


Re: [Dnsmasq-discuss] client q: both static and dhcp

2021-06-26 Thread Dominik
Hey Carl,

On Sat, 2021-06-26 at 19:16 -0500, Carl Karsten wrote:
> I'm looking for advice on haveing some boxes to have both dynamic and
> static IPs.  

Why use a static IP at all? We have often enough seen people use static
addresses for the wrong reasons.

Consider using only DHCP and

(a) use a hostname to access the device. In the end, memorizing some-
service.lan is more reliable than 192.168.1.149. You may think
differently, but let's see what you say after not having logged into
the box for half a year - do you still know the address without looking
it up? However, you may still recall a good hostname.

(b) use a deterministic DHCP server like dnsmasq. It always tries to
assign the same IP addresses to the same devices (instead of numbering
them sequentially based on their appearance like cheap routers often
do).

Using (a), (b) or (a)+(b) doesn't require you to have a static IP at
all.

Best,
Dominik


___
Dnsmasq-discuss mailing list
Dnsmasq-discuss@lists.thekelleys.org.uk
https://lists.thekelleys.org.uk/cgi-bin/mailman/listinfo/dnsmasq-discuss