The ldap-server source command configures the source IP address that a device uses when sending packets to the LDAP server.
The undo ldap-server source command restores the default configuration.
By default, when a device sends packets to the LDAP server, the IP address of the actual outbound interface is used as the source IP address.
ldap-server source { loopback interface-number | ip-address ip-address | vlanif interface-number }
undo ldap-server source
Parameter |
Description |
Value |
|---|---|---|
loopback interface-number |
Specifies the IP address of a loopback interface as the source IP address that the device uses when sending packets to the LDAP server. |
The value is an integer that ranges from 0 to 2147483647. |
ip-address ip-address |
Specifies an IP address as the source IP address that the device uses when sending packets to the LDAP server. |
The value must be a valid unicast address in dotted decimal notation. |
vlanif interface-number |
Specifies the IP address of a VLANIF interface as the source IP address that the device uses when sending packets to the LDAP server. The interface-number parameter indicates the VLANIF interface number. |
The value is an integer that ranges from 1 to 4094. |
Usage Scenario
By default, when a device sends packets to the LDAP server, the IP address of the actual outbound interface is used as the source IP address. In some scenarios where the IP address of the actual outbound interface is used, the device cannot communicate with the LDAP server. For example, if an IPSec tunnel is deployed between the device and the LDAP server and the IP address of the outbound interface found based on the routing entries is a public IP address, data forwarded using this public IP address cannot be transmitted through the IPSec tunnel. In this case, you need to change the IP address that the device uses for communicating with the LDAP server using the ldap-server source command.
Precautions
If the specified loopback interface or VLANIF interface is not created or no IP address is configured for the specified interface, use the IP address of the actual outbound interface as the source IP address.