2 ======================================
4 This repository contains the DNS zone file templates and related code for managing OpenStreetMap.org and other domain names DNS. The full list of domains are in the [Makefile](Makefile).
6 ## Standard DNS Zone Files
8 The [zone files templates](src/) are in [tinydns-data](http://cr.yp.to/djbdns/tinydns-data.html) syntax and are written out by the [Makefile](Makefile).
10 On a repo commit, a git [post-receive](https://github.com/openstreetmap/chef/blob/master/cookbooks/dns/files/default/post-receive) runs `make update` via a [script](https://github.com/openstreetmap/chef/blob/master/cookbooks/dns/templates/default/dns-update.erb) which then pushes the updated zone files to the authoritative DNS nameservers.
14 The GeoDNS zones are handled differently.
16 ### tile.openstreetmap.org (mkgeo Generated)
18 The `tile.openstreetmap.org` and `[a|b|c].tile.openstreetmap.org` are CNAME'ed to the `tile.geo.openstreetmap.org` zone.
20 The `tile.openstreetmap.org` zone file is written by [mkgeo](bin/mkgeo) which attempts to match the [estimated country bandwidth requirements](bandwidth/tile.openstreetmap.yml) to the nearest [running](https://uptime.openstreetmap.org/) [tile cache server](src/tile.openstreetmap) with available capacity.
22 Example `tile.openstreetmap.org` zone file snippet in [tinydns-data](http://cr.yp.to/djbdns/tinydns-data.html) syntax as generated by [mkgeo](bin/mkgeo):
26 Caf.tile.openstreetmap.org:baku.tile.openstreetmap.org:600
28 Cal.tile.openstreetmap.org:osijek.tile.openstreetmap.org:600
30 Cdz.tile.openstreetmap.org:zaragoza.tile.openstreetmap.org:600
32 Cas.tile.openstreetmap.org:sanfrancisco.tile.openstreetmap.org:600
35 +aalborg.tile.openstreetmap.org:130.225.254.123:600
36 +amsterdam.tile.openstreetmap.org:134.90.146.26:600
37 +baku.tile.openstreetmap.org:94.20.20.55:600
40 The current tile.openstreetmap.org matching is here: https://dns.openstreetmap.org/tile.openstreetmap.org.html
42 ### tile.geo.openstreetmap.org (GeoIP)
44 The `tile.geo.openstreetmap.org` zone uses authoritative [gdnsd](https://gdnsd.org/) DNS nameservers (`a.ns.openstreetmap.org`, `b.ns.openstreetmap.org`, etc ).
46 The gdnsd config is managed using a [chef cookbook](https://github.com/openstreetmap/chef/tree/master/cookbooks/geodns).
48 The DNS responses from `tile.geo.openstreetmap.org` are CNAMEs to XX.tile.openstreetmap.org, where XX is the ISO 3166-1 alpha-2 country code from the [client subnet if supplied by EDNS0](https://tools.ietf.org/html/rfc7871) or the IP address of the resolving DNS if the client subnet is not supplied by EDNS0.
50 A typical DNS query flow example: `a.tile.openstreetmap.org -> CNAME tile.geo.openstreetmap.org -> CNAME gb.tile.openstreetmap.org. -> CNAME aalborg.tile.openstreetmap.org. -> A aaa.bbb.ccc.ddd`
52 ### render.openstreetmap.org (mkgeo Generated)
54 The `render.openstreetmap.org` zone is a DNS zone used internally by the tile.openstreetmap.org cache servers and ***SHOULD NOT BE BE USED BY OTHERS***.
56 The `render.openstreetmap.org` zone file is written by [mkgeo](bin/mkgeo) which attempts to match the estimated caches' bandwidth requirement (dynamically generated above tile.openstreetmap.org mkgeo) to the nearest [running](https://uptime.openstreetmap.org/) [render server](src/render.openstreetmap) with available capacity.
58 Example `tile.openstreetmap.org` zone file snippet in [tinydns-data](http://cr.yp.to/djbdns/tinydns-data.html) syntax as generated by [mkgeo](bin/mkgeo):
62 Caalborg.render.openstreetmap.org:vial.render.openstreetmap.org:600
64 Camsterdam.render.openstreetmap.org:yevaud.render.openstreetmap.org:600
66 Cbaku.render.openstreetmap.org:vial.render.openstreetmap.org:600
69 +orm.render.openstreetmap.org:193.63.75.98:600
70 +vial.render.openstreetmap.org:138.201.195.31:600
71 +yevaud.render.openstreetmap.org:128.40.45.208:600
74 The current render.openstreetmap.org matching is here: https://dns.openstreetmap.org/render.openstreetmap.org.html