LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 05-20-2004, 09:35 PM   #1
davidas
Member
 
Registered: Mar 2004
Distribution: Debian 'Sarge'
Posts: 168

Rep: Reputation: 30
Need some basic knowledge on how DNS work


I have setup a Debian box and register for a free domain with www.no-ip.com. My registered domain( or hostname?? ), toy.no-ip.com, is now pointing to my internet IP, 200.100.100.100.

1) Is toy.no-ip.com my debian box's hostname or domain name? If it is the domain name, does it mean all other PCs in my network will be <some-hostname>.toy.no-ip.com ?

2) What is the difference in url between http://toy.no-ip.com and http://www.toy.no-ip.com?

3) If I have configured www to be the same debian box, how is the traffic routed each time someone key in the url http://www.toy.no-ip.com?

Thanks
 
Old 05-20-2004, 10:15 PM   #2
Qucho
Member
 
Registered: Mar 2004
Location: Colorado, US
Distribution: Debian "Sarge"
Posts: 228

Rep: Reputation: 30
Roughly... here is the deal... in lame noob words.

DNS stands for Domain Name Server.

Think in it as your phone number... it is unique... so if I dial it fron anywhere in the world... it will only ring in your phone... same is with IP's, they are unique arroun the world.

Do you know what is the IP for www.google.com ? nor do I !! is hard to remember numbers. So let put it a NAME !!!! That name is "google.com"

How you computer know what is the number to dial for "googgle.com" ? you PC does NOT !!

You PC will consult the DNS database provided by your ISP. Once your PC knows what is the IP for such name, is when it will dial and make the connection.

Now, each time you connect to your ISP, you get a lease for an IP, this IP is unique arround the world. When you register a DNS, the registrar will inform the Domain Name Servers arround the world that 'sumting.com' has the IP ###.###.###.###

Ohh... but your ISP tomorrow will assign you a new IP !! darn... kinda sucks to have dinamic IP... and to update the DNS's usually takes days !!!

SO you get a service from a g uy with a persistant IP and name (like 'www.no-ip.com)

Now you need to inform www.no-ip.com of your new IP EACH time you conect to the internet.

People will make a call to no-ip.com, and the call will be forwarded to your present IP.

The name that you use for the domain name in your INTRANET are never known to the outside world (if you chose so), since they are in different networks.

There are LOTS of totorial in this topic, LOTS of them, I am sure you did none to little effort searching the web in this topic. But, just google a bit, and you will find more extensive explinations.
 
Old 05-21-2004, 03:30 AM   #3
huangzen
LQ Newbie
 
Registered: May 2004
Location: Sacramento
Posts: 18

Rep: Reputation: 0
but how do you "tell" the DNS that this domain name is belone to you and please pointing this domain to MY IP address??? do you do this on your own linux system or it's has to be done on where you register your domain name from?
 
Old 05-21-2004, 03:52 AM   #4
btmiller
Senior Member
 
Registered: May 2004
Location: In the DC 'burbs
Distribution: Arch, Scientific Linux, Debian, Ubuntu
Posts: 4,284

Rep: Reputation: 371Reputation: 371Reputation: 371Reputation: 371
When you register your domain, you are allowed to specify which name servers are to be authoritative for it. You generally do this through a form on your registrar's Web site. At this point, it is your responsibility to configure those DNS servers to set up the hosts in your domain, any MX (Mail eXchange) records etc. There are a number of free DNS sites that will allow you to use their DNS servers. I've never used them as I have my own servers to use, but from what I've heard, they're generally quite user friendly. You can do your own DNS hosting, but you'll need both a primary and secondary nameserver that are more or less permanantly connected to the Internet with a static IP. Also, you may need to register them as name servers -- I'm not sure, as I did not do the initial configuration of the servers I use. In general, DNS administration is a pretty advanced topic, and requires a bit of work to understand, so it may be best to just use someone else's DNS servers.
 
Old 05-21-2004, 05:29 PM   #5
huangzen
LQ Newbie
 
Registered: May 2004
Location: Sacramento
Posts: 18

Rep: Reputation: 0
Exclamation

Quote:
You can do your own DNS hosting, but you'll need both a primary and secondary nameserver that are more or less permanantly connected to the Internet with a static IP. Also, you may need to register them as name servers
Here is what I don't understand. some hoster out there can provide me free DNS which by redirecting the domain name to my own IP address. so in domain name control panel where I registered my domain, I can type for example ns2.freednshost.com ns1.freednshost.com. BUT how can I use my own DNS which is ns1.mydomain.com? cause if I set ns1 as ns1.mydomain.com in the domain name control panel. then it's makes me think everybody can set their DNS to ns1.mydomain.com and using their IP. How and who restrict it?
 
Old 05-21-2004, 05:44 PM   #6
peacebwitchu
Member
 
Registered: Apr 2004
Distribution: Debian
Posts: 185

Rep: Reputation: 30
You have to own the domain not a hostname. So you would need to register with a registrar and tell them that mydomain.com is hosted by ns1.mydomain.com. They in turn register this with the top level domain servers so that when they get queried for xxx.mydomain.com they refer them to your dns server which will answer authoritatively for any dns names for your domain. Here is a very basic diagram of a dns query


root nameserver
------>
TLD servers
---------->
Your authritative NS


I query the root nameserver to find out what server is handling .com so the root nameserver refers me to tld name server

One of the TLD servers hands out who has mydomain.com

Which is then ns1.mydomain.com

try dig +trace www.cisco.com
 
Old 05-21-2004, 05:44 PM   #7
Mara
Moderator
 
Registered: Feb 2002
Location: Grenoble
Distribution: Debian
Posts: 9,576

Rep: Reputation: 191Reputation: 191
You may find this one useful: http://www.linuxquestions.org/questi...ticle&artid=26

You can configure your own DNS to point any domain name to your machine. But it'll work only for your machine/network. If someone from the other part of the globe asks for a domain, their own (usually their ISP's) nameserver is asked. If there's no simple answer (that nameserver doesn't have it in its cache or doesn't host the domain) it asks one of the root servers. The servers know where to find info for .com, .net and other highest level domains. A server that is supposed to know all .orgs is then asked. It points to a server that know the second part of the address (somewhere.org) and so on. So when your nameserver is not the part of the tree, it's local.
 
