Re: "Shared to other computers" connection



On Sun, 2018-04-22 at 09:14 -0400, Ken Taylor wrote:

Hi,


1 - set the shared subnet on the Pi to say 10.42.1.xxx

configure one manual IP address in ipv4.addresses.

that address will be assigned to the sharing machine, the subnet will
be announced via DHCP.

Documented (somewhat) in `man nm-settings`.


2 - set the range of addresses served by DHCP

The range depends on the assigned address.
See the unit-tests that have some examples how the choice of the
address and the prefix length (netmask) influences the first/last DHCP
address:
https://cgit.freedesktop.org/NetworkManager/NetworkManager/tree/src/dnsmasq/tests/test-dnsmasq-utils.c?id=c2fcf82e636e81af2e1a5c422ae5a9e6e0629b0f#n62


3 - reserve certain IP addresses for certain devices by MAC

Do you mean to assign a particular IP address to a particular host,
based on its MAC? That's not easily possible.

NM will spawn dnsmasq (as DHCP/DNS server) with argument
--conf-dir=/etc/NetworkManager/dnsmasq-shared.d
Maybe you could place configuration files there.

Create the directory if it doesn't exit (otherwise, NM will not pass --
conf-dir to dnsmasq, because dnsmasq would fail right away).


best,
Thomas

Attachment: signature.asc
Description: This is a digitally signed message part



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]