Kelvin wrote:
>
> Hi Damien,
>
> Thanks for your input. You are correct in that the modem is a
> DOCSIS type.
>
> > What we do is monitor to see whether the ip lease given is
> the bogus one that
> > always is given, a 192.168.100.x one in this case, and if
> so continue to prod at
> > intervals for a new ip address, when a real one is given
> ensure bpalogin is
> > updated, sleep untill it has actually logged in, then
> update the dynamic dns
> > entry.
>
> This certainly sounds like a plan. Now the question, How do
> we do this (and automatically) ? Bear in mind, I'm no expert
> at Linux (can just get by ....

)
Ok most simple solution is to pass a -l flag to dhcpcd, I know telstra honours it (which is a shame as you could have set a very low one) and I'm told the cable modem honours it.
This at least means if Telstra goes off the wire it will continue to ask for a new IP at the set interval, rather than getting an infinite lease from the modem and then exiting.
The file in question isn't templated so you can use rcs or someother method if you wish to track changes, the file is: /etc/sysconfig/network-scripts/ifup
The part you need to alter is:
if [ "$ExternalDHCP" = "d" ]; then
DHCPCDARGS="-R -d ${DHCPHostname}"
elif [ "$ExternalDHCP" = "dh" ]; then
DHCPCDARGS="-R -d -h ${DHCPHostname}"
else
DHCPCDARGS="-R -d -h ${DHCPHostname} -I ${DHCPHostname}"
fi
changing it to:
if [ "$ExternalDHCP" = "d" ]; then
DHCPCDARGS="-R -d ${DHCPHostname} -l 3600"
elif [ "$ExternalDHCP" = "dh" ]; then
DHCPCDARGS="-R -d -h ${DHCPHostname} -l 3600"
else
DHCPCDARGS="-R -d -h ${DHCPHostname} -I ${DHCPHostname} -l 3600"
fi
or whatever lease time you want to ask for, I wouldnt set it any lower myself. (The last one is what's sent to telstra, but change them all to be sure)
Might fix your issues, its fixed a few machines around the traps here who have the same issue with Telstra cable.
To restart it without loosing your ip send a sigterm
killall -SIGTERM dhcpcd
ifup eth1
or whatever your external interface is.
A friend of mine found out the hard way you dont send a sigterm to dhcpcd remotely:)
--
Damien
--
Damien