Old 05-24-2004, 02:13 AM   #8
huangzen
LQ Newbie
 
Registered: May 2004
Location: Sacramento
Posts: 18

Rep: Reputation: 0
Quote:
Peacebwitchu: " So you would need to register with a registrar and tell them that mydomain.com is hosted by ns1.mydomain.com. "

Then for example is my domain is www.ebay.com then do I have to use ns1.ebay.com? or ns1.otherbid.com is also fine? But I believe most of them time name server is just going to be their full domain name with ns1 or ns2 infront of it. then let's say if I choose ns1.ebay.com and I set it in name.conf. How and who knows I do own this domain? if you know or you can just guessing if ebay.com is using ns1.ebay.com, can't you set your own DNS as ns1.ebay.com as well?

Quote:
Mara: . If someone from the other part of the globe asks for a domain, their own (usually their ISP's) nameserver is asked. If there's no simple answer (that nameserver doesn't have it in its cache or doesn't host the domain) it asks one of the root servers.
yea what if someone guessing my domain name server is ns1.mydomain.com and set it on their own machine....
 
Old 05-24-2004, 03:49 PM   #9
Mara
Moderator
 
Registered: Feb 2002
Location: Grenoble
Distribution: Debian
Posts: 9,576

Rep: Reputation: 191Reputation: 191
Quote:
Originally posted by huangzen

yea what if someone guessing my domain name server is ns1.mydomain.com and set it on their own machine....
It will work, but only for that person and you...
 
Old 05-25-2004, 01:10 AM   #10
huangzen
LQ Newbie
 
Registered: May 2004
Location: Sacramento
Posts: 18

Rep: Reputation: 0
still works!? won't the high level machine check the IP?

If I set www.mydomain.com with ip 123.123.123.123 then how do "they" know this is the correct IP address for domain mydomain.com? cause there is no way for me to "tell" domain.com what's my real IP. Only thing I can set on mydomain.com is I can tell it which domain server should I pointing to. (ns1.mydomain.com) that's all.. but I never mention what's the IP for ns1.mydomain.com. anybody?
 
Old 05-25-2004, 05:13 PM   #11
Mara
Moderator
 
Registered: Feb 2002
Location: Grenoble
Distribution: Debian
Posts: 9,576

Rep: Reputation: 191Reputation: 191
Maybe I'll clear things up a bit, because I'm not sure if everything was told straight.

You can set an IP for any hostname on your machine. The right file is /etc/hosts. But I repeat, it'll only work on the machine it's set. When a pair of IP and hostname is found in the file, it's not checked in any DNS server.

Another thind, when you configure a DNS server to keep info about a domain, it won't (in most cases) ask any other server for confirmation. But still, all people not using your server will see the domain correctly (in a different way than you).
 
Old 05-25-2004, 08:33 PM   #12
huangzen
LQ Newbie
 
Registered: May 2004
Location: Sacramento
Posts: 18

Rep: Reputation: 0
ah.. Mara I got what you saying. You saying if I pointing a domain that don't belong to me it's still works for only works for my own machine. and basically how DNS works is it will automatically check whos the owner of the domain, it first check for .com and mydomain.com then check who is the server for www.mydomain.com. I can have any host name I want, for example if www.ebay.com is my domain name and on register control panel I set it DNS to ns1.yahoo.com. Moreover, on my machine I set it to ns1.yahoo.com. then www.ebay.com is going to point to my machine?? I am just telling www.ebay.com that name server is host with ns1.yahoo.com but I didn't told which IP. then as you all know yahoo.com is a famous company and I am not. But I use ns1.yahoo.com is this also works??
 
Old 05-26-2004, 03:37 PM   #13
Mara
Moderator
 
Registered: Feb 2002
Location: Grenoble
Distribution: Debian
Posts: 9,576

Rep: Reputation: 191Reputation: 191
The DNS server doesn't check who's the owner - it's not important. The important thing is an existence of an entry in a higher level DNS server (for example, if you need info for somewhere.com new entry must be added/changed in all servers taking care of .com domain). That's how domain registration works. It's not important what does your server say until a higher level server redirects queries about a domain to you. Of course, you won't be allowed to register a domain that's in use or modify addresses of its nameservers. You won't ba also allowed to register a domain its nameservers belong to - because it's already registred.
I'm making things simplier than they are, but that's more or less how it works.
 
Old 05-29-2004, 02:51 AM   #14
Qucho
Member
 
Registered: Mar 2004
Location: Colorado, US
Distribution: Debian "Sarge"
Posts: 228

Rep: Reputation: 30
Mara,

I dont mean to interfear, you explained all correctly, but it is my impression that has not grasped the simple concept of the Domain names.

So, while mare has more tech knowledge about the topic, I will use lame noobie words (which do not represent the whole mechanics behind DNS) but are lame terms that helped me to first understand this topic.

Huangzen,

Think in the DNS as a database server. Contains a directory of the number to contact (IP) and the name of such contact (Domain Name)

Like:
sumting.com -----> 255.255.255.255
noname.com -----> 255.255.255.254
huangzen.com -----> 255.255.255.253
There is a 'official' directory list in the internet. In order to be part of this 'official' list, you need to use the services of a 'official' registrar. ( http://www.internic.net/regist.html )

Now, you have a unique IP in the internet, this IP can be linked to a name, and be set in that 'official' list. Your local ISP will update their DNS witht eh 'official' list.

That is the OUTSIDE world, the internet.

Now, if you have a BIG local network, like your work place, you can have your own DNS server with a LOCAL list pointing to the local IP's and local names.

Remember that a local network it always TOTALY and COMPLETELY independent to the internet.

The way this no-ip.com service works is by BOUNCING the visitor to your current IP.

Say, a visitor wants to see huangzen.no-ip.com , they are calling to no-ip.com and requesting to see the 'huangzen' web site. at this point they are told 'guess what... is not here !!! you need to go visit him at the IP ###.###.###.### !!!

So, they get bounced to your local machine.
 
Old 05-29-2004, 05:32 AM   #15
privateprimate
LQ Newbie
 
Registered: May 2004
Location: DC METRO
Distribution: suse 9.1
Posts: 12

Rep: Reputation: 0
Read this entire thread but it made me dizzy. Sure learned a lot though. Thanks all.

Privateprimate
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
FireWall - Basic knowledge. zamri Linux - Security 5 01-24-2005 07:43 AM
Oidentd basic knowledge/problem burn0ut Linux - Software 0 01-14-2005 04:07 AM
How to configure a basic DNS server? kikis Linux - Newbie 1 05-06-2004 10:51 PM
Setting up basic DNS .... how to? Neorio Linux - Networking 3 06-04-2003 03:34 AM
Some basic knowledge of Linux regarding directory structure chem1 Linux - Newbie 3 08-11-2002 12:39 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 02:15 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration