If you plan to provide Caching service to clients with public IP addresses (in other words, not behind a NAT) that are not on the server’s same subnet, you need to create a TXT DNS record in your zone file for the server with the IP address ranges the server is responsible for.
There are two ways to generate the correct data for the TXT record: automatically or manually. In either case, you need to edit the DNS record, or give the settings to your DNS provider to create or edit the TXT record in the zone file.
While you’re setting up the Caching server, and if you choose to “Serve clients with public addresses on other networks,” you have the option of generating the TXT record that can be copied and pasted into the zone file.
After adding the network ranges, click Client Configuration.
Choose your DNS server type, BIND or Windows.
If you use BIND9 DNS, copy the generated TXT record, and paste it into your DNS zone file.
If you use Windows DNS, replace the zone name variable and run the generated command.
The syntax for specifying TXT records, and non-ASCII characters in TXT records, will vary for your DNS server. Both IPv4 and IPv6 are accepted, but only IPv4 is supported at this time.
Add one or more TXT records to the zone file for your local domain on your DNS server.
The format of these records have the same format as DNS-SD TXT records (key-value pairs):
name._tcp 10800 IN TXT "[prs|prn]=addressRanges"
For example:
_aaplcache._tcp 10800 IN TXT "\x2aprs=17.53.22.2-17.53.22.254,93.184.216.119"
_aaplcache._tcp 10800 IN TXT "\x12prn=\x24\x11\x35\x16\x02\x11\x35\x16\xfe\x14\x5d\xb8\xd8\x77"
Name the first record _aaplcache._tcp
and subsequent records _aaplcache1._tcp
through _aaplcache24._tcp
if needed, for a maximum of 25 chained records.
The values of these records have the same format as DNS-SD TXT records (key-value pairs). Two keys are supported: prs and prn.
Choose which key you’ll use: prs or prn.
prs: The value of the prs key is a sequence of comma-separated ranges of IP addresses in presentation format (ASCII dot notation). This syntax is for easy configuration. A range consists of either a single IP address or two IP addresses separated by a hyphen.
prn: The value of the prn key is a sequence of concatenated ranges of IP addresses in binary network-byte-order format. This syntax is for range sequences that are too long for a DNS record when specified in presentation format. Each range consists of one of these four items:
0x14 single-IPv4-address
0x16 single-IPv6-address
0x24 first-IPv4-address last-IPv4-address
0x26 first-IPv6-address last-IPv6-address
Chain the records together by putting a continuation marker on all but the last TXT record.
The prs and prn syntaxes may be mixed between records in the chain.
With the prs syntax append ",more" to the end of the record value. With the prn syntax append "+" (0x2b) to the end of the record value. The first record lacking such a continuation marker ends the chain.
A maximum of 25 records may be chained together. Records are resolved in batches of five at a time; that is, _aaplcache._tcp and _aaplcache1._tcp through _aaplcache4._tcp are resolved in parallel first, and if they all end with continuation markers then _aaplcache5._tcp through _aaplcache9._tcp are resolved next, and so on.
Here is an example of three chained records:
_aaplcache._tcp 10800 IN TXT "\x2bprs=17.250.1.1,17.250.2.1-17.250.2.254,more"
_aaplcache1._tcp 10800 IN TXT "\x0eprn=\x24\x11\xfa\x03\x01\x11\xfa\x03\xfe+"
_aaplcache2._tcp 10800 IN TXT "\x0eprs=17.250.4.5"
The syntax for specifying TXT records, and non-ASCII characters in TXT records, may vary based on your DNS server. Some servers won’t need the leading length byte (\x2a, \x12, \x2b, \x0e, and \x0e in the examples, respectively) because they prepend it automatically. The examples are for illustration only.
The DNS TXT record needs to be added to the zone that:
Is authoritative for the domain
Matches the default search domain for network clients
For example, if your organization provides DNS service for your own domain and is the source of authority for the host names for example.com, you put the caching TXT record in the example.com zone file.
For BIND9-based DNS on Linux, this file is in the /etc/bind/
directory, and the zone file name has been defined in /etc/bind/named.conf
(most likely, “db.example.com.”).
If your computer with OS X Server is hosting the authoritative zone files (in /Library/Server/named
), adding the TXT record to the zone file is easy.
Important: If you don’t host the authoritative DNS service for your domain, you can’t add the TXT record yourself. Coordinate with your DNS provider to get them to add the TXT record provided.
If you use Windows DNS, copy the generated command from the Client Configuration sheet, replace the zone name variable, and then run the command.
If you use BIND9, do the following:
Copy the generated TXT record from the Client Configuration sheet.
Open a command-line text editor (for example, vi
, emacs
, or pico
).
Open the zone file for editing (for example, /Library/Server/named/db.example.com
).
At the end of the configuration file, paste the TXT record.
Save the zone file.
Restart the server.