iSCSI Working Principle, Target and Initiator Configuration

iSCSI (Internet Small Computer System Interface) is the protocol that gives a server block-level access to a remote storage unit over TCP/IP. The server sees this space, which arrives over the network, as a local disk of its own, creates a volume on it and manages the file system itself. It does not need the separate fabric and HBA infrastructure that is common in Fibre Channel SANs, and it runs on standard Ethernet adapters and switches. This is also what lowers the cost.

Running on standard Ethernet makes iSCSI easier to deploy, but it moves the design responsibility to the network side. Storage traffic now passes through switches, cables and network adapters. In a design without redundancy, when a switch, cable or network adapter on the iSCSI path fails, the host that uses that path loses access to the disk. In this article, I first explain the components of iSCSI and why its traffic is carried on a separate network. I then start the same design from its non-redundant form, add port, cable, controller and switch redundancy step by step, and show how disk access continues when 1 of these components fails. In the final sections, I apply the iSCSI target and iSCSI initiator configuration in my lab environment.

The installation steps for MPIO, NIC Teaming and Failover Clustering are outside the scope of this article. I refer to these technologies only as far as needed to show what redundancy solves at which layer.

iSCSI Target Server became a built-in role service of the operating system with Windows Server 2012. The steps here do not depend on a specific version. Microsoft's current role documentation covers Windows Server 2016, 2019, 2022 and 2025.

1- How Does iSCSI Work? Initiator, Target, LUN and IQN

iSCSI places SCSI commands inside TCP packets and carries them over the network. The side that starts the connection and the side that presents the storage space have separate names, and the whole configuration is based on the relationship between these 2 sides.

Component Role Equivalent in This Design
iSCSI initiator Starts the connection and uses the disk. Host-1 and Host-2
iSCSI target The endpoint that initiators connect to. It defines who can connect and which disks are presented. The target named LUN01 on the storage
LUN The logical disk presented through the target. It appears as a local disk on the initiator side. The iSCSI virtual disk that I created on the storage
IQN The unique name that identifies each initiator and each target. The default format on the Windows initiator is iqn.1991-05.com.microsoft:{Server Name}
Portal The pair of IP address and TCP port that the target listens on. 10.10.10.200 and the default port, TCP 3260

The target and the LUN are often confused. A target is not a disk, it is the connection point that the disks sit behind. More than 1 LUN can be assigned to a target, and when an initiator connects to the target, it sees all of the LUNs assigned to that target. In my lab environment, I named the target LUN01. This name appears the same way in the screenshots, but the object that carries the name is the target, and the LUN is the iSCSI virtual disk that I assigned to it.

There are 2 separate layers on the security side. CHAP (Challenge Handshake Authentication Protocol) verifies who can connect to the target, but it does not encrypt the data in transit. If the traffic must be encrypted, this is done with IPsec. Because fibre optic cabling and a separate switched fabric are common in Fibre Channel SANs, the storage network is already physically separate in most designs. Fibre Channel hardware that runs over copper cable also exists, but the separation still comes with an infrastructure dedicated to storage. In iSCSI, you have to provide this separation yourself through design.

2- Why Is iSCSI Traffic Carried on a Separate Network?

The mistake I see most often in iSCSI configurations is that LAN traffic and iSCSI traffic pass through the same network adapter and the same network. Because iSCSI works at block level, every read and write operation that a server performs becomes network traffic. When this traffic shares the same adapter with user access, backup or file copy traffic, the 2 sides consume each other's bandwidth. A heavy copy operation on the LAN increases the response time of the disk, and a heavy operation on the disk slows down user traffic.

Using a separate network adapter and a separate network does not reduce iSCSI traffic, it isolates it from other traffic. The isolation has 3 concrete results.

  • Disk access latency becomes independent of the load on the LAN.
  • The iSCSI network can be kept as a separate network that is not routed to other networks.
  • Settings that suit storage traffic, such as jumbo frames, can be enabled on this network without affecting the LAN.

Using a separate switch or a separate VLAN does not complete the isolation on its own. In this design, the storage server also has an address on the LAN network, and portals in iSCSI Target Server are defined per IP address. For storage traffic to be unreachable from the user network, you need to restrict access between the networks and make sure that the target accepts connections only on the address dedicated to iSCSI. The portal on the LAN address can be disabled on the storage server with the Set-IscsiTargetServerSetting -IP 192.168.1.200 -Enable $False command.

