Set replication network without replication port

* Fixes logic failure where repl_port was checked first
* Allow port or ip to be defined and defaults to be used

Fixes #568