Temat: Problem z dzierżawą DHCP

Hi, I have a constantly repeating problem with OpenWRT, that is at least 2/3 times a day the WAN connection freezes and I have to restart the router.
this is the log

Mon Jul  4 23:25:56 2022 daemon.notice netifd: wan_4 (3909): udhcpc: sending renew to server 10.45.xx.xx
Mon Jul  4 23:25:56 2022 daemon.notice netifd: wan_4 (3909): udhcpc: lease of 10.45.xx.xx obtained from 10.45.xx.xx, lease time 7200
Tue Jul  5 00:25:56 2022 daemon.notice netifd: wan_4 (3909): udhcpc: sending renew to server 10.45.xx.xx
Tue Jul  5 00:55:57 2022 daemon.notice netifd: wan_4 (3909): udhcpc: sending renew to server 10.45.xx.xx
Tue Jul  5 01:10:57 2022 daemon.notice netifd: wan_4 (3909): udhcpc: sending renew to server 10.45.xx.xx
Tue Jul  5 01:18:27 2022 daemon.notice netifd: wan_4 (3909): udhcpc: sending renew to server 10.45.xx.xx
Tue Jul  5 01:22:12 2022 daemon.notice netifd: wan_4 (3909): udhcpc: sending renew to server 10.45.xx.xx
Tue Jul  5 01:24:05 2022 daemon.notice netifd: wan_4 (3909): udhcpc: sending renew to server 10.45.xx.xx
Tue Jul  5 01:25:01 2022 daemon.notice netifd: wan_4 (3909): udhcpc: sending renew to server 10.45.xx.xx
Tue Jul  5 01:25:30 2022 daemon.notice netifd: wan_4 (3909): udhcpc: sending renew to server 10.45.xx.xx
Tue Jul  5 01:25:33 2022 daemon.notice netifd: wan_4 (3909): udhcpc: broadcasting renew
Tue Jul  5 01:25:36 2022 daemon.notice netifd: wan_4 (3909): udhcpc: broadcasting renew
Tue Jul  5 01:25:39 2022 daemon.notice netifd: wan_4 (3909): udhcpc: broadcasting renew
Tue Jul  5 01:25:42 2022 daemon.notice netifd: wan_4 (3909): udhcpc: lease lost, entering init state
Tue Jul  5 01:25:42 2022 daemon.notice netifd: Interface 'wan_4' has lost the connection
Tue Jul  5 01:25:42 2022 daemon.warn dnsmasq[1]: no servers found in /tmp/resolv.conf.d/resolv.conf.auto, will retry
Tue Jul  5 01:25:42 2022 daemon.notice netifd: wan_4 (3909): udhcpc: broadcasting discover
Tue Jul  5 01:25:45 2022 daemon.notice netifd: wan_4 (3909): udhcpc: broadcasting discover

2 (edytowany przez MiG25 2024-08-18 15:40:22)

Odp: Problem z dzierżawą DHCP

You get the leasetime for 120min (7200s) , and after half of that time modem is asking for renew (and this is ok)  , and sometime simply not get it (and it is not modem fault) , and it is needed to restart connection. In openwt "ifup wan " command is enough. To have that you can use one of watchdog. OFW also use some watchdog to do it , if new lease is not received.

Perhaps on other fw of modem lease times can vary . Bu it can also depend from provider as well.

I.e. I have a router (in bridge mode) mc801a with software Elisa , and on revision B13 lease time is 86400 - 24h , and afte OTA update to B17 it is only 300s - 5min ! No idea why so often , but it gives freezes of internet (luckly it reconects hem self).

EDIT: Just checked , and my MF286D with BD_TELIAMF286DV1.0.0B11 also receives lease time 7200. @stich86 , can ou check how this is in Elisa soft ?

3 (edytowany przez MiG25 2022-07-05 11:14:34)

Odp: Problem z dzierżawą DHCP

But lease time still you can check it on OpenWRT ( logread |grep lease )
This lease time is a case of modem - provider only , not the Openwrt or OFW

4

Odp: Problem z dzierżawą DHCP

MiG25 napisał/a:

