3GPP TS 36.413 spec has defined two procedures (those are eNB Configuration Transfer and MME Configuration Transfer).
These procedures are used to exchange SON information between two two eNodeBs to setup the X2 link.
Following actions are taken by eNodeBs to establish the X2 link.
Source eNodeB configures its UE and ask to provide measurement report of target frequency. The target frequency may be same as source eNodeB or different one.
After getting the measurement report, source eNodeB configures UE to provide target cell information. For the cell information please check measurement report which is defined in 3GPP TS 36.331 spec.
Once source eNodeB receives target cell information from the UE, source eNodeB triggers eNB Configuration Transfer message to MME to get the target eNodeB IP address.
MME receives eNB Configuration Transfer message and sends the MME Configuration Transfer message. eNB Configuration Transfer message contains (target eNodeB id , Request for X2 tunnel information and its own X2 tunnel information). MME sends MME Configuration Transfer message to relevant target eNodeB based on the information received in eNB Configuration Transfer message.
Target eNodeB fills X2 tunnel information within the eNB Configuration Transfer message and send this message to MME.
MME prepares and sends eNB Configuration Transfer message to source eNodeB.
Now source eNodeB knows IP address of target eNodeB and it can initiate X2 setup procedure towards target eNodeB.