hi, i have nameservers in my domain (let's say ns1.mydomain.com n ns2.mydomain.com) that registered for my first vps, i want to make 2 more nameservers from my domain for my second vps (ns3.mydomain.com n ns4.mydomain.com), so i have 1 domain with 4 nameservers in 2 vps (2 ns in each vps), it would be like this.
ns1 n ns2 is working (can connect to the first vps), but ns3 n ns4 isn't work (cannot connect to the second vps), in different way i tried to make ns3 n ns4 for the second vps with different domain and it's work, it would be like this.
You need to have appropriate A records pointing those subdomains (i.e. nsX.domain) to the correct IP of course, and ensure they're put into the root servers by your registrar as well (i.e. for domain.com).
In the zone for domain.com you should have A records for each nameserver.
For example if you have:
(184.108.40.206 and 220.127.116.11 are IPs on VPS 1)
(18.104.22.168 and 22.214.171.124 are IPs on VPS 2)
The nameservers which are responsible for domain.com should have a DNS zone of course. In that you should have whatever records you like (e.g. if you have a website on that domain you may have records for mail. www. ftp. and so on), and some additional A records which are basically as above - i.e. pointing each of those nameserver addresses to the appropriate IP address.
You should also contact your domain registrar for domain.com and ensure that the nameservers are properly registered at the registry (i.e. you need to tell your domain registrar that you want to create some nameservers on domain.com with addresses and IPs as above).
Obviously you need to substitute the domain and IP addresses accordingly
im just curious why you need to have 4 NS for your domain? You are not benefiting from redundancy since your ns1/ns2 are on the same server - same thing with the other. It would be more beneficial if you just have ns1 on vps1 and ns2 on vps2.
Also what kind of NS are you using (i.e. BIND, etc.). If you are using BIND, you can set up a master-slave setup and let the system do zone transfers.