Community
cancel
Showing results for 
Search instead for 
Did you mean: 
mrich4
Beginner
1,110 Views

How to change range of DHCP server IP in AP Mode

Hi,

I have a "stupid" question, i don't see any dhcpd.conf to change the range and the subnet of my wlan0 in AP.

How can I do this ?

Thanks you !

Tags (1)
0 Kudos
6 Replies
idata
Community Manager
57 Views

Hi Maathor,

 

 

Thank you for contacting us.

 

 

I don't think that this is a stupid question, and I would love to help you with this. You can make these changes in the file etc/hostapd/udhcpd-for-hostapd.conf, in the first lines you will see the range (start and end) that you can change. And on the last section of the file (# Currently supported options, for more info, see options.c), you can change the subnet on the line opt subnet 255.255.255.0.

 

 

I hope you find this information useful.

 

 

Have a nice day.

 

 

Regards,

 

Leonardo R.
mrich4
Beginner
57 Views

Thanks you a lot, it's works, but now I can't manage to change my own IP Adress and broadcast .....

idata
Community Manager
57 Views

Hi Maathor,

 

 

It is good to know that it worked. About changing the IP Address, you can do this with command: ifconfig wlan0 192.168.138.1 netmask 255.255.255.0 (Changing it to the right IP Address that you want), but you have to do this every time that you reboot your Edison . To do it automatically you can create a script and a service, for example:

 

 

static_ip.sh:

 

# !/bin/sh ifconfig wlan0 192.168.138.1 netmask 255.255.255.0

 

 

static_ip.service:

 

# !/bin/sh [Unit] Description=Sets static ip on boot Requires=wpa_supplicant.service After=wpa_supplicant.service [Service] ExecStart=/home/root/static_ip.sh Type=idle [Install] WantedBy=basic.target

 

 

I hope you find this helpful.

 

 

Have a nice weekend.

 

 

Regards,

 

Leonardo R.
idata
Community Manager
57 Views

Hi Maathor,

 

 

Did you try my recommendation? Did it work?

 

 

We will be waiting for your response.

 

 

Regards,

 

Leonardo R.

 

mrich4
Beginner
57 Views

thanks you a lot, it's works perfectly !

idata
Community Manager
57 Views

Hi Maathor,

 

 

That's great! Thank you for letting us know.

 

 

Feel free to contact us when you have doubts.

 

 

Have a nice day.

 

 

Regards,

 

Leonardo R.
Reply