auto calculate local ip addr