View Project
DNS Servers are used to sit on the edge of a local area network and provide DNS resolution to the computers on the network, reducing external traffic and speeding up external access by serving the answer from a local cache.
Building a DNS Server will involve below spec.
Set up local set-up and environment
Create a UDP server that will listen on a specified port for incoming requests.
Parse the request packet that has been sent to your server. A DNS message has:
A header.
A questions section.
An answer section.
An authority section.
An additional section.
Forwarder should receive the request, unpack it and then re-pack it for forwarding to a DNS server to be resolved
Receive an answer from the DNS server, unpack it and forward the answer to the original client that asked for it.
cache the results of successful DNS resolution and respond to future requests with the same question from the local cache. The cached value should only be served if it is still within the TTL provided in the answer section, otherwise a new lookup should be done.
Test that your server only forwards requests that are not cached or for which the TTL has expired and once done
Built with