DNS server for new domain
I realize this is not a Linux specific question, but I figure Linux admins have a better understanding of networking in general.
I assume this is a very basic/beginner question, but it has been puzzling me for a little while. Here goes:
If I register a new domain (let's mydomain123.com) and I want to use my own DNS server. After registering the domain name, at the registrar, I want to set my DNS servers to be:
My question is, how does the registrar (or root name servers) know what the ip address of ns1.mydomain123.com is? I will obviously set the IP address on my dns servers. At first glance, I would think this is impossible, since ns1 is just a record inside the specific domain that it is authoritative for. However, I have seen several examples companies who have a setup exactly like this.
Can someone clarify this for me?