Skip to content
Nick Walker edited this page Oct 11, 2017 · 5 revisions

smallDNS - Simple multi-agent locally listable DNS

Super simple DNS implementation where each machine pings the master server with it's hostname and ip address.

The server keeps a locally hosted, file based, DNS map (a JSON serialized python dictionary) which stores the mapping from hostnames to ip addresses.

The client scripts ping the server if they notice a change in ip address (either from reboot or lease renewal).

Features:

  • Client scripts can be deployed on multiple agents without any setup
  • Server keeps track of any agents that have been added
  • Client will only ping the server if a change is noticed
  • Server can generate a hosts file that can be merged with /etc/hosts

Limitations:

  • The server needs to have a static ip address that must be configured in the client script

Requirements:

  • Python (server)
  • Bash, wget (client)

Source code is available here

Suggested deployment

  • Run dnsServer.py on server
  • Clone repository to robot and edit pingDNS.sh replacing server='localhost' with server='nixons-head.csres.utexas.edu'
  • Set up cron job to execute pingDNS.sh at a reasonable interval (Such as */5 * * * * ~/smallDNS/pingDNS.sh >> ~/smallDNS/.pingLog)

Integration into bwi_dashboard

This small DNS was integrated with bwi_dashboard so that the web interface can provide the option to select robots that are tracked by the DNS

Clone this wiki locally