I have added an access point to one of my centos boxes:
nmcli con add type wifi ifname wlp1s0 mode ap con-name wlp1s0 802-11-wireless.ssid MyAPSSID
nmcli con modify wlp1s0 802-11-wireless.band bg connection.autoconnect yes 802-11-wireless-security.key-mgmt wpa-psk
nmcli con modify wlp1s0 802-11-wireless-security.psk MYAPKEY ipv4.addr 192.168.1.0/17 ipv4.method shared
nmcli con up wlp1s0
bringing this interface up launches a dnsmasq session with these parameters:
/usr/sbin/dnsmasq --conf-file=/dev/null --no-hosts --keep-in-foreground --bind-interfaces --except-interface=lo --clear-on-reload --strict-order --listen-address=192.168.1.0 --dhcp-range=192.168.1.10,192.168.1.254,60m --dhcp-lease-max=50 --dhcp-leasefile=/var/lib/NetworkManager/dnsmasq-wlp1s0.leases --pid-file=/run/nm-dnsmasq-wlp1s0.pid --conf-dir=/etc/NetworkManager/dnsmasq-shared.d
Can someone tell me how to change the default IP address range used (e.g. where are these command-line options coming from so I can change the --dhcp-range option) ?
Or, better yet, since I already have a DHCP server on my network, is there a way to simply have the access point obtain its IP addresses for clients from that DHCP server?
change access point dhcp range
-
- Posts: 1257
- Joined: 2014/05/21 20:16:00
- Location: Central New York, USA
Re: change access point dhcp range
My linksys/ciscp routers are in bridged mode and obtain their addresses from my DHCP server.
-
- Posts: 34
- Joined: 2017/02/16 16:41:29
Re: change access point dhcp range
thats good to know but really doesn't answer my question.
Re: change access point dhcp range
There should be directly editable file in /etc/NetworkManager/system-connections/
Alas, there probably isn't a value that we desire any more than as nmcli option.
The --dhcp-range CLI option for dnsmasq overrides what you could add in file in
/etc/NetworkManager/dnsmasq-shared.d/
I'd say: start the connection without dnsmasq (ipv4.method manual ?)
Then run a separate DHCP (dnsmasq) that you have more control over.
Alas, there probably isn't a value that we desire any more than as nmcli option.
The --dhcp-range CLI option for dnsmasq overrides what you could add in file in
/etc/NetworkManager/dnsmasq-shared.d/
I'd say: start the connection without dnsmasq (ipv4.method manual ?)
Then run a separate DHCP (dnsmasq) that you have more control over.
-
- Posts: 34
- Joined: 2017/02/16 16:41:29
Re: change access point dhcp range
Sadly, there isn't a file anywhere in the /etc/NetworkManager structure which appears to contain this DHCP range or DNSMASQ setup (there's no files whatsoever in the directory you mentioned, which is the 1st place I looked).
I've also looked in /usr/lib/NetworkManager and /var/[lib|run]/NetworkManager
unfortunately I cannot find a file anywhere which sets the options for the dnsmasq session launched by NetworkManager for the wifi access point.The --dhcp-range CLI option for dnsmasq overrides what you could add in file in
/etc/NetworkManager/dnsmasq-shared.d/
Not sure this is possible. the connection type is shared as an access point. if I mark it as manual and specify an ip address it doesn't seem tow work.I'd say: start the connection without dnsmasq (ipv4.method manual ?)
Then run a separate DHCP (dnsmasq) that you have more control over.