But lease time still you can check it on OpenWRT ( logread |grep lease )
This lease time is a case of modem - provider only , not the Openwrt or OFW


it 7200s with ELISA1B06:

Tue Jul  5 11:01:27 2022 daemon.notice netifd: wan_4 (4198): udhcpc: started, v1.35.0
Tue Jul  5 11:01:27 2022 daemon.notice netifd: wan_4 (4198): udhcpc: broadcasting discover
Tue Jul  5 11:01:27 2022 daemon.notice netifd: wan_4 (4198): udhcpc: broadcasting select for 10.46.95.29, server 10.46.95.XX
Tue Jul  5 11:01:27 2022 daemon.notice netifd: wan_4 (4198): udhcpc: lease of 10.46.95.XX obtained from 10.46.95.XX, lease time 7200

5 (edytowany przez MiG25 2022-07-05 11:26:50)

Odp: Problem z dzierżawą DHCP

stich86 napisał/a:
MiG25 napisał/a:

But lease time still you can check it on OpenWRT ( logread |grep lease )
This lease time is a case of modem - provider only , not the Openwrt or OFW


it 7200s with ELISA1B06:

Tue Jul  5 11:01:27 2022 daemon.notice netifd: wan_4 (4198): udhcpc: started, v1.35.0
Tue Jul  5 11:01:27 2022 daemon.notice netifd: wan_4 (4198): udhcpc: broadcasting discover
Tue Jul  5 11:01:27 2022 daemon.notice netifd: wan_4 (4198): udhcpc: broadcasting select for 10.46.95.29, server 10.46.95.XX
Tue Jul  5 11:01:27 2022 daemon.notice netifd: wan_4 (4198): udhcpc: lease of 10.46.95.XX obtained from 10.46.95.XX, lease time 7200

Like i said , for this lease time to provider somehow modem has influence.
With the same SIM card conecting to the same cell id , with mf286d i get lease itme 7200 , and with mc801a i get 86400 , and i'm sure if i update it to B17 i'll get 300 ( i several times reverse soft becouse of this).
Maybe someone have a clue ,how this lease time increase it ?

6

Odp: Problem z dzierżawą DHCP

MiG25 napisał/a:
stich86 napisał/a:
MiG25 napisał/a:

But lease time still you can check it on OpenWRT ( logread |grep lease )
This lease time is a case of modem - provider only , not the Openwrt or OFW


it 7200s with ELISA1B06:

Tue Jul  5 11:01:27 2022 daemon.notice netifd: wan_4 (4198): udhcpc: started, v1.35.0
Tue Jul  5 11:01:27 2022 daemon.notice netifd: wan_4 (4198): udhcpc: broadcasting discover
Tue Jul  5 11:01:27 2022 daemon.notice netifd: wan_4 (4198): udhcpc: broadcasting select for 10.46.95.29, server 10.46.95.XX
Tue Jul  5 11:01:27 2022 daemon.notice netifd: wan_4 (4198): udhcpc: lease of 10.46.95.XX obtained from 10.46.95.XX, lease time 7200

Like i said , for this lease time to provider somehow modem has influence.
With the same SIM card conecting to the same cell id , with mf286d i get lease itme 7200 , and with mc801a i get 86400 , and i'm sure if i update it to B17 i'll get 300 ( i several times reverse soft becouse of this).
Maybe someone have a clue ,how this lease time increase it ?

usually lease time is sent by DHCP server, i don't known if you can force from the DHCP client, but server should win

7

Odp: Problem z dzierżawą DHCP

So why "server" is giving different lease times particular modems ( or even the same modem with diferent soft)

8

Odp: Problem z dzierżawą DHCP

MiG25 napisał/a:

So why "server" is giving different lease times particular modems ( or even the same modem with diferent soft)

or may be as you said the client override that time to speed up the re-connect in case of issue

9 (edytowany przez MiG25 2022-07-05 12:44:33)

Odp: Problem z dzierżawą DHCP

So modem can influence somehow ( even if it would be decreasing only). Question is how...
Since other modem can reacive lead time 24h , MF286D only 2h...

10

Odp: Problem z dzierżawą DHCP