On the speed side, iSCSI is limited by the speed that the Ethernet infrastructure provides. 1 GbE is among the supported speeds, and whether it is sufficient depends on the I/O intensity of the workload. For servers with heavy I/O in a production environment, I recommend 10 GbE and above.

If jumbo frames are enabled, compatible MTU values are used on the initiator and target sides, and every switch port in between must be able to carry this frame size. The value on the switch side does not have to be the same as the value on the host. Microsoft's iSCSI design uses MTU 9000 on the host and 9216 on the switch. The problem occurs when a port with a lower limit remains on the path, because a frame that exceeds that limit is dropped.

In designs that use a failover cluster, the heartbeat is carried over the networks that are allowed for cluster communication. Depending on the design, a separate network can be dedicated to this traffic, and it is recommended to close the network dedicated to iSCSI to cluster communication. The design in this article does not include a cluster network, so here I continue with 2 networks, LAN and iSCSI.

3- Sample Design and IP Plan

The design below is my own scenario. Because my aim is to show how it works, the number of servers, the addresses and the devices will differ in your organisation. The domain name is firatboyan.com, the LAN network is 192.168.1.0/24 and the iSCSI network is 10.10.10.0/24.

Server Role LAN iSCSI
Primary Domain Controller Active Directory Domain Services 192.168.1.100/24 10.10.10.100/24
Host-1 Member server, iSCSI initiator 192.168.1.101/24 10.10.10.101/24
Host-2 Member server, iSCSI initiator 192.168.1.102/24 10.10.10.102/24
Storage Member server, iSCSI target 192.168.1.200/24 10.10.10.200/24

The topology diagrams show an external storage device with 2 controllers, because I want to show the redundancy decisions on real hardware. In my lab environment, however, I do not have external storage, so a Windows Server on which I installed iSCSI Target Server takes the same role. The steps in the configuration sections are carried out on this server.

In my lab scenario, I also gave the domain controller an address from the iSCSI network, and this connection appears in the diagrams. Because the domain controller does not use a disk from the storage, this connection is not needed in a production environment. If you do set up such a connection, clear the Register this connection's addresses in DNS option in the properties of the iSCSI adapter. If the domain controller is also a DNS server, restrict the addresses to listen on in the Interfaces tab under DNS Server Properties, remove the iSCSI address if it is listed in the Name Servers tab of the zone, and delete any unwanted host (A) record that was created earlier.

A domain controller with more than 1 network adapter can also register its iSCSI address in DNS. In this case, clients on the LAN can receive an address for the domain controller that they cannot reach.

4- Physical Topology: From a Non-Redundant Design to a Redundant Design

Instead of showing the connections in their most redundant form at once, I start from the non-redundant design and close 1 weakness at each stage. This makes it possible to see which cable and which device was added and why. In the diagrams, blue cables show the iSCSI network and red cables show the LAN network.

Stage 1 - Non-Redundant Design

The first design has 2 separate switches. Port 1 of each server connects to the iSCSI switch and port 4 connects to the LAN switch. On the storage side, 1 cable goes from Controller A to the iSCSI switch and 1 cable goes from Controller B to the LAN switch. This design provides the traffic separation that I described in section 2, but every connection is made over a single cable and a single port.

Non-redundant topology with separate switches for iSCSI and LAN and a single NIC

The same separation can also be made on a single switch with a VLAN configuration. In the design below, half of the switch is assigned to the iSCSI network as VLAN 10 and the other half is assigned to the LAN network as VLAN 20. The cost of the second switch is removed, and the 2 networks still remain logically separate from each other.

Non-redundant topology with VLAN 10 iSCSI and VLAN 20 LAN separation on a single switch

Weaknesses of the Non-Redundant Design

In these 2 designs the traffic is separated, but no component has a spare. The failure of a single part has the following results.

Failed Component Result
The iSCSI port or cable of a host That host cannot access the disk on the storage.
The LAN port or cable of a server That server loses its LAN connection.
The iSCSI port of the storage, or the controller that holds that port All hosts lose access to the disk at the same time.
The iSCSI switch All hosts lose access to the disk at the same time.
The LAN switch All servers lose their LAN connection. Clients on the LAN lose access to the domain controller.
The single switch separated by VLANs The iSCSI and LAN networks fail together.

The last row of the table shows why the single-switch design can be chosen only for cost reasons. A VLAN separates the 2 networks logically, it does not separate the hardware. In the design with 2 switches, a switch failure affects 1 network, whereas here both networks depend on the same device.

Stage 2 - Port, Cable and Controller Redundancy

In the second stage, I bring the unused ports on the servers into use. Ports 1 and 2 of each server connect to the iSCSI switch, and ports 3 and 4 connect to the LAN switch. On the storage side, I distribute the cables crosswise across the controllers. Both Controller A and Controller B have 1 iSCSI cable and 1 LAN cable.

Port and cable redundancy with dual iSCSI ports, dual LAN ports and 2 controllers

With this stage, the failure of a single port or cable on a server does not disconnect that server from the network, and traffic continues over the other cable. When a controller fails on the storage side, the iSCSI and LAN connections on the other controller remain active. Connecting both cables to the same controller would remove this benefit, because the failure of that controller would cut both paths together.

Connecting the second cable does not provide redundancy on its own. The operating system must manage these 2 paths as a single connection, and the method for this differs between the iSCSI side and the LAN side.

On the iSCSI side, the method is MPIO. When a host connects to the storage over 2 separate paths, it sees the same LUN as 2 separate disks. Multipath I/O (MPIO) recognises that these 2 paths lead to the same disk, presents the disk as a single disk and moves I/O to the other path when 1 of the paths fails. MPIO is installed as a separate feature in Windows Server. For the Microsoft DSM (MSDSM) to claim iSCSI devices, the Add support for iSCSI devices option is added from the Discover Multi-Paths tab in the MPIO console, or the Enable-MSDSMAutomaticClaim -BusType iSCSI command is run in PowerShell. If the option in the console appears unavailable, make the first connection to the target and check again. Adding this option can require a restart of the server.

Next, a separate session is opened for each path in the iSCSI initiator. Enable multi-path is selected in each session, and the initiator IP and the target portal IP of that path are selected manually in the Advanced section. The Enable multi-path option does not guarantee on its own that the 2 sessions use different physical paths. What defines the independent paths is this address pair that you select in each session.

On the LAN side, the method is NIC Teaming. The 2 LAN ports are combined into a single logical adapter with a NIC Teaming configuration. If the hosts run the Hyper-V role, Switch Embedded Teaming (SET) is used for this from Windows Server 2022 onwards.

Do not combine the network adapters dedicated to iSCSI with NIC Teaming. For redundancy on adapters dedicated to iSCSI, Microsoft recommends MPIO, not teaming.

The single-switch equivalent of the same stage is shown below. Port, cable and controller redundancy exists here too.

Dual-port iSCSI and LAN connections on a single switch with VLANs

The weakness that remains at this stage is the switch. In the design with 2 switches, if the iSCSI switch fails, disk access is lost completely, because both iSCSI cables of each host go to the same device. In the single-switch design, the failure of that switch takes all 16 cables out of service at once.

Stage 3 - Switch Redundancy and Stack

In the final stage, I add a second switch for each network and distribute the 2 cables that each server has to the same network across 2 separate switches. Port 1 of the servers connects to iSCSI SWITCH-2, port 2 to iSCSI SWITCH-1, port 3 to LAN SWITCH-1 and port 4 to LAN SWITCH-2. On the storage, Controller A connects to iSCSI SWITCH-2 and LAN SWITCH-1, and Controller B connects to iSCSI SWITCH-1 and LAN SWITCH-2. The 2 switches of the same network are connected to each other with a stack cable.

Switch redundancy with 2 iSCSI switches, 2 LAN switches and stack connections

In this design, when any 1 of the 4 switches fails, the second cable of each server on that network continues to work through the other switch. When a single controller fails, the path on the other controller also remains active. For this, MPIO must be running on the host and controller failover must be working on the storage.

