Re: "Shared to other computers" connection



Thank you Thomas!

1 - I will look into the documentation.

2 - dnsmasq is running with the parameter --dhcp-range=10.42.0.10,10.42.0.254,60m.  It seems to me that I should be able to tell network-manager (?) to start dnsmasq with a value such as --dhcp-range=10.42.0.200,10.42.0.240,60m

3 - Yes, I wish to "assign a particular IP address to a particular host, based on its MAC."  This is simple with dhcpd

/etc/dhcp/dhcpd.conf

host taylor21 {
 hardware ethernet b8:27:eb:b4:a6:2e;
 fixed-address 10.42.0.121;
}

I have placed .conf in various directories per the dnsmasq documentation. As NM seems to control dnsmasq... let me find my sample dnsmasq.conf file and plop it into /etc/NetworkManager/dnsmasq-shared.d.  Worst I can do is brean dnsmasq - which I have managed to do several times already :-)

Ken

p.s. Sorry I did not interlace my comments into the thread below. Seems like Thunderbird does not like mailing lists.

On 04/22/2018 09:41 AM, Thomas Haller wrote:
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




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