Imagine you have master with IP 111.111.111.111 and slave with IP 222.222.222.222.
So, create 'dns template' (let say) as 'masterdns' and 'slavedns' where:
1. masterdns with 111.111.111.111 as ns1 and 222.222.222.222 as ns2
2. slavedns with 222.222.222.222 as ns1 and 111.111.111.111 as ns2