added code for wp2p ports setting based on ids as offset and
communicating it to master