Cisco CNS Network Registrar User's Guide, 5.5
Appendix: Restoring a Loopback Zone
Downloads: This chapterpdf (PDF - 103.0KB) The complete bookPDF (PDF - 5.45MB) | Feedback

Restoring a Loopback Zone

Table Of Contents

Restoring a Loopback Zone

Creating a db.l27.0.0 Loopback Address File

Manually Configuring a Loopback Zone

Importing a Loopback Zone from BIND


Restoring a Loopback Zone


A loopback zone is a reverse zone that enables a host to resolve the loopback address (127.0.0.1) to the name localhost. The loopback address is used by the host to enable it to direct network traffic to itself. You can configure a loopback zone manually or you can import it from an existing BIND zone file.

Normally, you do not have to configure a loopback zone, because Network Registrar automatically creates one for you. If, however, you accidentally delete the loopback zone, you can use the instructions in this appendix to create a new one.

Creating a db.l27.0.0 Loopback Address File

Before manually configuring a loopback zone, you should create a loopback address file.

A name server needs one additional db.ADDR file to cover the loopback network: the db.l27.0.0 file, which provides a special address that hosts use to direct traffic to themselves. The network is almost always 127.0.0, and the host number is almost always 127.0.0.1.

Here are the contents of the db.l27.0.0 file:

O.O.127.in-addr.arpa. IN SOA terminator.movie.edu. al.robocop.movie.edu.
(
      1        ; Serial
      10800    ; Refresh after 3 hours
      3600     ; Retry after 1 hour
      604800   ; Expire after 1 week
      86400    ; Minimum TTL of 1 day   )

0.0.127.in-addr.arpa. IN NS terminator.movie.edu.
0.0.127.in-addr.arpa. IN NS wormhole.movie.edu.
1.0.0.127.in-addr.arpa. IN PTR localhost.

Name servers need this file because no one has responsibility for network 127, yet systems use it for a loopback address. Since no one has direct responsibility, everyone who uses it is individually responsible for it. You could omit this file and your name server would operate. However, a lookup of 127.0.0.1 might fail because the root name server contacted was not configured to map 127.0.0.1 to a name. Cisco recommends that you provide the mapping yourself.

Manually Configuring a Loopback Zone

To manually configure a lost loopback zone:

Using the CLI


Step 1 Use the zone name create command to create a loopback zone.

The following example adds the zone 127.in-addr.arpa, specifying that it is a primary zone, the name server is localhost, and the hostmaster is loopback.

nrcmd> zone 127.in-addr.arpa create primary localhost loopback 

Step 2 Use the zone name addRR command to add the pointer (PTR) resource record.

Although the zone command automatically creates the NS and SOA record for you, you need to use the addRR keyword to create a PTR record for the name server named in the ns field. The following example adds the name 1.0.0, the type PTR, and the data localhost.

nrcmd> zone 127.in-addr.arpa addRR 1.0.0 PTR localhost 

Step 3 Use the zone name addRR command to add the Address (A) resource record.

The A record provides the name-to-address mapping for the zone. The following example adds the name localhost, the type A, and the data 127.0.0.1.

nrcmd> zone 127.in-addr.arpa addRR localhost A 127.0.0.1 

Network Registrar automatically appends the zone name to the ns, person, and data fields; that is, localhost.127.in-addr.arpa and loopback.127.in-addr.arpa.

Step 4 Reload the DNS server.

nrcmd> dns reload 


Importing a Loopback Zone from BIND

The easiest and quickest way to create a primary zone is to import an existing BIND format zone file.

Using the CLI

Use the zone name create command to create a primary zone by importing an existing file that is in BIND format. The following example adds the zone 127.in-addr.arpa, specifying that it is a primary zone and to import the BIND file, hosts.local.

nrcmd> zone 127.in-addr.arpa create primary file=hosts.local 
nrcmd> dns reload