Enable content cache discovery across multiple public IP addresses
If your network uses multiple public IP addresses to connect to the Internet, such that a content cache might register using a different address than a client uses for discovery, you need to provide both the content cache and the clients with a list of those addresses. Apple uses these lists to cross-match registration and discovery requests involving multiple public IP addresses.
To avoid manual configuration of clients, content caching uses DNS TXT records to publish the public IP address information for clients on your network. The TXT record needs to be published in the default DNS search domain used by your clients.
The correct data for the TXT record can be generated 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.
Note: These records are necessary only for your internal network. External DNS doesn’t require the additional record.
Configure content caching to support multiple IP addresses
Choose Apple menu > System Preferences, then click Sharing.
Select Content Caching, then press and hold the Option key and click Advanced Options.
Click Clients.
Click the “My local networks” pop-up menu, then choose one of the following:
Use one public IP address
Use custom public IP addresses
If you chose “use custom public IP addresses,” click the Add button , then enter a range of public IP addresses.
Repeat for any additional IP address ranges you want to enter.
You must create a DNS text record (see the tasks below), which describes the public IP addresses, for your client to use. Click DNS Configuration to get the DNS record settings.
When you finish the configuration, click OK.
Generate a DNS text record
When you set up content caching clients, if you choose “use custom public IP addresses” for “My local 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 DNS 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 on your Windows DNS computer.
Create a DNS text record manually
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.
Add one or more TXT records to the zone file for your local domain on your DNS server.
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 from_aaplcache1._tcp
up to_aaplcache24._tcp
, 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 to use:
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’s 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 don’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.
Add TXT records to the DNS zone file
Add the DNS TXT record 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.
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 have them add the TXT record provided.
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 you use Windows DNS, do one of the following:
Copy the generated command from the Client Configuration sheet, replace the zone name variable, and then run the command on your Windows DNS computer.
Enter the TXT record information manually using the Windows Server administration tools.
If you’re hosting DNS on the Server app, do the following:
Copy the generated TXT record from the Client Configuration sheet.
Open a command-line text editor (for example,
vi
,emacs
, orpico
).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.
Update the serial number in the file.
Save the zone file.
Restart the service.