1. Install two replicating directory servers. See Enabling Replication for various ways to set up your servers.
  2. On the second server, use the dsconfig command to set the writability mode of the server to internal-only.
    $ bin/dsconfig set-global-configuration-prop \ 
      --set writability-mode:internal-only
  3. On the second server, use the dsconfig tool to create a referral that instructs the server to redirect client write requests under dc=example,dc=com to server1.example.com:1389. The referral itself is defined as a plugin of type Referral on Update. This command sets up the server to process read operations but redirects all write operations under dc=example,dc=com to another server.
    $ bin/dsconfig create-plugin --plugin-name "Refer Updates" \
      --type referral-on-update \
      --set enabled:true \
      --set referral-base-url:ldap://server1.example.com:1389/ \
      --set "base-dn:dc=example,dc=com"
  4. To test the referral, attempt to modify an entry and confirm that the server responds with the result code of 10. The resulting message is available in the server's access log.
    $ bin/ldapmodify -p 2389 -D "cn=Directory Manager" -w password
    dn: uid=user.12,ou=People,dc=example,dc=com
    telephoneNumber: +1 408 555 1155
    [06/Aug/2012:15:28:21.468 -0400] MODIFY 
    RESULT conn=86 op=1 msgID=1 requesterIP="" 
    dn="uid=user.12,ou=People,dc=example,dc=com" resultCode=10 
    ou=People,dc=example,dc=com" etime=0.223