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
1,095 views 2 comments
by anonymous
Having recently received some support in stopping my modem from scanning, my link is much more reliable now that it's locked to one cell ID.

Now I am only plagued by disconnections precisely every 6 hours.  I am guessing this is a DHCP lease time ?

Is the 6 hour lease time a default or perhaps can be specified in a modem config file ?

Or is it a limit imposed by my provider (Vodafone UK, via ASDA Mobile) (I asked them 10 days ago and am still waiting for a reply).

Thanks in advance for any ideas.
by anonymous
The IP address is leased by Vodafone's network DHCP server and the lease time is set by them and you have no control or ability to modify that.

As a comparison Three (H3G) in the UK typical IP address lease time is 7200 seconds (2 hours)

Check the System Log file for details (System > Administration > Troubleshoot > Troubleshoot > System Log) and look for any issues occurring at the same time as "udhcpc: sending renew to xxx.xxx.xxx.xxx"
by anonymous

Remember, a DHCP lease handed to a client, doesn't go all the way to its expiry before it gets renewed. The protocol specifically says that at lease half-time, a renewal attempt will be requested.

This means for a 6-hour DHCP lease, at roughly the 3-hour mark into that lease, the client will attempt to renew that lease. If it doesn't get a response or the DHCP server is unavailable, it will wait until ~87.5%, and try again.

This page describes the process very well:


* https://lazyadmin.nl/home-network/dhcp-lease-time/

You can check locate where your DHCP leases file is, and other parameters by running the following from inside an SSH session to your RUT. Here is some sample output from mine:

# uci -N show dhcp.@dnsmasq[0]
dhcp.cfg01411c=dnsmasq
dhcp.cfg01411c.domainneeded='1'
dhcp.cfg01411c.boguspriv='1'
dhcp.cfg01411c.filterwin2k='0'
dhcp.cfg01411c.localise_queries='1'
dhcp.cfg01411c.rebind_protection='1'
dhcp.cfg01411c.rebind_localhost='1'
dhcp.cfg01411c.local='/lan/'
dhcp.cfg01411c.domain='lan'
dhcp.cfg01411c.expandhosts='1'
dhcp.cfg01411c.nonegcache='0'
dhcp.cfg01411c.authoritative='1'
dhcp.cfg01411c.readethers='1'
dhcp.cfg01411c.leasefile='/tmp/dhcp.leases'
dhcp.cfg01411c.nonwildcard='1'
dhcp.cfg01411c.dhcpscript='/usr/sbin/dhcpinfo.sh'

And the contents of my /tmp/dhcp.leases file shows:

# cat /tmp/dhcp.leases
1641822904 74:ac:b9:5a:e5:8e 192.168.1.138 * 01:74:ac:b9:5a:e5:8e

That epoch time can be converted to a regular, human-readable date with:

# date -d@"1641822904"
Mon Jan 10 08:55:04 EST 2022

That's the DHCP lease time of that interface on my RUTX11.

My two SIM cards do not have a lease expiry (here in the US, using T-Mobile and Verizon). I can also check that by running `ip a`, and looking at the `valid_lft` and `preferred_lft` time for the interface, for example:

21: qmimux0: <POINTOPOINT,MULTICAST,NOARP,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
    link/none
    inet [REDACTED]/32 brd 255.255.255.255 scope global qmimux0
       valid_lft forever preferred_lft forever
    inet6 [REDACTED]/64 scope link stable-privacy
       valid_lft forever preferred_lft forever

1 Answer

0 votes
by anonymous

  ago by 

The IP address is leased by Vodafone's network DHCP server and the lease time is set by them and you have no control or ability to modify that.

As a comparison Three (H3G) in the UK typical IP address lease time is 7200 seconds (2 hours)

Check the System Log file for details (System > Administration > Troubleshoot > Troubleshoot > System Log) and look for any issues occurring at the same time as "udhcpc: sending renew to xxx.xxx.xxx.xxx"