This design does not cover every double failure. Note that each controller is connected to only 1 iSCSI switch. If Controller A and iSCSI SWITCH-1, or Controller B and iSCSI SWITCH-2, fail at the same time, no usable iSCSI path remains and disk access is lost. To cover this double failure as well, 1 connection from each controller to each of the 2 iSCSI switches is needed, which means 2 iSCSI ports per controller.

A stack makes the 2 switches of the same network work as a single switch. I will explain why it is needed by using the LAN side. When the cable from Host-1 to LAN SWITCH-1 fails, Host-1 can be reached only through LAN SWITCH-2. Both cables of the domain controller are intact, and it sends part of its traffic through LAN SWITCH-1. If there is no connection between the 2 switches, the packets that reach LAN SWITCH-1 have no path to Host-1. When the connection between them exists, the packet passes from LAN SWITCH-1 to LAN SWITCH-2 and reaches Host-1. What is needed in this example is that the LAN network is carried between the 2 switches. A stack provides this. In designs without a stack, a link between the 2 switches that carries the same VLAN does the same job.

The situation is different on the iSCSI side. In this design, each host port reaches the controller connected to its own switch through that switch, and MPIO works over these 2 independent paths. The stack between the iSCSI switches is not required for MPIO to work. When it is set up, it allows each host port to reach both controllers. In this design, to keep the physical separation, the LAN switches form a stack among themselves and the iSCSI switches form a stack among themselves.

Redundancy Summary

Component Stage 1 Stage 2 Stage 3
Server port and cable No redundancy Redundant Redundant
Storage controller No redundancy Redundant Redundant
Switch No redundancy No redundancy Redundant

Stage 3 covers the failure of a single cable, port, switch or controller on the network path between the server and the storage. In the specific double failures that I described above, disk access is lost. When you evaluate the design as a whole, you also need to take into account 3 points that are outside the network path.

The 4 ports are on a single network adapter. In the diagrams, the 4 ports of each server are on the same adapter. The failure of a single port does not cause a problem, but using 2 ports of the same adapter does not protect against an adapter failure. When the adapter fails, all 4 connections of that server are lost together. In a production environment, I recommend that you distribute the iSCSI and LAN ports across 2 separate adapters.

The storage is a single device. The 2 controllers cover a controller failure, but they do not cover a failure that affects the whole chassis. This is more obvious in my lab environment, because a single Windows Server takes the storage role. When that server shuts down, disk access ends.

Cabling does not work without the software layer. Unless MPIO is configured on the iSCSI side and NIC Teaming on the LAN side, the second cables and the second switches do not provide redundancy.

5- Preliminary Checklist

Before you start the configuration, the following items must be ready. The addresses come from the IP plan in section 3.

Check Expected State
iSCSI address of the storage server 10.10.10.200/24 is assigned to the iSCSI network adapter
iSCSI addresses of the hosts 10.10.10.101/24 is assigned on Host-1 and 10.10.10.102/24 on Host-2
Access on the iSCSI network The network path from the hosts to the iSCSI address of the storage is open and the firewall rules allow TCP 3260 traffic
Location for the virtual disk The disks are configured on the storage server and a volume formatted with NTFS or ReFS is ready
Permissions Membership of the local Administrators group on the storage server and on the hosts

At this point, the check that can be made for TCP 3260 is limited to the network path and the firewall rules. A connection test on the port is meaningful only after the role is installed and the target portal starts listening.

6- Decision Table

The iSCSI virtual disk and the target are created in a single wizard, on pages that follow each other. I have collected the decisions for these pages below so that you can see them in advance. The virtual disk name and size that I use in my lab environment will be different in your design, so I show these values with placeholders.

Step Page Decision to Make Choice in This Installation
Step 4 iSCSI Virtual Disk Location Which volume holds the virtual disk file The disk that I configured as RAID-5
Step 5 iSCSI Virtual Disk Name The name of the virtual disk {Virtual Disk Name}
Step 6 iSCSI Virtual Disk Size The size of the space presented to the hosts {Size}
Step 7 iSCSI Target Whether an existing target is used or a new target is created New iSCSI Target
Step 8 Target Name and Access The name of the target LUN01
Step 9 Access Servers Which initiators can connect to the target Host-1 and Host-2
Step 10 Enable Authentication Whether CHAP is used CHAP enabled, User name and Password defined

