We switched from shared hosting to a VPS at HostGator. They told us we needed to go into the domain registrar (Moniker) and setup "private nameservers" as ns1.domain.com and ns2.domain.com. We did that, and set A records at Moniker to point to our server IPs. That worked for a while, and then randomly decided to stop working after about 4 days.
On the VPS, we have dns records for ns1.domain.com and ns2.domain.com which also point to our server IP addresses. I've been fighting this for days now and can't figure it out.
When I type in domain.com in my browser, it should go to the nearest (my ISP) DNS server and ask where to send it. If it doesn't know, it should go out and ask the next available one. I get that. But how does the DNS server update with the correct IP? Does it ask the registrar of a domain name? If ns1.domain.com points to our server, do we need it to be running DNS software? Can I instead make ns1.domain.com point to the ns1.moniker.com?
Can somebody please explain to me what a private name server is in this regard and how it works? The Google machine just isn't helping me understand this at a fundamental level.