DNS and hostname resolution


 
Thread Tools Search this Thread
Special Forums IP Networking DNS and hostname resolution
# 1  
Old 10-21-2015
DNS and hostname resolution

I've always been confused by technical discussions of DNS. They say that DNS is used to match a domain name with the IP address of a host on the Internet. The thing that confuses me is this premise that there is an exact, one-to-one correspondence between Internet domain names and hosts on the Internet. I find that to be a gross oversimplification. Like youtube.com is one computer. Is there really one computer for the domain www(.)youtube(.)com? I find that hard to believe. Considering that there are literally billions of videos on YouTube, I find it really hard to believe that all of them are stored on one computer. The same goes for things like Facebook. I seriously doubt that every single Facebook profile in the world is stored on a single server.

So I need someone to straighten this out for me. How does this work? What are these explanations of DNS leaving out of the picture? I'm sure domain names are, in fact, often distributed over multiple servers. It's possible these servers have the same IP address due to network address translation, so that might be an explanation. Also, do they have different hostnames that need to be resolved, and is this additional hostname resolution done with another directory service like NIS?
# 2  
Old 10-21-2015
Using nslookup you can explore domains
Code:
nslookup -q=ns youtube.com

and hosts
Code:
nslookup -q=a youtube.com

The host entry is for convenience. Normally servers are inside the domain; e.g. by convention a Web server gets a www. prefix.
In fact
Code:
nslookup -q=a www.youtube.com

gives the same result.
--
Interesting, the IPv6 lookups differ; I guess they use a different distribution mechanism.
Code:
nslookup -q=aaaa youtube.com

Code:
nslookup -q=aaaa www.youtube.com


Last edited by MadeInGermany; 10-21-2015 at 02:40 PM..
This User Gave Thanks to MadeInGermany For This Post:
# 3  
Old 10-22-2015
Okay, so there are many hosts for the domain youtube.com. I understand somewhat better now. How does DNS figure out which host to use after it narrows down the domain?
# 4  
Old 10-22-2015
Dns is just a lookup table. And yes, it can return multiple records for a query. It's supposed to provide a cheap man's round robin on the returns (but you never know how many things are doing lookups, so sort of random). You can run your own DNS server, point to it and lie (if you want) about being authoritative for "whatever" (e.g. unix.com). Then all clients can be tricked into seeing your mappings for unix.com if they use your "tricky" DNS. You could cache other non-housed requests.... so you DNS would be "complete", but doing a tricky override for "whatever" you wanted to lie about. Hopefully this scares you a bit and it's a good segue into DNSSEC, etc...


Do a query, pick the first answer. That's how it's normally done.

Queries for records you don't house start at the root (of all... the root servers... "dot" if you will), then goes to what we call the TLDs and so on. If you own a registered domain, you can associate a DNS to it to build the relationship required (if you do this without cooperation of the holder of the parent zone this won't work, the parent zone has to know how to delegate requests to your server... sometimes the parent zone will stand authoriatative for your zone by default and they'll handle servicing your records... but normallly, you'd tell them about your server and that it will now stand authoritative for those zone (your registered domain).

Oh... and there is some caching going on the speed this lookups up quite a bit.. but the root servers get hit pretty hard.

There are good books out there... I recommend you look at the documentation at: https://www.isc.org/support/
# 5  
Old 12-16-2015
You can approach it from various angles:
a) 1-to-1 mapping is not strictly correct. It can be as many as you want to point your domains to a specific IP. For example, I have this public IP 8x.73.1.9 (all made up, course). And I registered 3 domains: mydomain.com, myotherdomain.net, mythirdsite.org. I can have them all pointed to the same IP. Assuming that I have setup web servers (or mail servers) to each and one of them, they can serve contents distincts from one another while sharing the same IP and users won't even notice that they are connected to 1 IP.

b) With regards to big companies, the IPs that you are connecting to are the ones closest to your location. So 2 people (who are geographical separated) both connecting to youtube.com are actually connecting to different IPs. That is made possible by CDNs, DNS etc. I think IPv6 has inherent support for it via anycast.