7- iSCSI Target Server Role and Virtual Disk

I carry out all of the steps in this section on the server that takes the storage role.

Step 1 - Installing the iSCSI Target Server Role

Because there is no external storage in my environment, I give this role to a Windows Server. In the Add Roles and Features Wizard, I select the iSCSI Target Server role service under File and Storage Services and complete the installation.

Selecting the iSCSI Target Server role service in the Add Roles and Features Wizard

The same installation can also be done with a single command in a PowerShell session opened with administrator rights.


Install-WindowsFeature FS-iSCSITarget-Server

Step 2 - Preparing the Disks as RAID-5

After the role is installed, I configure my disks on the storage as RAID-5, as my scenario requires. Because the iSCSI virtual disk will sit on this volume, this RAID configuration determines the resilience of the space presented to the hosts. RAID-5 covers the failure of a single disk. In this case the array continues to work as Degraded and access to the iSCSI space continues, but performance drops until the failed disk is replaced and the array is rebuilt. If a second disk also fails, the volume and the virtual disk on it are lost.

Configuring the disks as RAID-5 on the storage server

Step 3 - Starting the New iSCSI Virtual Disk Wizard

In Server Manager, I open the iSCSI section under File and Storage Services and start the wizard with the New iSCSI Virtual Disk option in the TASKS menu.

Opening the iSCSI section in Server Manager

Selecting the New iSCSI Virtual Disk option in the TASKS menu

Step 4 - Selecting the Virtual Disk Location

As the location for the virtual disk file, I select the disk that I configured as RAID-5. RAID-5 determines the fault tolerance of the underlying disks, whereas whether the virtual disk can be created depends on the file system of the volume. iSCSI Target Server keeps the virtual disk on a volume formatted with NTFS or ReFS. FAT, FAT32 and exFAT are not supported.

Selecting the RAID-5 volume on the iSCSI Virtual Disk Location page

Step 5 - Naming the Virtual Disk

I give my virtual disk a name. The Path field shows that the file extension is .vhdx. iSCSI Target Server keeps the space that it presents to the hosts as a VHDX file on the storage server. This format is the same disk format that Microsoft Hyper-V virtual machines use, and it supports sizes up to 64 TB. VHDX support came to iSCSI Target Server with Windows Server 2012 R2. In the first Windows Server 2012 release, the iSCSI virtual disk is created as a VHD.

Entering the name on the iSCSI Virtual Disk Name page, with the Path showing the vhdx extension

Step 6 - Setting the Virtual Disk Size

On this page, I enter the space that I allocate to the virtual disk. The value entered here is the disk size that the host sees in Disk Management.

Setting the size on the iSCSI Virtual Disk Size page

Step 7 - Selecting the iSCSI Target

On this page, I define which target presents the virtual disk. Because there is no target in the environment yet, I select the New iSCSI Target option.

Selecting the New iSCSI Target option on the iSCSI Target page

Step 8 - Naming the Target

I name my target LUN01. LUN01 is the management name of the target. Windows uses this name to create the IQN of the target itself, and on the host side the Targets list of the iSCSI initiator shows this full IQN, not the short name. Its format is iqn.1991-05.com.microsoft:{Server Name}-lun01-target. The iqn.1991-05.com.microsoft:{Server Name} format that I gave in the table in section 1 belongs to the initiator.

Entering LUN01 as the target name on the Target Name and Access page

Step 9 - Adding the Hosts That Are Given Access

On this page, I define which initiators can connect to the target. An initiator that is not in the list cannot connect, even if it discovers the target. To add a host, I click the Add button.

Clicking the Add button on the Access Servers page

In the window that opens, the initiator can be identified with 4 different identifiers.

Identifier Type Point to Note
IQN The unique name of the initiator. It remains valid even if the IP address of the host changes.
DNS Name The initiator is identified by its DNS name.
IP Address The iSCSI address of the host must be entered, not its LAN address.
MAC Address The address of the iSCSI network adapter of the host must be entered.

I click the Browse button, select the host that I want to add and repeat the same operation for the second host. If you identify the host by IP address, use 10.10.10.101 for Host-1 and 10.10.10.102 for Host-2. Because the connection comes from the iSCSI network, a definition made with the LAN address does not match and the host cannot connect.

