determine network interface position automatically