adding method to assign an IP to an interface