c) IPs used by big co's are mostly virtual. Meaning they are not actually tied to a single machine but rather to a group of machine. That provides huge bandwith, failover, loadbalancing etc.

Sorry for my English, I tried my best.

Last edited by mr_zeratul; 12-16-2015 at 03:07 PM.. Reason: typo
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. IP Networking

DNS problem : ping doesn't recognize hostname

I have vmware on my windows PC ( hostname : acer ). vmware has RHEL 7 ( hostname : rhel7 ) installed recently. RHEL IP configuration IP : 192.168.5.128 Netmask : 255.255.255.0 ssh to rhel7 works from acer using putty resolve.conf cat /etc/resolv.conf nameserver 192.168.5.1 host... (12 Replies)
Discussion started by: hiten.r.chauhan
12 Replies

2. UNIX for Advanced & Expert Users

Hostname -f hostname: Unknown host

deleted (0 Replies)
Discussion started by: hce
0 Replies

3. Red Hat

DNS Resolution Issue

Hello, Having issue resolving DNS using the IP address. Using the server Name it resolves fine. Was wondering if there is any configuration issue. # nslookup xxxxxxxx01 Server: Primary DNS IP Address: Primary DNS IP#53 Name: xxxxxxxx01.local domain Address: x.y.z.123 # nslookup... (1 Reply)
Discussion started by: ikn3
1 Replies

4. Red Hat

ssh with easy dns resolution

In my work env we have a lots of hosts. most all the hosts are in similar hostnames for eg cluster11.data.corp.sb1.uni.com, med123.data.corp.sk1.uni.com, also we have some server is colo network which have the host name like cluster11.data.colo.sb1.uni.com Please help me to make the... (2 Replies)
Discussion started by: unimaxlin
2 Replies

5. Emergency UNIX and Linux Support

HP UX - ILO Console hostname different than Machine Hostname...

Hi All, So we added a new HP-UX 11.31 machine. Copied OS via Ignite-UX (DVD)over from this machine called machine_a. It was supposed to be named machine_c. And it is when you log in...however when I'm in the ILO console before logging in, it says: It should say: What gives? And how do... (4 Replies)
Discussion started by: zixzix01
4 Replies

6. UNIX for Advanced & Expert Users

DNS server choice: Windows DNS vs Linux BIND

I'd like to get some opnions on choosing DNS server: Windows DNS vs Linux BIND comparrsion: 1) managment, easy of use 2) Security 3) features 4) peformance 5) ?? I personally prefer Windows DNS server for management, it supports GUI and command line. But I am not sure about security... (2 Replies)
Discussion started by: honglus
2 Replies

7. UNIX for Advanced & Expert Users

Forward/Reverse Hostname Resolution for Oracle Install

I've got an old v880 running Sol10 that is going to another location. When the system moves, the domainname in resolv.conf will change also. My DBA's are going through the steps of installing Oracle on the box and they want the install program to resolve the hostname is if the box were already in... (2 Replies)
Discussion started by: bluescreen
2 Replies

8. UNIX for Dummies Questions & Answers

Solaris - unknown hostname - how can I change hostname?

Hello, I am new to Solaris. I am using stand alone Solaris 10.0 for test/study purpose and connecting to internet via an ADSL modem which has DHCP server. My Solaris is working on VMWare within winXP. My WinXP and Solaris connects to internet by the same ADSL modem via its DHCP at the same... (1 Reply)
Discussion started by: XNOR
1 Replies

9. Solaris

DNS name resolution

Hi, I got solaris 10 installed on a E250 and i am expericing issues resolving dns. from some research i think it's becuase where i haven't set-up NIS and i don't intend too as i am just setting up a box to poke communigate pro. Any help or advice please? Thanks in advance Alan (1 Reply)
Discussion started by: e250user
1 Replies

10. UNIX for Advanced & Expert Users

hide hostname in dns

Hi everyone ... I want to configure my dns in order to answer to two differents url, for example when the people put www.mywebsite.com.mx or put mywebsite.com.mx ( without www ) my dns could send all the request to the same page an example of this is microsoft.com and www.microsoft.com. ... (4 Replies)
Discussion started by: lusifer
4 Replies
Login or Register to Ask a Question