Thursday, February 5, 2009

IP Addresses

Domain Name System (DNS)
To identify an entity, TCP/IP protocols use the IP address, which uniquely identifies the connection of a host to the internet.
However, people prefer to use names instead of addresses. Therefore, we need a system that can map a name to an address or an address or an address to a name.
When the internet was small, mapping was done using a host file. The host files on its disk and update it periodically from a master host file.
When a program or a user wanted to map a name to an address, the host files and found the mapping.
Today, however, it is impossible to have one single host file to relate every address with a name or vice versa.
The host file would bi too large to store in every host. In addition, it would be impossible to update all the host files in the world every time there is a change.
One solution would be to store the entire host file in a single computer and allow access to this centralized information to every computer that needs mapping.
But we know that this would create a huge amount of traffic on the internet.
Another solution, the one used today, is to divide this huge amount of information into smaller parts and store each part on a different computer.
In this method, the host that needs mapping can contact the closest computer holding the needed information. This method is used by the Domain Name System (DNS).
Working of DNS
DNS is a protocol that can be used in different platform. In the internet, the domain name space is divided into three different sections: generic domains, country domains, and inverse domain.
Generic Domains
The generic domains define registered hosts according to their generic behavior. Each node in the tree defines a domain, which is an index to the domain name space database.
Country Domains
The country domains section follows the same format as the generic domains but uses two character country abbreviations at the first level.
Second level labels can be organizational, or they can be more specific, national designations. The United States, for example, uses state abbreviations as a subdivision of us
Inverse Domain
The inverse domain is used to map an address to a name. this may happen, for example , when a server has received a request from a client to do a task.
whereas the server lists only the IP address of the client . to determine if the client is on the authorized list, it can ask its resolver to send a query to the DNS server and ask for a mapping of address to name.
This type of query is called an inverse or pointer (PTR) query. To handle a pointer query, the inverse domain is added to the domain name space with the first-level node called arpa.
The second level is also one single node named in- addr (for inverse address). The rest of the domain defines IP addressed.
The servers that handle the inverse domain are also hierarchical.
This means the netid part of the address should be at a higher level than the subnetid part, and the subnetid part higher than the hostid part. In this way, a server serving the whole site is at a higher level than the servers serving each subnet.
This configuration makes the domain look inverted when compared to a generic or country domain.
To follow the convention of reading the domain labels from the bottom to the top, an IP address such as 132.34.45.121 is read as 121.45.34.132. in addr.arpa

No comments: