I have two NIC's that have access to my iSCSI network. I want to specify the initiator IP as well as the Target portal IP and create redundant links and use MPIO.
This is easily done using the Advanced settings in the iSCSI initiator GUI. However, I want to be able to specify the initiator IP using iscsicli.
I am pretty sure the answer is in one of the options for iscsicli persistentlogin where there are 15 "*'s" that represent different options. I am just not sure what * to replace with what.
The trick is set the "port number" parameter in the AddTargetPortal command in iscsicli.
However, the only way I was able to associate this port number with an actual IP address is using WMI. In order to figure this out, I used PowerShell
Once you track down the port number (let's say 2) you can use the following to add the target portal assuming the target has an ip of 10.10.10.10. The port number comes after the initiator name, ROOT\ISCSIPRT\0000_0
I don't have an answer but I want to try and encourage some additional input as I am also very interested in this. Have you exhausted the possibilities demonstrated in the comment by Fulgan in this technet thread.?
There is a specific discussion of the challenges related to your problem in this technet thread but there doesn't seem to be any resolution. The key parameter for the persistentlogin seems to be the fourth default (*) that the iSCSI documentation refers to as the port number.
I assume you have been trawling through the MS iSCSI Initiator documentation but if not you can find it here - it is quite detailed and has an explanation of each parameter unfortunately it doesn't seem to shed light on this particular problem.