summaryrefslogtreecommitdiff
path: root/doc/source/user/manage-ptr-records.rst
blob: f6906ead2b096521ab5f9fe9fb58397fd5b67030 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
..
    Copyright 2015 Rackspace Hosting

    Licensed under the Apache License, Version 2.0 (the "License"); you may
    not use this file except in compliance with the License. You may obtain
    a copy of the License at

        http://www.apache.org/licenses/LICENSE-2.0

    Unless required by applicable law or agreed to in writing, software
    distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
    WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
    License for the specific language governing permissions and limitations
    under the License.


==========================
 How To Manage PTR Records
==========================


PTR Record Basics
=================

`PTR` records provide a reverse mapping from a single IP or set of IP
addresses to a fully qualified domain name (FQDN). For example,

.. code-block:: console

    $ dig -x 192.0.2.12 +short
    example.org.

The way this works in the DNS system is through the `in-addr.arpa.`
zone. For example

.. code-block:: console

    $ dig example.org +short
    192.0.2.12
    $ dig -x 192.0.2.12
    ; <<>> DiG 9.9.5-3ubuntu0.1-Ubuntu <<>> -x 192.0.2.12
    ;; global options: +cmd
    ;; Got answer:
    ;; ->>HEADER<<- opcode: QUERY, status: NXDOMAIN, id: 3431
    ;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 1, ADDITIONAL: 1

    ;; OPT PSEUDOSECTION:
    ; EDNS: version: 0, flags:; udp: 4000
    ;; QUESTION SECTION:
    ;12.2.0.192.in-addr.arpa.   IN      PTR      example.org.

    ;; AUTHORITY SECTION:
    12.2.0.192.in-addr.arpa. 3600 IN     NS      ns1.example.org.

    ;; Query time: 40 msec
    ;; SERVER: 127.0.0.1#53(127.0.0.1)
    ;; WHEN: Fri Feb 20 19:05:44 UTC 2015
    ;; MSG SIZE  rcvd: 119

In the question section we see the address being requested from the
DNS system as `12.2.0.192.in-addr.arpa.`. As you can see, the IP
address has been reversed in order to function similarly to a domain
name where the more specific elements come first. The reversed IP
address is then added to the `in-addr.arpa.` domain, at which point
the DNS system can perform a simple look up to find any `PTR` records
that describe what domain name, if any, maps to that IP.


Create a PTR Record in Designate
================================

To create a `PTR` record in Designate we need a `in-addr.arpa.` zone
that will receive the actual `PTR` record


Using the V2 API and the OpenStack CLI
--------------------------------------

To begin let's create a zone that we want to return when we do our
reverse lookup.

.. code-block:: http

    POST /v2/zones HTTP/1.1
    Accept: application/json
    Content-Type: application/json

    {
      "name": "example.org.",
      "email": "admin@example.org",
      "ttl": 3600,
      "description": "A great example zone"
    }

Here is the JSON response describing the new zone.

.. code-block:: http

    HTTP/1.1 202 Accepted
    Location: http://127.0.0.1:9001/v2/zones/251fbde4-6eb8-44e6-bc48-e095f1763a1f
    Content-Length: 476
    Content-Type: application/json; charset=UTF-8
    X-Openstack-Request-Id: req-bfcd0723-624c-4ec2-bbd5-99e985efe8db
    Date: Tue, 02 Jun 2020 17:24:10 GMT
    Connection: keep-alive

    {
      "id": "251fbde4-6eb8-44e6-bc48-e095f1763a1f",
      "pool_id": "794ccc2c-d751-44fe-b57f-8894c9f5c842",
      "project_id": "123d51544df443e790b8e95cce52c285",
      "name": "example.org.",
      "email": "admin@example.org",
      "description": "A great example zone",
      "ttl": 3600,
      "serial": 1591118650,
      "status": "PENDING",
      "action": "CREATE",
      "version": 1,
      "attributes": {},
      "type": "PRIMARY",
      "masters": [],
      "created_at": "2020-06-02T17:24:10.000000",
      "updated_at": null,
      "transferred_at": null,
      "links": {
        "self": "http://127.0.0.1:9001/v2/zones/251fbde4-6eb8-44e6-bc48-e095f1763a1f"
      }
    }

Using the CLI:

