After hours of trying different solutions, I was finally able to specify a subnet for a Hotspot connection using Network Manager and then set a manual ip on the client device for a sort of static ip. None of the dnsmasq/dhcp methods work with Network Manager. You have to edit the Network Manager connection file. These files are generated for each connection in the following directory:
I believe that when you create a Hotspot, a new connection file is created and is named Hotspot. You need to edit this file. Make sure you are editing the Hotspot connection file or this will not work! Change/add the following lines under the section
[ipv4] to set a subnet. Make sure it has the line
method=shared and use whatever ip address you want for
address1= and NetworkManager will issue all connecting devices an ip in the same subnet. The format for this line is
address1=ip/subnetmask,gateway. Gateway should be the same as the ip. Here is what the
[ipv4] section should look like:
Once you have this completed, save the file and run the following to restart Network Manager:
sudo service network-manager restart
Now your connected devices should be issued an ip address under the same subnet as the ip you entered. In this example it would be 192.168.125.x.
To get a static ip, do that on the client side device. Set a manual ip for this hotspot connection under same subnet, using the same subnet mask and gateway that were entered in the Hotspot connection file.
Here is my whole Hotspot connection file for reference:
Documentation on this setting in Network Manager can be read here:
Table 36. ipv4 setting
Key Name: method
Value Type: string
Value Description: IP configuration method. NMSettingIP4Config and NMSettingIP6Config both support "auto", "manual", and "link-local". See the subclass-specific documentation for other values. In general, for the "auto" method, properties such as "dns" and "routes" specify information that is added on to the information returned from automatic configuration. The "ignore-auto-routes" and "ignore-auto-dns" properties modify this behavior. For methods that imply no upstream network, such as "shared" or "link-local", these properties must be empty. For IPv4 method "shared", the IP subnet can be configured by adding one manual IPv4 address or otherwise 10.42.x.0/24 is chosen.
Most important part:
For IPv4 method "shared", the IP subnet can be configured by adding
one manual IPv4 address or otherwise 10.42.x.0/24 is chosen.