Moved ip obtaining from up to ls option