martybugs.net SmoothwalL Express Info
 navigation
. MartyBugs home
. Smoothwall home
 
 Smoothwall info
. my box
. connect speed display
. red IP address display
. bytes in/out
. VNC over SSH
. time sync
. ad zapping
. ip accounting on 0.9.9 / 1.0
. ip accounting on 2.0
. status LEDs
. adding web users
. iptables config
. internal PPTP VPN
. RRDTool traffic graphs
. password reset
. proxy log analysis
. RRDTool memory graphs
. Squid config
. adding shell users
. Smoothwall links
 
 modem config
. Billion 7402L adsl router
. DSL-300G adsl modem
. DSL-300+ adsl modem
 
 site search
Custom Search
 
Adjusting DHCP Lease Time On DSL-300G ADSL Modem

This page provides information for adjusting the DHCP server lease time on a DLink DSL-300G Generation II ADSL modem.

DLink DSL-300G Generation II ADSL modem

ADSL Failures
I run a Smoothwall box behind my ADSL modem, with the Smoothwall's red interface configured for getting a DHCP IP address from the modem's internal DHCP server.

After upgrading from a trusty DSL-300+ modem to a newer DSL-300G GenII ADSL modem, I found my Smoothwall would occasionally fail to reconnect after the ADSL connection briefly dropped out.

The ADSL modem would happily reconnect to my ISP, but Smoothwall's red interface would continue to hold on to the old IP address it had been given by the modem, and as a result, Smoothwall could not communicate with the modem or the internet.

The only fix was to reboot Smoothwall, or manually restart Smoothwall's red interface using

/etc/rc.d/rc.netaddress.down; /etc/rc.d/rc.netaddress.up

The Culprit
Some further investigation found that the DSL-300G modem was giving out DHCP IP addresses to Smoothwall's red interface with a lease time of 30 days.
This is evident from the DHCP client info on Smoothwall (in /etc/dhcpc/dhcpcd-eth2.info, where eth2 is the red interface):

LEASETIME=2592000 
RENEWALTIME=1296000
REBINDTIME=2268000

However, my DSL-300+ modem only used to give out DHCP IP addresses with a lease time of 60 seconds, thus ensuring Smoothwall (or any other device connected to the modem's ethernet port) will immediately notice if the modem's DHCP server sends notification a new IP address.

Apparently the default DHCP lease time on the DSL-300G is actually 60 seconds, but it appears that deleting and re-creating the DHCP server configuration in the modem changes the lease time to 30 days.

Changing The DHCP Lease Time
While you can delete and re-create the DHCP server configuration, there is no way to change the DHCP lease time via the modem's web interface.

To do so, connect to the modem's telnet server:

telnet 10.1.1.1

Login using admin as the username and password.

To change the DHCP server default and maximum lease times, use the following command:

modify dhcp server pool poolid 0 dlease 60
modify dhcp server pool poolid 0 mlease 60

Save your changes to the modem's flash memory, and reboot the modem to make your changes take effect:

commit
reboot

Force Smoothwall's red interface to request a new DHCP lease from the modem by running the following from a command prompt on Smoothwall:

/etc/rc.d/rc.netaddress.down; /etc/rc.d/rc.netaddress.up

and verify the new lease duration by checking in /etc/dhcpc/dhcpcd-eth2.info on Smoothwall, and you should see something like:

LEASETIME=60
RENEWALTIME=30
REBINDTIME=52

Results
Since making this change, I haven't experienced any futher isolations between Smoothwall and the DSL-300G modem. Smoothwall always recovers after any ADSL outage.



last updated 28 Oct 2004
 
.