Updated API to add support for subnet_mask for router mode