.. code-block:: console

    $ openstack zone create --email admin@example.org \
        --description "A great example zone" --ttl 3600 example.org.
    +----------------+--------------------------------------+
    | Field          | Value                                |
    +----------------+--------------------------------------+
    | action         | CREATE                               |
    | attributes     |                                      |
    | created_at     | 2020-06-02T17:24:10.000000           |
    | description    | A great example zone                 |
    | email          | admin@example.org                    |
    | id             | 251fbde4-6eb8-44e6-bc48-e095f1763a1f |
    | masters        |                                      |
    | name           | example.org.                         |
    | pool_id        | 794ccc2c-d751-44fe-b57f-8894c9f5c842 |
    | project_id     | 123d51544df443e790b8e95cce52c285     |
    | serial         | 1591118650                           |
    | status         | PENDING                              |
    | transferred_at | None                                 |
    | ttl            | 3600                                 |
    | type           | PRIMARY                              |
    | updated_at     | None                                 |
    | version        | 1                                    |
    +----------------+--------------------------------------+

.. note::

    The `status` is `PENDING`. If we make a `GET` request to
    the `self` field in the zone, it will most likely have been
    processed and updated to `ACTIVE`.

Now that we have a zone we would like to use for our reverse DNS
lookup, we need to add an `in-addr.arpa.` zone that includes the IP
address we want to look up.

Let's configure `192.0.2.11` to return our `example.org.` domain
name when we do a reverse look up.

.. code-block:: http

    POST /v2/zones HTTP/1.1
    Accept: application/json
    Content-Type: application/json

    {
      "name": "11.2.0.192.in-addr.arpa.",
      "email": "admin@example.org",
      "ttl": 3600,
      "description": "A in-addr.arpa. zone for reverse lookups"
    }

As you can see, in the `name` field we've reversed our IP address and
used that as a subdomain in the `in-addr.arpa.` zone.

Here is the response.

.. code-block:: http

    HTTP/1.1 202 Accepted
    Location: http://127.0.0.1:9001/v2/zones/f5546034-b27e-4326-bf9d-c53ed879f7fa
    Content-Length: 512
    Content-Type: application/json; charset=UTF-8
    X-Openstack-Request-Id: req-4e691123-045e-4f8e-ae50-b5eabb5af3fa
    Date: Tue, 02 Jun 2020 17:32:46
    Connection: keep-alive

    {
      "id": "f5546034-b27e-4326-bf9d-c53ed879f7fa",
      "pool_id": "794ccc2c-d751-44fe-b57f-8894c9f5c842",
      "project_id": "123d51544df443e790b8e95cce52c285",
      "name": "11.2.0.192.in-addr.arpa.",
      "email": "admin@example.org",
      "description": "A in-addr.arpa. zone for reverse lookups",
      "ttl": 3600,
      "serial": 1591119166,
      "status": "PENDING",
      "action": "CREATE",
      "version": 1,
      "attributes": {},
      "type": "PRIMARY",
      "masters": [],
      "created_at": "2020-06-02T17:32:47.000000",
      "updated_at": null,
      "transferred_at": null,
      "links": {
        "self": "http://127.0.0.1:9001/v2/zones/f5546034-b27e-4326-bf9d-c53ed879f7fa"
      }
    }

Using the CLI:

.. code-block:: console

    $ openstack zone create --email admin@example.org \
        --ttl 3600 --description "A in-addr.arpa. zone for reverse lookups" \
        11.2.0.192.in-addr.arpa.
    +----------------+------------------------------------------+
    | Field          | Value                                    |
    +----------------+------------------------------------------+
    | action         | CREATE                                   |
    | attributes     |                                          |
    | created_at     | 2020-06-02T17:32:47.000000               |
    | description    | A in-addr.arpa. zone for reverse lookups |
    | email          | admin@example.org                        |
    | id             | f5546034-b27e-4326-bf9d-c53ed879f7fa     |
    | masters        |                                          |
    | name           | 11.2.0.192.in-addr.arpa.                 |
    | pool_id        | 794ccc2c-d751-44fe-b57f-8894c9f5c842     |
    | project_id     | 123d51544df443e790b8e95cce52c285         |
    | serial         | 1591119166                               |
    | status         | PENDING                                  |
    | transferred_at | None                                     |
    | ttl            | 3600                                     |
    | type           | PRIMARY                                  |
    | updated_at     | None                                     |
    | version        | 1                                        |
    +----------------+------------------------------------------+

Now that we have our `in-addr.arpa.` zone, we add a new `PTR` record
to the zone.

.. code-block:: http

    POST /v2/zones/f5546034-b27e-4326-bf9d-c53ed879f7fa/recordsets HTTP/1.1
    Content-Type: application/json
    Accept: application/json

    {
      "name": "11.2.0.192.in-addr.arpa.",
      "type": "PTR",
      "records": [
        "example.org."
      ],
      "ttl": 3600,
      "description": "A PTR recordset"
    }

