Set the connections properties to configure login redirection:
CS_PROP_REDIRECT – enables and disables login redirection
CS_DS_RAND_OFFSET – disables or enables making first query entry randomly retrieved from the directory service lookup for ct_connect. By default, this property is set to false.
See the Client Library Reference Manual.