[PLUG] How to detect ppp address change remotely?

Mike Connors mconnors1 at gmail.com
Sun Mar 18 19:34:30 UTC 2012


>
> > Tom> Hello all, We have several installations of embedded wireless
> > Tom> routers (running slack on a 2.4 kernel) in which the gateway
> > Tom> router_1 uses a Verizon 3G USB modem (ppp0) as its connection to
> > Tom> the outside world, and one or more downstream router_2 have
> > Tom> 5.8Ghz wireless links to router_1, and thus route traffic to the
> > Tom> outside world through the same ppp0 3G connection.
> >
> > Tom> Verizon has a habit of constantly changing the ppp0 IP address
> > Tom> often sometime several time per hour. I would like to figure out
> > Tom> a way that the downstream router_2 can be made aware of that ppp0
> > Tom> address change at router_1 within a minute or two of it
> > Tom> happening. The obvious way seemed to be running a cronjob
> > Tom> traceroute from the router_2 to a known outside IP, with a limit
> > Tom> of two of three hops, and grepping the first public IP and
> > Tom> looking for the change. However, for some reason that shows the
> > Tom> Verizon gateway router on their tower as the first public IP
> > Tom> rather that the locally assigned ppp0 public IP address. Any
> > Tom> suggestions for how to determine that ppp0 IP using standard
> > Tom> tools and pref. without writing e.g. inter-router communications
> > Tom> scripts etc. would be welcome.
> >
> > Tom>
> >
> verizon_tower------------------[3G_modem(ppp0)]-[router_1]---------------[5.8Ghz_link]----------------[router_2]
>
>
> Does Router_1 have a resolvable DNS name such as:
> ae-4-0-ar03.troutdale.or.bverton.comcast.net (68.85.243.253) ?
>
> If so, a simple ping of the DNS name will return a the newly changed ip
> address. Then compare that ip addr to the old ip addr and update router2
> accordingly.
>
> Also, do you have command line access of Router_1 ?
>
> If so, you could run the command below in combination with a ping script.
> So that you ping the existing ip addr at a specified interval, the ping
> fails 3 times in a row you export the new ip addr and the update downstream
> routers accordingly.
>
> export VARIABLE=`ifconfig ppp0 | grep "inet addr" | awk '{ print $2 }'
> | awk 'BEGIN { FS=":" } { print $2 }'`
>
>
>



More information about the PLUG mailing list