Why is my IP address not resolving to hostname?

How is a name resolved to an IP address?

We all know that when you want to go on the Internet, your computer has to name resolve the name of your Internet provider, such as abcdefgh.

Com, to a specific IP address such as: abcdefgh.com -> 203.166.144. But if we look at the output from this command (where abcdefgh.com is my home IP address), we can see that the last line of that string of output, which is where the name is resolved, is a link to an HTML document where I do have some DNS information for my site:

However, how does a computer determine that the name is associated with a particular IP address? Does it need to parse a few HTML pages? Is the information in those HTML pages provided by me? My understanding is that one must have a DNS database that gives information about the domain names of a given subnet to name resolve their IP addresses (and the reverse). Since our ISPs do not hand out that database, you still need to know the correct domain name of your ISP. There are no default entries anywhere in the .com or .org zones, or any of the root domains; they must be manually added.

It's called autoconfiguration. It's done in several ways, but ultimately boils down to a list of IPs/hosts/A records on your local DNS. If there is no name in the local DNS that resolves to a particular IP then the name is returned an error. This is why you sometimes see the word not found in your /etc/resolv.conf (the location of your local DNS). However, it's not guaranteed that every domain you try will fail to name resolve until you have a full local DNS (like a web server would have) of all subnets.

I believe the point is that if you don't know the name, the lookup fails with an NXDOMAIN error. On the other hand, if you know the name but not the IP, the lookup still fails with an NXDOMAIN error.

How to resolve hostname to IP address command?

I am trying to resolve the hostname.mydomain.com. The command I have in my script is:
`nslookup hostname.com` What must I change to be able to use nslookup? Assuming that this works on your LAN. Then. You need to tell nslookup where to get its nameserver for each query. The default (built-in) name server(s) that you use will be different everytime, and will differ depending on where you are querying for the IP. It might even come from your router at times and not from your DNS (which would be really weird, and I would wonder what you did when it is the DNS of your network that resolves your domain). You might want to add something like. # Set the root server IP, you're asking to get the IP by querying your DNS. Nameserver 10.1 If it still doesn't work it would be easy to ping your DNS, do some research online to figure out why.

Related Answers

What is DNS and why is it used?

DNS (Domain Name Service) is a network protocol which translates human readable hos...

How do I find my DNS Hostname?

The hostname for google. Com is "dns.com" as well as The ip...

How to get hostname from IP command?

I'm trying to do the opposite of what ping does. I w...