yes it's strange, but on my case each 2h there is renew but IP remains the same

11 (edytowany przez MiG25 2022-07-05 14:19:38)

Odp: Problem z dzierżawą DHCP

And as you can see in @nanni85 log , sometimes renew fail... So it is critical moment, so it is better when it is made onl once a day , instead every 2h....
When i had it on mc801a every 5 min i noticed a wan reconnection app. twice in one hour..., witch was very annoing ,that internet freezes for couple of seconds...

EDIT: And since on all our MF286D this time is 7200 (despite different networks , and even countries ) , this value sits somwhere in modem smile

12

Odp: Problem z dzierżawą DHCP

MiG25 napisał/a:

And as you can see in @nanni85 log , sometimes renew fail... So it is critical moment, so it is better when it is made onl once a day , instead every 2h....
When i had it on mc801a every 5 min i noticed a wan reconnection app. twice in one hour..., witch was very annoing ,that internet freezes for couple of seconds...

EDIT: And since on all our MF286D this time is 7200 (despite different networks , and even countries ) , this value sits somwhere in modem smile


usally on 4G networks, lease time are short because device can disconnect often while roaming. I undestant that on fixed line this should be different, in this case most ISP give a SIM with a different profile.

Me, and I think also nanni85 are using a SIM that should be used while roaming..

13

Odp: Problem z dzierżawą DHCP

Może ktoś w ramach edukacji ma kilka modemów, i podzieli się na jaki czas  przydziela IP im nadajnik , przy tej samej karcie SIM i tym samym nadajniku. Czy to jest różne dla różnych typów modemów , i czy zawsze czas jest taki sam ( czuli kilka razy połączyć i rozłączyć).
Bo może ja błędne mam obserwacje...

14

Odp: Problem z dzierżawą DHCP

MiG25 napisał/a:

Może ktoś w ramach edukacji ma kilka modemów, i podzieli się na jaki czas  przydziela IP im nadajnik , przy tej samej karcie SIM i tym samym nadajniku. Czy to jest różne dla różnych typów modemów , i czy zawsze czas jest taki sam ( czuli kilka razy połączyć i rozłączyć).
Bo może ja błędne mam obserwacje...

Ta sama karta Play, ten sam BTS (sprawdzane przez LAC/TAC/CID), modemy: MF286R, Huawei ME906, Sierra Wireless EM7455, Huawei E3272. Za każdym razem czas dzierżawy wynosił 7200.

Masz niepotrzebny router, uszkodzony czy nie - chętnie przygarnę go.

15 (edytowany przez Leo-PL 2022-07-05 18:12:08)

Odp: Problem z dzierżawą DHCP

Huh, wiecie, że udhcpc będzie próbować odnawiać dzierżawę przed jej upłynięciem - o ile pamiętam - przynajmniej w połowie czasu jej trwania? Więc zrywanie sesji to jeszcze inna sprawa.
Można też spróbować zmienić jej czas trwania tak:

config interface wan_4
        option sendopts 'lease:600'

Tu celowo skrócone do 10 minut, by ułatwić wykrywanie spadnięcia łącza.

Też (na Orange) mam dzierżawę na 7200s, a modemy trzymają sesję i po dwa tygodnie.

16

Odp: Problem z dzierżawą DHCP

Dokładnie tak jest. Tylko problemem @nanni85 było to że oprator nie udzieli mu ponownej dzierżawy, więc po prostu wyłączył się interfejs.

Masz niepotrzebny router, uszkodzony czy nie - chętnie przygarnę go.

17

Odp: Problem z dzierżawą DHCP

W Orange dostaję dzierżawę na 86400 (B818 w trybie mostu).

18

Odp: Problem z dzierżawą DHCP

Cezary napisał/a:
MiG25 napisał/a:

Może ktoś w ramach edukacji ma kilka modemów, i podzieli się na jaki czas  przydziela IP im nadajnik , przy tej samej karcie SIM i tym samym nadajniku. Czy to jest różne dla różnych typów modemów , i czy zawsze czas jest taki sam ( czuli kilka razy połączyć i rozłączyć).
Bo może ja błędne mam obserwacje...

