added auto-discovery of IP address code

added auto-discovery of IP address code