This project provides a DNS resolver along with a client to handle DNS queries and responses. It is constructed based on the specifications described in the RFC 1034 and RFC 1035 documents. The implementation ensures efficient domain name resolution by following these standards.
- Client.class & Client.java: Houses the client-side logic for making DNS requests.
- Resolver.class & Resolver.java: Encompasses the main DNS resolver logic.
- DNSHeader.class & DNSHeader.java: Manages the header portion of a DNS message.
- DNSMessage.class & DNSMessage.java: Addresses the overall structure and parsing of DNS messages.
- DNSQuestion.class & DNSQuestion.java: Represents the question section of a DNS message.
- DNSResourceRecord.class & DNSResourceRecord.java: Pertains to the resource records within a DNS message.
named.root
: Contains the root DNS server information.resolvableDomains.txt
: A list of domains supported for resolution by this resolver.README.md
: This very documentation and usage guide.
- MX: Mail Exchange
- PTR: Pointer
- A: Address
- NS: Name Server
- CNAME: Canonical Name
To use the client, execute:
java Client <resolver_ip> <resolver_port> <name> <timeout> <type>
For example
java Client 127.0.0.1 8080 example.com 10 A
To use the resolver, run:
java Resolver <port> <timeout>
For example
java Resolver 8080 10
Before executing the commands, ensure all required dependencies are installed and the files are appropriately compiled. Also make sure Resolver is running before intiating Client requests.
For a deep dive into the construction of resolvers and DNS messages, refer to:
Thank you for choosing my DNS Resolver project!