Koozali.org: home of the SME Server

Legacy Forums => Experienced User Forum => Topic started by: Kelvin on June 07, 2002, 08:57:58 AM

Title: Bigpond cable reconnection & DynDNS
Post by: Kelvin on June 07, 2002, 08:57:58 AM
Hi All,

Does anyone know why (or a fix for) this is happening :-

From time to time, Telstra Bigpond Cable access here in Australia goes off the air. If we watched the messages log file, you can see bpalogin keep trying to relogin to Bigpond at regular intervals, and fail (Can't connect to Auth server). This seem to want to continue indefinitely even after Bigpond Cable comes back online and so the server never reconnects to the internet until I perform a reboot. After rebooting, the connection to the internet is fine again.

The second problem arising from this is, my DynDNS record does not get updated after bpalogin reconnects to BigPond even though the IP address has changed. The mechanism that checks if the IP address changes and updates my DynDNS record works fine as long as the change happen while there was no interruption of service to BigPond (meaning the Bigpond service at the ISP end did not actually go off the air). But because, I had to reboot in order to reconnect to BigPond, my DynDNS record did not get updated. Any reason why ?

TIA !

Kelvin
Title: Re: Bigpond cable reconnection & DynDNS
Post by: Paul Treleaven on July 20, 2002, 04:49:13 AM
Hi,
I am looking at the same issues for the 5.5 set up. This is a link to what I have in mind.. Comments and recomendations please.
Paul

http://users.bigpond.net.au/lwells/smoothwall/
Title: Re: Bigpond cable reconnection & DynDNS
Post by: Paul Treleaven on July 20, 2002, 04:56:44 AM
This could also help..

http://sourceforge.net/docman/display_doc.php?docid=2750&group_id=19555

Paul
Title: Re: Bigpond cable reconnection & DynDNS
Post by: Damien Curtain on July 20, 2002, 06:07:51 AM
Kelvin wrote:
>
> Hi All,
>
> Does anyone know why (or a fix for) this is happening :-
>
> From time to time, Telstra Bigpond Cable access here in
> Australia goes off the air. If we watched the messages log
> file, you can see bpalogin keep trying to relogin to Bigpond
> at regular intervals, and fail (Can't connect to Auth
> server). This seem to want to continue indefinitely even
> after Bigpond Cable comes back online and so the server never
> reconnects to the internet until I perform a reboot. After
> rebooting, the connection to the internet is fine again.
>
> The second problem arising from this is, my DynDNS record
> does not get updated after bpalogin reconnects to BigPond
> even though the IP address has changed. The mechanism that
> checks if the IP address changes and updates my DynDNS record
> works fine as long as the change happen while there was no
> interruption of service to BigPond (meaning the Bigpond
> service at the ISP end did not actually go off the air). But
> because, I had to reboot in order to reconnect to BigPond, my
> DynDNS record did not get updated. Any reason why ?

Be careful if you hvae one of their newer docsis compliant modems. I've seen in a case where the modem itself issues a dhcp lease to the e-smith machine when the auth server is unavailable. I have the older motorola modems myself which doesn't do this.

In fact you can log into your modem if you have one of those types at I think http://192.168.100.1

If this isnt the case then ignore it, if it is the lease asked for by the dhcp client on sme asks for the longest lease possible, and is given an indefinate lease by the modem. The dhcp client then says, well its an infinite lease, Ill exit. So no chance of it ever retrying.

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.
--
 Damien
Title: Re: Bigpond cable reconnection & DynDNS
Post by: Kelvin on July 20, 2002, 07:51:43 AM
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 .... :) )


Cheers,

Kelvin
Title: Re: Bigpond cable reconnection & DynDNS
Post by: Damien Curtain on July 24, 2002, 05:32:59 AM
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