Hello Martin,
try Enhanced Object Tracking, which checks the reachability of the remote next hop address, and, if that address is not reachable, considers the primary connection down. Your configuration would look something like this (the IP addresses in this example obviously are arbitrary):
interface ATM0
description primary_link
no ip address
pvc 0/33
pppoe-client dial-pool-number 1
!
interface BRI0
description backup_link
ip address 192.168.1.1 255.255.255.252
!
rtr 1
type echo protocol ipIcmpEcho 212.17.24.5
timeout 1000
frequency 3
threshold 2
rtr schedule 1 life forever start-time now
track 123 rtr 1 reachability
access list 101 permit icmp any host 212.17.24.5 echo
route map MY_LOCAL_POLICY permit 10
match ip address 101
set interface null 0
!
ip local policy route-map MY_LOCAL_POLICY
ip route 0.0.0.0 0.0.0.0 212.17.24.5 track 123
ip route 0.0.0.0 0.0.0.0 192.168.1.2 254
In newer IOS versions (that is,12.4), the 'rtr' command has been replaced by the 'sla' command, but the functionality is the same.
There are also other parameters you can track. Have a look at the documents below:
Cisco IOS Software Releases 12.3 Special and Early Deployments
Reliable Static Routing Backup Using Object Tracking
http://www.cisco.com/en/US/products/sw/iosswrel/ps5413/products_feature_guide09186a00801d862d.html#wp1071672
Configuring Enhanced Object Tracking
http://www.cisco.com/univercd/cc/td/doc/product/software/ios124/124cg/hiap_c/haipbtrk.htm
Regards,
GP