DHCP dinamic becoming static

Report wireless and/or network connectivity problems in this forum.

Moderator: Moderators

Post Reply
sedilson
Posts: 7
Joined: Fri Jan 19, 2018 12:19 pm

DHCP dinamic becoming static

Post by sedilson »

Greetings! Late merry Christmas and early happy new year.

Gargoyle setup is working great for few years. One of the reasons to use it is to have a tight control over my network.
Recently I have noticed that a couple of devices seems to request an IP using DHCP but not requesting again once the lease expires, sticking to the original IP forever.
That happens with a FireTV stick and LGWebOS TV.
I can see on "/etc/dhcpleases" the following:

Code: Select all

1609202493 aa:11:bb:22:cc:33 192.168.2.30 DEVICE01 01:aa:11:bb:22:cc:33
1609166895 bb:22:cc:33:dd:44 192.168.2.26 WebOSTV *
1609182643 cc:33:dd:44:ee:55 192.168.2.33 DEVICE02 01:cc:33:dd:44:ee:55
1609199031 dd:44:ee:55:ff:66 192.168.2.51 FireStick *
1609199882 ee:55:ff:66:aa:77 192.168.2.32 DEVICE03 01:ee:55:ff:66:aa:77
1609202196 ff:66:aa:77:bb:88 192.168.2.42 DEVICE04 01:ff:66:aa:77:bb:88
also inspecting iptables I see:

Code: Select all

target     prot opt source               destination
REJECT     all  -- !FireStick.lan        anywhere             MAC dd:44:ee:55:ff:66 reject-with icmp-port-unreachable
REJECT     all  --  FireStick.lan        anywhere             MAC ! dd:44:ee:55:ff:66 reject-with icmp-port-unreachable
* WebOSTV sue to be there but I have deleted...

So, I was wondering:
  1. What the star means in the dhcp leases file?
  2. What the "01" in front of each MAC in the line end of dhcp lease file?
  3. What's the purpose, meaning and how those rules get on iptable?
  4. The reason of all those questions: While is not causing any problem to my network, is there a way to force the DHCP client to renew the IP from DHCP server side? Any tips?

RomanHK
Posts: 794
Joined: Sat May 04, 2013 4:18 pm
Location: Czech Republik

Re: DHCP dinamic becoming static

Post by RomanHK »

Something to explain: http://lists.thekelleys.org.uk/pipermai ... 00734.html

:idea: You could also try enabling this option to filter: viewtopic.php?f=5&t=12790&p=57922#p57922
Turris Omnia with OpenWrt 21.02 - Tested
Linksys WRT3200ACM with Gargoyle 1.13.x
TL-WR1043ND v2 with Gargoyle 1.10.0

http://gargoyle.romanhk.cz custom builds by gargoyle users

Lantis
Moderator
Posts: 6735
Joined: Mon Jan 05, 2015 5:33 am
Location: Australia

Re: DHCP dinamic becoming static

Post by Lantis »

Enforce DHCP is already on, hence the iptables rules shown.
Devices don't hop IPs unless they have to. If they request am address and get it, they will continue to renew that same address as long as possible unless told to do something else.
http://lantisproject.com/downloads/gargoyle_ispyisail.php for the latest releases
Please be respectful when posting. I do this in my free time on a volunteer basis.

sedilson
Posts: 7
Joined: Fri Jan 19, 2018 12:19 pm

Re: DHCP dinamic becoming static

Post by sedilson »

Thanks RomanHK. That helped me to better understand.

Lantis wrote: If they request am address and get it, they will continue to renew that same address as long as possible unless told to do something else.
This is what's is not happening, therefore my post here.

I read a little bit more to assure that my understanding is not work about DHCP leases.

Leases expire so the client should request lease extension or start over if lease extension is not possible for some reason. This way it's slave to the process.
However, a specific device is not following that.
Once the DHCP server leases an IP to that mac, it binds it like a static IP, so no more leases are seem on DHCP monitoring.
In other words, the device is neither extending starting over.
Lantis wrote: Enforce DHCP is already on, hence the iptables rules shown.
This is a block enforcement as I see. I.e. if the IP/MAC bind is not respected traffic will be blocked.
This is totally different from enforce that a client is flowing the DHCP flow.
I have found how it's enabled on iptables (RomanHK DHCP enforcement, that was already enabled) and that's disabled by now since is not helping.
....


For now, I found that, if for force device to disconnect from WiFi, by disabling/enabling radio on router, once reconnected it will properly flow the DHCP process.
I need to find now a way to maybe force that client only to disconnect.

Post Reply