Clicking the Browse button in the window for adding an initiator

Selecting the host to add

The added hosts listed on the Access Servers page

Step 10 - Authentication with CHAP

On this page, I define the User name and Password that the initiators connecting to the target will use. CHAP is not mandatory, and whether you enable it depends on your security requirements. When you enable it, even a host in the access list cannot connect without entering this information. Microsoft iSCSI Initiator requires the CHAP secret to be between 12 and 16 characters long on connections that do not use IPsec. Set the password within this range.

Defining the User name and Password for CHAP on the Enable Authentication page

Step 11 - Confirming the Selections and Creating

On the summary page, I check the decisions that I made in the previous steps and click the Create button to create the virtual disk and the target.

Summary of the selections and the Create button on the Confirmation page

Completion of the virtual disk and target creation tasks on the Results page

Checkpoint
The virtual disk that I created and the LUN01 target connected to it are listed in the iSCSI section of Server Manager. The target does not appear as connected, because no initiator has connected to it yet.

The created virtual disk and the LUN01 target in the iSCSI section of Server Manager

8- iSCSI Initiator Connection

Now that the storage side is ready, I move to the host that will use the disk. I carry out the steps in this section on the host.

Step 12 - Discovering the Target with Discover Portal

I run iSCSI Initiator on the host. In the iSCSI Initiator Properties window, I click the Discover Portal... button and enter the IP address of the storage. For discovery, I use 10.10.10.200, which is the iSCSI address of the storage, not its LAN address. The Port field keeps its default value of 3260. The address entered for discovery does not determine on its own which 2 addresses the data session is established between. I make this selection during the connection in the next step.

Entering the storage IP address with Discover Portal in the iSCSI Initiator Properties window

Step 13 - Connecting to the Target

In the Targets tab, I see that the target that I created on the storage has been discovered. Being discovered does not mean being connected. Until the Connect button is clicked, the Status field remains Inactive.

The discovered target shown as Inactive in the Targets tab

I select the target and click the Connect button. In the Advanced section of the connection window, I select the iSCSI address of the host as the initiator IP and 10.10.10.200 as the target portal IP. This way I make sure that the data session is established over the iSCSI network, not over the LAN. Because I enabled CHAP under the heading Step 10 - Authentication with CHAP, I select the Enable CHAP log on option in the same section and enter the User name and Password that I defined there. When the option that adds the connection to the Favorite Targets list remains selected, the host connects to the target automatically after it restarts.

Checkpoint
The Status field shows Connected. The iSCSI session between the host and the target is established.

The target status shown as Connected in the Targets tab

Step 14 - Bringing the Disk Online and Creating a Volume

After the connection is established, the virtual disk on the storage appears as a new disk in the Disk Management console of the host. I first bring the disk Online, then Initialize it and create a volume on it.

Do not bring the same LUN online and use it on 2 hosts at the same time without a failover cluster. NTFS cannot manage 2 servers writing to the same disk at the same time, and the file system becomes corrupted.

Checkpoint
The disk is Online in Disk Management and has a volume with a drive letter assigned. Its size is the same as the value that I entered under the heading Step 6 - Setting the Virtual Disk Size.

Bringing the iSCSI disk online and creating a volume in the Disk Management console

From this point on, the space on the storage can be used on the host like a physical disk. All data written to the volume goes over the iSCSI network to the VHDX file on the storage server. If you add a second iSCSI path to the host and notice that the same disk appears 2 times in Disk Management, check the MPIO configuration that I described in section 4 under the heading Stage 2 - Port, Cable and Controller Redundancy, and check which DSM claims the device. Only 1 multipath solution must be active on the server.

This article covered how iSCSI works through the initiator, target and LUN, why storage traffic is carried on a separate network, and how the single points of failure in a non-redundant connection design are closed step by step by adding port, cable, controller and switch redundancy. I then installed the iSCSI Target Server role in my lab environment, created a virtual disk and a target, connected to this target with iSCSI Initiator on the host and made the disk ready for use.

I hope you find it useful...

No comments on this article yet. Be the first to comment!

750 characters available.
Security code
Comments are published once approved.
Your email is only used to let you know when your comment is approved. It is never published.