Ta sama karta Play, ten sam BTS (sprawdzane przez LAC/TAC/CID), modemy: MF286R, Huawei ME906, Sierra Wireless EM7455, Huawei E3272. Za każdym razem czas dzierżawy wynosił 7200.

Próbowałem na starym modemie 3g Huawei , i tam w logach nic nie było ( jaki lease time jest przydzielony) .
Podłączyłem też na szybko S9 przez tethering , i tam dostał 3600...

Próbowałem też metodą @Leo-PL , i czas faktycznie da się obniżać , ale podwyższać już nie.
Zmieniłem  jednemu  mojemu MC801A w bridge mode czas do 120 ( to jest chyba minimum , bo jest wpisane 60 , a dostaje 120) , i przez cały wczorajszy dzień tak chodził , i ani razu połączenie się nie zerwało...

@Cezary , może wyłącz te posty do innego topica, żeby tu nie śmiecić.

19

Odp: Problem z dzierżawą DHCP

Mam u siebie RB750GR3 jako "główny router" , to niego wpięte 3 R6220 jako dummy AP , oraz dwa MC801A w trybach bridge mode jako modemy ,a w RB750GR3 ustawione MWAN3 i routery w load balancing.
MC801A mają różne FW , pierwszy z Arabii Saudyjskiej , drugi Telia . No i oba dostają lease time 24h , z tym ,że jak zaktualizuje Telia do najnowszego fw , to lease time robi się 5min....
No i najpierw przetestowałem to w ten sposób ,że obniżyłem sztucznie sposobem @Leo-PL tego z Telia do 2min , i przez parę dni nie było z tym problemu , pobierał za każdym razem. ( problemu również nie było przy lease 24h , ale tu ciężko o dłuższe testy).  Natomiast po zaktualizowaniu Telia i lease time 300s , co drugi - trzeci raz MWAN3 rozłączał i ponownie podłączał ten modem....

20 (edytowany przez MiG25 2023-08-01 16:11:09)

Odp: Problem z dzierżawą DHCP

Ciąg dalszy....
Aktualnie na wanb mam MC7010( tu karta Plusha) , na wan jest MC889 z Plusem.
I o ile MC7010 robi renew bez problemu , o tle MC889 rozłącza na 10s wan

Tue Aug  1 16:46:20 2023 daemon.notice netifd: wanb (12713): udhcpc: sending renew to server 10.71.37.233
Tue Aug  1 16:46:20 2023 daemon.notice netifd: wanb (12713): udhcpc: lease of 10.71.37.234 obtained from 10.71.37.233, lease time 86400
Tue Aug  1 16:50:52 2023 daemon.notice netifd: wan (28400): udhcpc: sending renew to server 77.113.80.86
Tue Aug  1 16:50:52 2023 daemon.notice netifd: wan (28400): udhcpc: received DHCP NAK
Tue Aug  1 16:50:52 2023 daemon.notice netifd: Interface 'wan' has lost the connection
Tue Aug  1 16:50:52 2023 daemon.info dnsmasq[1]: reading /tmp/resolv.conf.d/resolv.conf.auto
Tue Aug  1 16:50:52 2023 daemon.info dnsmasq[1]: using nameserver 8.8.8.8#53
Tue Aug  1 16:50:52 2023 daemon.info dnsmasq[1]: using nameserver 8.8.4.4#53
Tue Aug  1 16:50:52 2023 daemon.info dnsmasq[1]: using only locally-known addresses for test
Tue Aug  1 16:50:52 2023 daemon.info dnsmasq[1]: using only locally-known addresses for onion
Tue Aug  1 16:50:52 2023 daemon.info dnsmasq[1]: using only locally-known addresses for localhost
Tue Aug  1 16:50:52 2023 daemon.info dnsmasq[1]: using only locally-known addresses for local
Tue Aug  1 16:50:52 2023 daemon.info dnsmasq[1]: using only locally-known addresses for invalid
Tue Aug  1 16:50:52 2023 daemon.info dnsmasq[1]: using only locally-known addresses for bind
Tue Aug  1 16:50:52 2023 daemon.info dnsmasq[1]: using only locally-known addresses for lan
Tue Aug  1 16:50:53 2023 user.notice mwan3-hotplug[8050]: Execute ifdown event on interface wan (unknown)
Tue Aug  1 16:50:53 2023 user.info mwan3track[1853]: Detect ifdown event on interface wan (wan)
Tue Aug  1 16:50:53 2023 user.notice mwan3track[1853]: Interface wan (wan) is offline
Tue Aug  1 16:50:54 2023 user.notice mwan3-hotplug[8191]: Execute disconnected event on interface wan (wan)
Tue Aug  1 16:51:02 2023 daemon.notice netifd: wan (28400): udhcpc: broadcasting select for 77.113.80.85, server 77.113.80.86
Tue Aug  1 16:51:02 2023 daemon.notice netifd: wan (28400): udhcpc: lease of 77.113.80.85 obtained from 77.113.80.86, lease time 86400
Tue Aug  1 16:51:02 2023 daemon.notice netifd: Interface 'wan' is now up

