|Yorick van Pelt d6d84edbab implement server+tests and write documentation||3 years ago|
|dns||3 years ago|
|.gitignore||3 years ago|
|README.md||3 years ago|
|dns_client.py||3 years ago|
|dns_server.py||3 years ago|
|dns_tests.py||3 years ago|
|documentation.txt||3 years ago|
|named.root||3 years ago|
|test.zone||3 years ago|
This directory contains a framework for a DNS resolver and a recursive DNS server. The framework provides classes for manipulating DNS messages (and converting them to bytes). The framework also contains a few stubs which you need to implement. Most files contain pointers to the relevant sections of RFC 1034 and RFC 1035. These are not the only relevant sections though, and you might need to read more of the RFCs.
It is probably a good idea to read RFC 1034 before proceeding. This RFC explains an overview of DNS and introduces some of the naming which is also used in the framework.
You should start with implementing the resolver, which you need for the server. You will need message.py, resource.py, types.py, classes.py and rcodes.py. You can ignore the code for converting from and to bytes from these files if you want, but it might be useful (especially for debugging).
After finishing the resolver you need to implement caching and the DNS server. You can implement these in any order that you like. I suggest implementing the recursive part (the resolving) of your DNS server, before implementing the management of the servers zone.
Wireshark and dns_client.py are useful tools for debugging your resolver. Wireshark and nslookup are useful tools for debugging your server.