Here is the response.

.. code-block:: http

    HTTP/1.1 202 Accepted
    Location: http://127.0.0.1:9001/v2/zones/f5546034-b27e-4326-bf9d-c53ed879f7fa/recordsets/ca604f72-83e6-421f-bf1c-bb4dc1df994a
    Content-Length: 573
    Content-Type: application/json; charset=UTF-8
    X-Openstack-Request-Id: req-5b7044d0-591a-445a-839f-1403b1455824
    Date: Tue, 02 Jun 2020 19:55:50 GMT
    Connection: keep-alive

    {
      "id": "ca604f72-83e6-421f-bf1c-bb4dc1df994a",
      "zone_id": "f5546034-b27e-4326-bf9d-c53ed879f7fa",
      "project_id": "123d51544df443e790b8e95cce52c285",
      "name": "11.2.0.192.in-addr.arpa.",
      "zone_name": "11.2.0.192.in-addr.arpa.",
      "type": "PTR",
      "records": [
        "example.org."
      ],
      "description": "A PTR recordset",
      "ttl": 3600,
      "status": "PENDING",
      "action": "CREATE",
      "version": 1,
      "created_at": "2020-06-02T19:55:50.000000",
      "updated_at": null,
      "links": {
        "self": "http://127.0.0.1:9001/v2/zones/f5546034-b27e-4326-bf9d-c53ed879f7fa/recordsets/ca604f72-83e6-421f-bf1c-bb4dc1df994a"
      }
    }

With the CLI:

.. code-block:: console

    $ openstack recordset create --record example.org. --type PTR \
        --ttl 3600 --description "A PTR recordset" \
        11.2.0.192.in-addr.arpa. 11.2.0.192.in-addr.arpa.
    +-------------+--------------------------------------+
    | Field       | Value                                |
    +-------------+--------------------------------------+
    | action      | CREATE                               |
    | created_at  | 2020-06-02T19:55:50.000000           |
    | description | A PTR recordset                      |
    | id          | ca604f72-83e6-421f-bf1c-bb4dc1df994a |
    | name        | 11.2.0.192.in-addr.arpa.             |
    | project_id  | 123d51544df443e790b8e95cce52c285     |
    | records     | example.org.                         |
    | status      | PENDING                              |
    | ttl         | 3600                                 |
    | type        | PTR                                  |
    | updated_at  | None                                 |
    | version     | 1                                    |
    | zone_id     | f5546034-b27e-4326-bf9d-c53ed879f7fa |
    | zone_name   | 11.2.0.192.in-addr.arpa.             |
    +-------------+--------------------------------------+

We should now have a correct `PTR` record assigned in our nameserver
that we can test.

Let's test it out!

.. code-block:: console

    $ dig @localhost -x 192.0.2.11

    ; <<>> DiG 9.9.5-3ubuntu0.1-Ubuntu <<>> @localhost -x 192.0.2.11
    ; (1 server found)
    ;; global options: +cmd
    ;; Got answer:
    ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 32832
    ;; flags: qr aa rd; QUERY: 1, ANSWER: 1, AUTHORITY: 1, ADDITIONAL: 1
    ;; WARNING: recursion requested but not available

    ;; OPT PSEUDOSECTION:
    ; EDNS: version: 0, flags:; udp: 4096
    ;; QUESTION SECTION:
    ;11.2.0.192.in-addr.arpa.    IN      PTR

    ;; ANSWER SECTION:
    11.2.0.192.in-addr.arpa. 3600 IN     PTR     example.org.

    ;; AUTHORITY SECTION:
    11.2.0.192.in-addr.arpa. 3600 IN     NS      ns1.example.org.

    ;; Query time: 3 msec
    ;; SERVER: 127.0.0.1#53(127.0.0.1)
    ;; WHEN: Fri Feb 20 21:45:53 UTC 2015
    ;; MSG SIZE  rcvd: 98

As you can see from the answer section everything worked as expected.

IPv6
----

Following the previous example we will configure `fd00::2:11` to
return our `example.org.` domain name. As reverse DNS lookups for
`IPv6` addresses use the special domain `ip6.arpa`, we need to create

