Feel smarter than your router in 60 seconds.
I would think one of dynamic DNS client utilities might do this... Check through the list here and see if any allow running an external command on detection ...
The bash script described here can change Linux systems' IP addresses from dynamic to static with much less manual work. Changing the IP address of a Linux system from dynamic to static is not ...