Previous Next Contents Index


Chapter 14 Managing Referrals

You can use referrals to extend your directory service beyond a single server configuration. This chapter describes how you can use referrals for your directory service. This chapter contains information about referrals in the following sections:

For conceptual information on how you can use referrals in your directory service, see the Netscape Directory Server Deployment Guide. For information on starting the server in referral mode, see "Starting the Server in Referral-Only Mode".


Understanding Referrals
Referrals are a redirection mechanism supported by the LDAP protocol. There are several reasons why a directory server might return a referral:

You can also start the server in referral-only mode. You might want to do this if you're making configuration changes to the directory server and you want all clients to be referred to another server for the duration. For information on how to do this, see "Starting the Server in Referral-Only Mode".

For more information on how referrals are used by LDAP clients and servers, and for information on the reasons why you might want to use referrals, see the Planning Referrals chapter in the Netscape Directory Server Deployment Manual.


Setting Default Referral URLs
You can configure the server to use one or more LDAP referrals for client requests that are out of bounds for the directory tree(s) serviced by your directory server. These referrals are returned if no relevant smart referrals can be defined for the server. You can manage the default referral mechanism from the Server Console as follows:

  1. On the Directory Server Console, select the Configuration tab.
  2. Select the root entry in the navigation tree in the left pane.
  3. Select the Settings tab in the right pane.
  4. Enter an LDAP URL in the "Referrals to" text box and click OK. For example:
  5. ldap://directory.airius.com:389/o=airius.com

    You can enter multiple referral URLs separated by spaces and in quotes as follows:

    "ldap://dir1.airius.com:389/o=airius.com"  "ldap://dir2.airius.com:389/"

    Keep in mind that all special characters within a DN must be properly escaped. Commas must be escaped by two backslashes (\\). For example, if the DN includes o=Airius Bolivia, S.A., then the corresponding DN must be

    o=airius bolivia\\, S.A.


Creating and Changing Smart Referrals
Smart referrals allow you to map a directory entry or directory tree to a specific LDAP URL. Thus, if a client requests a directory entry such as uid=bjensen, ou=people, o=airius.com you can refer the client to a specific server, or a specific entry on a specific server. As a result, for the above DN you could refer the client to the entry cn=babs jensen, o=people, l=europe, o=airius.com on the server directory.europe.airius.com.

You create and manage smart referrals through the Directory Server Console (See "Creating Smart Referrals Using the Directory Server Console" for information) or by using ldapmodify (See "Creating Smart Referrals From the Command-line" for information.)

Creating Smart Referrals Using the Directory Server Console

To add a smart referral to an existing entry from the Directory Server Console:

  1. On the Directory Server Console, select the Directory tab.
  2. Browse through the tree in the navigation pane and select the entry for which you want to add the referral.
  3. Right-click the entry and select Open from the pop-up menu. A dialog box or editor that allows you to change the properties of that entry appears.
  4. If you selected a person, group, or organizational unit entry, the Edit Entry dialog box appears. Click Advanced.

    The property editor dialog box appears containing the object class and attribute values for the entry.

    Figure 14.1 Edit Entry (Property Editor) dialog box

  5. Right click the cell containing the attribute "Object class" and select Add Value from the pop-up menu.
  6. The Add Object Class dialog box displays.

  7. Select referral in the dialog box and click OK.
  8. Select Show All Attributes from the View menu.
  9. Scroll down the list of attributes to the ref attribute.
  10. Enter the LDAP URL to which you want to refer queries about this entry in the format ldap://servername:portnumber/[optional_dn] in the ref text box. For example,
  11. ldap://directory.airius.com:389/cn=csarette,ou=people,o=airius.com

    Where [optional_dn] is an explicitly specified DN you want the server to return to the requesting client. If you want the server to use the DN from the original search request instead, enter the LDAP URL in the format:

    ldap://servername:portnumber

    Do not include a trailing slash "/" after the URL. For more information on how the server handles referrals and in particular DNs in referrals, see the Netscape Directory Server Deployment Manual.

  12. Click OK.
Creating Smart Referrals From the Command-line

You use the ldapmodify command-line utility to create smart referrals from the command-line. (For more specific information about ldapmodify, see "Adding and Modifying Entries Using ldapmodify").

To create a smart referral, create the relevant directory entry and add the Referral object class. (See "Managing Entries Using the Command-Line Utilities" for information.) This object class allows a single attribute: ref. The ref attribute is expected to contain an LDAP URL.

For example, to return a smart referral for the existing entry uid=bjensen, ou=people, o=airius.com, add the following information to the entry:

objectclass: referral
ref: ldap://directory.europe.airius.com/cn=babs%20jensen,ou=people,l=europe, o=airius.com

Note. Any information after a space in an LDAP URLs is ignored by the server. For this reason, you must use %20 instead of spaces in any LDAP URL you intend to use as a referral.

To add the entry uid=ssarette, ou=people, o=airius.com with a referral to directory.europe.airius.com, you would include the following in your LDIF file before importing:

dn: uid=ssarette, ou=people, o=airius.com
objectclass: top
objectclass: person
objectclass: organizationalperson
objectclass: inetOrgPerson
objectclass: referral
   cn: somi sarette
   sn: sarette
   uid: ssarette
   ref: ldap://directory.europe.airius.com/cn=somi%20sarette,ou=people,l=europe,o=airius.com

Use the -M parameter with ldapmodify to cause the server to not return the smart referral, but treat the entry as a regular entry. For information on the -M parameter, see "Additional ldapmodify Parameters".

For more information on smart referrals, see Chapter 8 of the Netscape Directory Server Deployment Manual. For information on creating entries, see Chapter  9, "Managing Directory Entries," and for information on LDAP URLs, see Appendix  A, "LDAP URLs."

 

© Copyright 1999 Netscape Communications Corporation, a subsidiary of America Online, Inc. All Rights Reserved.