script for detecting ip addresses on the interfaces