Added ability to specify ip address of self.