FOR TIPS, gUIDES & TUTORIALS

subscribe to our Youtube

GO TO YOUTUBE

14455 questions

17168 answers

28195 comments

0 members

We are migrating to our new platform at https://community.teltonika.lt. Moving forward, you can continue discussions on this new platform. This current platform will be temporarily maintained for reference purposes.
0 votes
664 views 5 comments
by anonymous
I've entered two entries in Network - Interfaces - Static Leases but these WIFI devices are still being assigned lease via DHCP. I tried restarting RUT240, to no avail. Is the Static Leases applicable to LAN only, not WIFI?  How do i make WIFI devices' IPs static?

1 Answer

0 votes
by anonymous

Hi,

If you set a static IP lease for your device in Network -> Interfaces -> Static leases, it should still assign the specified IP address to your device even when connecting via WiFi.

The static leases are obtained via DHCP. DHCP server just ensures that it assigned the defined IP address to the device.

Also, keep in mind that some devices, like PC's, can have multiple adapters. Your ethernet and WiFi adapters will have different MAC addresses. Make sure that you are using the MAC address of your Wireless WiFI interface.

Please, double-check that you have entered the correct MAC address.

Kind Regards,

Andzej

by anonymous
I copied the MAC addresses of the wifi clients from the Status - Network - Wireless and pasted them into the Network - Interfaces - Static Leases and assigned some IPs within the range of DHCP, but those static IPs haven't been assigned to the clients. Random IPs are still being assigned. Why?

I've also verified the wifi MAC addresses devices Interfaces.

Do I have to Release DHCP Leases or something like that? Restarting RUT240 doesn't help.
by anonymous

Hi,

Indeed, if the clients are already connected, they will have IP addresses leased already. However, if you reboot the device, the devices should obtain a new lease as the services will be restarted. Alternatively, if you do not want to reboot your device, you can connect to your device via CLI/SSH and restart the following services via commands:

  • /etc/init.d/dnsmasq restart
  • /etc/init.d/network restart

The wireless devices will be disconnected and when they will reconnect, they will be assigned the specified static IP addresses.

Any chance that the IP address you are trying to lease is already taken? Try leasing an IP address out of the DHCP pool range.

When leasing static IP addresses, it is better if you assign IP addresses outside of the DHCP pool, but within the same network. In case some other device will get that IP, your static lease will not help as DHCP server will not be able to lease an IP address that is already taken. So if you have a DHCP server pool of 192.168.1.100-250, you can lease, for example, 192.168.1.50 IP to your device.

Kind Regards,

Andzej

by anonymous

Nothing works. No static IPs are being assigned. I've ran these commands:

  • /etc/init.d/dnsmasq restart
  • /etc/init.d/network restart

But nothing changed. I've assigned the IPs outside of DHCP pool but withing the same network. MAC addresses are verified. The IPs that I'm trying to use are not taken. Just to confirm: The Static Leases are set in NETWORK - INTERFACES - Static Leases, not in Network - Routing - Static Routs. Right?

I've tried setting lease time at 120 seconds, hoping that it would release DHCP and assign the static. Nope...didn't work either.


I don't understand why it's not working in my case.... :(

by anonymous
Update. It started working... Have no idea why didn't work before!
by anonymous
Hi,

Happy to hear that it's working. Thanks for letting me know.

Kind Regards,

Andzej