.. code-block:: console

    $ openstack zone create --email admin@example.org \
        --ttl 3600 --description "A ip6.arpa zone for IPv6 reverse lookups" \
        1.1.0.0.2.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.d.f.ip6.arpa.
    +----------------+---------------------------------------------------------------------------+
    | Field          | Value                                                                     |
    +----------------+---------------------------------------------------------------------------+
    | action         | CREATE                                                                    |
    | attributes     |                                                                           |
    | created_at     | 2020-06-04T13:07:36.000000                                                |
    | description    | IPv6 reverse lookup zone                                                  |
    | email          | admin@example.org                                                         |
    | id             | 9c8f30a1-6d9d-4f40-9fac-ab8abfb24fba                                      |
    | masters        |                                                                           |
    | name           | 1.1.0.0.2.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.d.f.ip6.arpa. |
    | pool_id        | 794ccc2c-d751-44fe-b57f-8894c9f5c842                                      |
    | project_id     | 123d51544df443e790b8e95cce52c285                                          |
    | serial         | 1591276055                                                                |
    | status         | PENDING                                                                   |
    | transferred_at | None                                                                      |
    | ttl            | 3600                                                                      |
    | type           | PRIMARY                                                                   |
    | updated_at     | None                                                                      |
    | version        | 1                                                                         |
    +----------------+---------------------------------------------------------------------------+

And add the `PTR` record

.. code-block:: console

    $ openstack recordset create --record example.org. --type PTR \
        --ttl 3600 --description "A PTR recordset" \
        1.1.0.0.2.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.d.f.ip6.arpa. \
        1.1.0.0.2.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.d.f.ip6.arpa.
    +-------------+---------------------------------------------------------------------------+
    | Field       | Value                                                                     |
    +-------------+---------------------------------------------------------------------------+
    | action      | CREATE                                                                    |
    | created_at  | 2020-06-04T13:10:30.000000                                                |
    | description | A PTR recordset                                                           |
    | id          | 246c5cbb-315d-437d-a52f-bf0a0cfa91a0                                      |
    | name        | 1.1.0.0.2.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.d.f.ip6.arpa. |
    | project_id  | 123d51544df443e790b8e95cce52c285                                          |
    | records     | example.org.                                                              |
    | status      | PENDING                                                                   |
    | ttl         | 3600                                                                      |
    | type        | PTR                                                                       |
    | updated_at  | None                                                                      |
    | version     | 1                                                                         |
    | zone_id     | 9c8f30a1-6d9d-4f40-9fac-ab8abfb24fba                                      |
    | zone_name   | 1.1.0.0.2.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.d.f.ip6.arpa. |
    +-------------+---------------------------------------------------------------------------+

Now we can do a reverse lookup with

.. code-block:: console

    $ dig @localhost -x fd00::2:11

    ; <<>> DiG 9.11.3-1ubuntu1.12-Ubuntu <<>> @10.5.0.32 -x fd00::2:11
    ; (1 server found)
    ;; global options: +cmd
    ;; Got answer:
    ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 50892
    ;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 1, ADDITIONAL: 1

    ;; OPT PSEUDOSECTION:
    ; EDNS: version: 0, flags:; udp: 4096
    ; COOKIE: 812dd247d36b98504b6d12485ed8f44bd7ae0a902343c348 (good)
    ;; QUESTION SECTION:
    ;1.1.0.0.2.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.d.f.ip6.arpa. IN PTR

    ;; ANSWER SECTION:
    1.1.0.0.2.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.d.f.ip6.arpa. 3600 IN PTR example.org.

    ;; AUTHORITY SECTION:
    1.1.0.0.2.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.d.f.ip6.arpa. 3600 IN NS ns1.example.org.

    ;; Query time: 1 msec
    ;; SERVER: 127.0.0.1#53(127.0.0.1)
    ;; WHEN: Thu Jun 04 13:16:59 UTC 2020
    ;; MSG SIZE  rcvd: 197

Advanced Usage
--------------

You can add many `PTR` records to a larger subnet by using a more
broadly defined `in-addr.arpa.` zone. For example, if we wanted to
ensure *any* IP in a subnet resolves to a specific domain we would add
a wildcard DNS record to this zone.

.. code-block:: http

    POST /v2/zones HTTP/1.1
    Accept: application/json
    Content-Type: application/json

    {
      "name": "2.0.192.in-addr.arpa.",
      "type": "PRIMARY",
      "email": "admin@example.org",
      "ttl": 3600,
      "description": "A more broadly defined in-addr.arpa. zone for reverse lookups"
    }

With the CLI:

