change access point dhcp range

Issues related to configuring your network
Post Reply
vtwin@cox.net
Posts: 33
Joined: 2017/02/16 16:41:29

change access point dhcp range

Post by vtwin@cox.net » 2020/12/29 01:15:40

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?

lightman47
Posts: 1246
Joined: 2014/05/21 20:16:00
Location: Central New York, USA

Re: change access point dhcp range

Post by lightman47 » 2020/12/29 12:12:31

My linksys/ciscp routers are in bridged mode and obtain their addresses from my DHCP server.
Remember - importing/building packages will likely "byte you in the butt" come update time, long after you'd forgotten you did that! Use repos whenever possible.

vtwin@cox.net
Posts: 33
Joined: 2017/02/16 16:41:29

Re: change access point dhcp range

Post by vtwin@cox.net » 2020/12/31 14:45:44

thats good to know but really doesn't answer my question.

User avatar
jlehtone
Posts: 3262
Joined: 2007/12/11 08:17:33
Location: Finland

Re: change access point dhcp range

Post by jlehtone » 2020/12/31 15:53:59

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.

vtwin@cox.net
Posts: 33
Joined: 2017/02/16 16:41:29

Re: change access point dhcp range

Post by vtwin@cox.net » 2020/12/31 20:25:51

jlehtone wrote:
2020/12/31 15:53:59
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.
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
The --dhcp-range CLI option for dnsmasq overrides what you could add in file in
/etc/NetworkManager/dnsmasq-shared.d/
unfortunately I cannot find a file anywhere which sets the options for the dnsmasq session launched by NetworkManager for the wifi access point.

I'd say: start the connection without dnsmasq (ipv4.method manual ?)
Then run a separate DHCP (dnsmasq) that you have more control over.
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.

Post Reply

Return to “CentOS 8 - Networking Support”