No i tak co 12 godzin... Komuś to coś mówi ?
W szczególności co to jest "udhcpc: received DHCP NAK"

21

Odp: Problem z dzierżawą DHCP

Odmowa przyznania dzierżawy.

Masz niepotrzebny router, uszkodzony czy nie - chętnie przygarnę go.

22

Odp: Problem z dzierżawą DHCP

Do wanu dodałęm opcję "option sendopts 'lease:600' " , no i teraz co 5 min jest ten brak odnowienia dzierżawy ( bo przyznawać to przyznaje po restarcie wanu)

root@OpenWrt:~# logread |grep NAK
Tue Aug  1 17:21:52 2023 daemon.notice netifd: wan (4584): udhcpc: received DHCP NAK
Tue Aug  1 17:27:01 2023 daemon.notice netifd: wan (4584): udhcpc: received DHCP NAK
Tue Aug  1 17:32:08 2023 daemon.notice netifd: wan (4584): udhcpc: received DHCP NAK
Tue Aug  1 17:37:20 2023 daemon.notice netifd: wan (4584): udhcpc: received DHCP NAK
Tue Aug  1 17:42:35 2023 daemon.notice netifd: wan (4584): udhcpc: received DHCP NAK

Jakieś pomysły na to , czy to kwestia operatora ?

23

Odp: Problem z dzierżawą DHCP

Urządzenie po prostu ci odmawia przyznania.

Masz niepotrzebny router, uszkodzony czy nie - chętnie przygarnę go.

24 (edytowany przez MiG25 2023-08-01 19:29:25)

Odp: Problem z dzierżawą DHCP

Najlepsze jest to , że przestaje odmawiać , jak ustawię domyślnie połączenie 5G/LTE/3G  , jak ustawię LTE/3G to takie coś się dzieje...

5G u mnie może daje coś więcej ( nawet jeśli to niewiele), ale chciałem potestować jak będzie na "strym dobrym" LTE..

EDIT: Nie to jednak nie to, któreś kolejne przełączenie , i również na 5G nie robi release.

EDIT2 : Raczej kwestia z jakiej grupy IP się dostało... np . przydzielony IP 31.1.x.x jest ok , ale 77.112.x.x jest problemem.

25

Odp: Problem z dzierżawą DHCP

MiG25 napisał/a:

Najlepsze jest to , że przestaje odmawiać , jak ustawię domyślnie połączenie 5G/LTE/3G  , jak ustawię LTE/3G to takie coś się dzieje...

5G u mnie może daje coś więcej ( nawet jeśli to niewiele), ale chciałem potestować jak będzie na "strym dobrym" LTE..

EDIT: Nie to jednak nie to, któreś kolejne przełączenie , i również na 5G nie robi release.

EDIT2 : Raczej kwestia z jakiej grupy IP się dostało... np . przydzielony IP 31.1.x.x jest ok , ale 77.112.x.x jest problemem.

Ale że jak? ISP w zależności jaki przydzielił IP na BTS-ie to DHCP w routerze nie przydzielało adresów IP i była odmowa dostępu, czy jak to rozumieć?