.. code-block:: console

    $ openstack zone create --email admin@example.org --ttl 3600 \
        --description "A more broadly defined in-addr.arpa. zone for reverse lookups" \
        2.0.192.in-addr.arpa.
    +----------------+---------------------------------------------------------------+
    | Field          | Value                                                         |
    +----------------+---------------------------------------------------------------+
    | action         | CREATE                                                        |
    | attributes     |                                                               |
    | created_at     | 2020-06-02T20:07:11.000000                                    |
    | description    | A more broadly defined in-addr.arpa. zone for reverse lookups |
    | email          | admin@example.org                                             |
    | id             | e9fd0ced-1d3e-43fa-b9aa-6d4b7a73988d                          |
    | masters        |                                                               |
    | name           | 2.0.192.in-addr.arpa.                                         |
    | pool_id        | 794ccc2c-d751-44fe-b57f-8894c9f5c842                          |
    | project_id     | 123d51544df443e790b8e95cce52c285                              |
    | serial         | 1591128431                                                    |
    | status         | PENDING                                                       |
    | transferred_at | None                                                          |
    | ttl            | 3600                                                          |
    | type           | PRIMARY                                                       |
    | updated_at     | None                                                          |
    | version        | 1                                                             |
    +----------------+---------------------------------------------------------------+

We then could use the corresponding domain to create a `PTR` record
for a specific IP.

.. code-block:: http

    POST /v2/zones/e9fd0ced-1d3e-43fa-b9aa-6d4b7a73988d/recordsets HTTP/1.1
    Accept: application/json
    Content-Type: application/json

    {
      "name": "3.2.0.192.in-addr.arpa.",
      "type": "PTR"
      "ttl": 3600,
      "records": [
        "cats.example.com."
      ]
    }

With the CLI:

.. code-block:: console

    $ openstack recordset create --record cats.example.org. --type PTR \
        --ttl 3600 2.0.192.in-addr.arpa. 3.2.0.192.in-addr.arpa.
    +-------------+--------------------------------------+
    | Field       | Value                                |
    +-------------+--------------------------------------+
    | action      | CREATE                               |
    | created_at  | 2020-06-02T20:10:54.000000           |
    | description | None                                 |
    | id          | c843729b-7aaf-4f99-a40a-d9bf70edf271 |
    | name        | 3.2.0.192.in-addr.arpa.              |
    | project_id  | 123d51544df443e790b8e95cce52c285     |
    | records     | cats.example.org.                    |
    | status      | PENDING                              |
    | ttl         | 3600                                 |
    | type        | PTR                                  |
    | updated_at  | None                                 |
    | version     | 1                                    |
    | zone_id     | e9fd0ced-1d3e-43fa-b9aa-6d4b7a73988d |
    | zone_name   | 2.0.192.in-addr.arpa.                |
    +-------------+--------------------------------------+

Or with a wildcard DNS record:

.. code-block:: console

    $ openstack recordset create --record example.org. --type PTR \
        --ttl 3600 2.0.192.in-addr.arpa. *.2.0.192.in-addr.arpa.
    +-------------+--------------------------------------+
    | Field       | Value                                |
    +-------------+--------------------------------------+
    | action      | CREATE                               |
    | created_at  | 2020-06-04T12:22:45.000000           |
    | description | None                                 |
    | id          | 4fa96619-a1f8-4409-ba5f-fa904db4c97c |
    | name        | *.2.0.192.in-addr.arpa.              |
    | project_id  | 123d51544df443e790b8e95cce52c285     |
    | records     | example.org.                         |
    | status      | PENDING                              |
    | ttl         | 3600                                 |
    | type        | PTR                                  |
    | updated_at  | None                                 |
    | version     | 1                                    |
    | zone_id     | e9fd0ced-1d3e-43fa-b9aa-6d4b7a73988d |
    | zone_name   | 2.0.192.in-addr.arpa.                |
    +-------------+--------------------------------------+

When we do our reverse look, we should see `cats.example.com.`

.. code-block:: console

    $ dig @localhost -x 192.0.2.3 +short
    cats.example.com.

When we query any other IP address in `192.0.2.0/24` we get

.. code-block:: console

    $ dig @10.5.0.32 -x 192.0.2.10 +short
    example.org.

Success!

You can further specify `in-addr.arpa.` zones to chunks of IP
addresses by using Classless in-addr.arpa. Delegation. See `RFC 2317`_
for more information.

.. note::

    The naming scheme of `RFC 2317`_ is currently not supported and
    names such as `24/0.2.0.192.in-addr.arpa.` which include a `/`
    lead to an error. The suggested workaround is to use `-` instead
    of `/`. For more details please see
    https://bugs.launchpad.net/designate/+bug/1880583.

.. note::

    In BIND9, when creating a new `PTR` we could skip the zone name.
    For example, if the zone is `2.0.192.in-addr.arpa.`, using `12`
    for the record name ends up as `12.2.0.192.in-addr.arpa.`. In
    Designate, the name of a record MUST be a complete host name.

.. _RFC 2317: https://tools.ietf.org/html/rfc2317