a method in gateway node for handling an address of a resource of a device in a communications network , the method comprising : generating a first alias representing the address of the device resource , storing the generated alias , in association with the address , receiving a request from an application including the address of the device resource , translating the address to the stored alias , and forwarding the request including the alias to the device , thereby enabling the device to resolve the request by use of the alias in said request .