]> git.openstreetmap.org Git - dns.git/blob - README.md
Add chrysophylax as NS for geo
[dns.git] / README.md
1 OpenStreetMap DNS
2 ======================================
3
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).
5
6 The authoritative DNS nameservers we use are kindly run by [Bytemark](https://docs.bytemark.co.uk/article/content-dns/). We would like to thank [Bytemark](https://www.bytemark.co.uk/) for their many years of support.
7
8 ## Standard DNS Zone Files
9
10 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).
11
12 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.
13
14 ## GeoDNS Zones
15
16 The GeoDNS zones are handled differently.
17
18 ### tile.openstreetmap.org (mkgeo Generated)
19
20 The `tile.openstreetmap.org` and `[a|b|c].tile.openstreetmap.org` are CNAME'ed to the `tile.geo.openstreetmap.org` zone.
21
22 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.
23
24 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):
25
26 ```
27 # Afghanistan
28 Caf.tile.openstreetmap.org:baku.tile.openstreetmap.org:600
29 # Albania
30 Cal.tile.openstreetmap.org:osijek.tile.openstreetmap.org:600
31 # Algeria
32 Cdz.tile.openstreetmap.org:zaragoza.tile.openstreetmap.org:600
33 # American Samoa
34 Cas.tile.openstreetmap.org:sanfrancisco.tile.openstreetmap.org:600
35 ...
36 # Servers
37 +aalborg.tile.openstreetmap.org:130.225.254.123:600
38 +amsterdam.tile.openstreetmap.org:134.90.146.26:600
39 +baku.tile.openstreetmap.org:94.20.20.55:600
40 ```
41
42 The current tile.openstreetmap.org matching is here: https://dns.openstreetmap.org/tile.openstreetmap.org.html
43
44 ### tile.geo.openstreetmap.org (GeoIP)
45
46 The `tile.geo.openstreetmap.org` zone uses authoritative [gdnsd](https://gdnsd.org/) DNS nameservers (`a.ns.openstreetmap.org`, `b.ns.openstreetmap.org`, etc ).
47
48 The gdnsd config is managed using a [chef cookbook](https://github.com/openstreetmap/chef/tree/master/cookbooks/geodns).
49
50 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.
51
52 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`
53
54 ### render.openstreetmap.org (mkgeo Generated)
55
56 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***.
57
58 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.
59
60 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):
61
62 ```
63 # aalborg
64 Caalborg.render.openstreetmap.org:vial.render.openstreetmap.org:600
65 # amsterdam
66 Camsterdam.render.openstreetmap.org:yevaud.render.openstreetmap.org:600
67 # baku
68 Cbaku.render.openstreetmap.org:vial.render.openstreetmap.org:600
69 ...
70 # Servers
71 +orm.render.openstreetmap.org:193.63.75.98:600
72 +vial.render.openstreetmap.org:138.201.195.31:600
73 +yevaud.render.openstreetmap.org:128.40.45.208:600
74 ```
75
76 The current render.openstreetmap.org matching is here: https://dns.openstreetmap.org/render.openstreetmap.org.html