Scripting iSCSI Logins using various Source IPs - Storage

This is a discussion on Scripting iSCSI Logins using various Source IPs - Storage ; In the iSCSI Initiator GUI, you can specify the source IP for the connection. This is useful in machines where I have multiple NICs. I would like to script these logins via the iscsicli, but I cannot find the parameter ...

+ Reply to Thread
Results 1 to 4 of 4

Thread: Scripting iSCSI Logins using various Source IPs

  1. Scripting iSCSI Logins using various Source IPs

    In the iSCSI Initiator GUI, you can specify the source IP for the connection.
    This is useful in machines where I have multiple NICs.

    I would like to script these logins via the iscsicli, but I cannot find the
    parameter that allows me to specify the source IP address for the connection.
    I tried using the initiator port parameter, but that gave me
    0.0.0.0/port_number not the 192.68.x.y that I specified.

  2. Re: Scripting iSCSI Logins using various Source IPs

    You want to use the Port Number parameter (see below)




    LoginTarget

    <**** Port number ****>




    ...

    This command will login to a target

    TargetName is the name of the target.

    ReportToPNP is a flag that indicates to the initiator whether or not it
    should expose the LUN to the port driver so that it can be exposed to the
    operating system as a storage device. This in turn would enable the volume
    to be mounted, formatted, and a drive letter assigned, etc. If the value is
    T or t then the LUN is exposed as a device. If anything else then the LUN is
    not exposed and the only operations that can be performed to the target are
    SCSI Inquiry, SCSI Report LUNS and SCSI Read Capacity, and only via the
    iSCSI discovery service, since the operating system is not aware of the
    existence of the device.

    TargetPortalAddress is the IP or DNS address of the target portal

    TargetPortalSocket is the TCP port number of the target portal. Typically
    this is 3260, which is the well-known port number defined for use by iSCSI.

    Initiator Name is the name of the initiator via which the login operation is
    performed. If not specified then the initiator used is selected by the iSCSI
    initiator service.

    **********
    Initiator Port Number is the physical port number on the initiator via which
    the login operation is performed. If not specified then the kernel mode
    initiator driver chooses the initiator port used.
    **********

    Security Flags is a set of flags that describe the type of IPSEC to use when
    establishing a TCP connection to the target portal. See below for the
    definitions of the security flags.

    Login Flags is a set of flags that affect behavior of iSCSI login to the
    target. See below for the definitions of the login flags.

    Header Digest is non-zero to indicate that the initiator should enable
    header digest when logging into the target portal. By specifying * for this
    parameter, the digest setting is determined by the initiator kernel mode
    driver.

    Data Digest is non-zero to indicate that the initiator should enable data
    digest when logging into the target portal. By specifying * for this
    parameter, the digest setting is determined by the initiator kernel mode
    driver.

    MaximumConnections specifies the maximum number of connections for the
    discovery session to use when performing the SendTargets operation. By
    specifying * for this parameter, the kernel mode initiator driver chooses
    the value for maximum connections.

    DefaultTime2Wait is the value that the initiator should use to negotiate
    when logging into the target. By specifying * for this parameter, the kernel
    mode initiator driver chooses a value.

    DefaultTime2Retain is the value that the initiator should use to negotiate
    when logging into the target. By specifying * for this parameter, the kernel
    mode initiator driver chooses a value.

    Username is the string that should be used as the CHAP username when logging
    into the target. By specifying * for this parameter, the iSCSI initiator
    service will use the initiator node name as the CHAP username.

    Password is the string that should be used as the target's CHAP secret when
    logging into the target. The initiator will use this secret to compute a
    hash value based on the challenge sent by the target.

    AuthType is the type of authentication to use when logging into the target.
    See below for definitions of the authentication types.

    Key is the IPSEC preshared key to used to establish the TCP connection if
    IPSEC is needed.

    MappingCount specifies the count of target mappings that the initiator
    should use when logging into the target. Following the mapping count are
    that number of sets of target LUN, OS Bus, OS target and OS LUN values which
    comprise the actual mappings. See below for more information on the
    MappingCount parameters

    is the LUN value the target uses to expose the LUN.
    It must be in the form 0x0123456789abcdef
    is the bus number the OS should use to surface the LUN
    is the target number the OS should use to surface the LUN
    is the LUN number the OS should use to surface the LUN

    --
    ----------------------------------------------------------------------------
    ----------------------------------------
    This posting is provided "AS IS" with no warranties, and confers no rights.


    "Jim M" M@discussions.microsoft.com> wrote in message
    news:6A85D03B-4DA3-447D-9AD9-6357420D2DC0@microsoft.com...
    > In the iSCSI Initiator GUI, you can specify the source IP for the

    connection.
    > This is useful in machines where I have multiple NICs.
    >
    > I would like to script these logins via the iscsicli, but I cannot find

    the
    > parameter that allows me to specify the source IP address for the

    connection.
    > I tried using the initiator port parameter, but that gave me
    > 0.0.0.0/port_number not the 192.68.x.y that I specified.




  3. Re: Scripting iSCSI Logins using various Source IPs

    > You want to use the Port Number parameter (see below)
    >
    > **********
    > Initiator Port Number is the physical port number on the initiator via which
    > the login operation is performed. If not specified then the kernel mode
    > initiator driver chooses the initiator port used.
    > **********



    So, I'm a little confused as to what the "units" are for this parameter.

    Let's say I have a dual-port Intel Motherboard NIC (192.168.1.10,
    192.168.1.11 as the IP's respectively) and another NIC like a 10Gig NIC
    (192.168.1.20) as the three NICs in my system.

    I want to specify that certain volumes are on the .120 address for the 10G,
    other volumes are on the .11, leaving the .10 for normal "network" traffic.

    How to do I map the IP addresses of my NICs to physical port number on the
    initiator?

    As an aside, the CLI docs are a little light on examples, especially
    considering how dense some of the commands are in terms of number of
    parameters.

    Thanks in advance for your assistance.

  4. Re: Scripting iSCSI Logins using various Source IPs

    The port number is an index to the list of ip addresses assigned to the
    initiator computer. It is a value from 0...(n-1) where n is the number of ip
    addresses on the machine

    --
    ----------------------------------------------------------------------------
    ----------------------------------------
    This posting is provided "AS IS" with no warranties, and confers no rights.

    "Jim M" wrote in message
    news:300191BE-7088-406D-9F39-30F6E6D71E58@microsoft.com...
    > > You want to use the Port Number parameter (see below)
    > >
    > > **********
    > > Initiator Port Number is the physical port number on the initiator via

    which
    > > the login operation is performed. If not specified then the kernel mode
    > > initiator driver chooses the initiator port used.
    > > **********

    >
    >
    > So, I'm a little confused as to what the "units" are for this parameter.
    >
    > Let's say I have a dual-port Intel Motherboard NIC (192.168.1.10,
    > 192.168.1.11 as the IP's respectively) and another NIC like a 10Gig NIC
    > (192.168.1.20) as the three NICs in my system.
    >
    > I want to specify that certain volumes are on the .120 address for the

    10G,
    > other volumes are on the .11, leaving the .10 for normal "network"

    traffic.
    >
    > How to do I map the IP addresses of my NICs to physical port number on the
    > initiator?
    >
    > As an aside, the CLI docs are a little light on examples, especially
    > considering how dense some of the commands are in terms of number of
    > parameters.
    >
    > Thanks in advance for your assistance.




+ Reply to Thread