11-04-2014, 02:31 PM
DOMAIN NAME SYSTEM
AIM
To write a C program for the simulation of Domain Name System
ALGORITHM
SERVER
Step 1: Start the program.
Step 2: Create the Socket for the Server.
Step 3: Bind the Socket to the Port.
Step 4: Listen for the incoming client connection.
Step 5: Receive the IP address from the client to be resolved.
Step 6: Get the domain name from the client.
Step 7: Check the existence of the domain in the server.
Step 8: If domain matches then send the corresponding address to the client.
Step 9: Stop the program execution.
CLIENT
Step 1: Start the program.
Step 2: Create the Socket for the client.
Step 3: Connect the Socket to the server.
Step 4: Send the hostname to the server to be resolved.
Step 5: If the server responds the print the address and terminates the process.
[b]RESULT:[/b]
Thus the C program for the simulation of Domain Name System has been executed and the output is verified successfully.