====== iSCSI initiator name setting ====== ===== Name ===== initiator-iqn ===== Details ===== ^ Type | [[:cfgtype:string|String]] | ^ DHCP option number | 203 | ^ ISC dhcpd syntax | ''option iscsi-initiator-iqn'' | ===== Examples ===== === Set the iSCSI initiator name manually === iPXE> set initiator-iqn iqn.2010-04.org.ipxe:client123 === Set the iSCSI initiator name based on the MAC address === iPXE> set initiator-iqn iqn.2010-04.org.ipxe:${mac:hexhyp} === Configure the iSCSI initiator name in ISC dhcpd === # in /etc/dhcpd.conf option iscsi-initiator-iqn "iqn.2010-04.org.ipxe:client123" === Configure the iSCSI initiator name in the Microsoft DHCP server === {{ :screenshots:msdhcp_set_initiator_iqn.png?207x231 |Setting initiator IQN}} ===== Description ===== Specifies the iSCSI initiator name used when connecting to an iSCSI target. If no iSCSI initiator name is explicitly specified, then iPXE will construct a default iSCSI initiator name based upon the ''[[:cfg:hostname]]'' (if a ''hostname'' exists) or the ''[[:cfg:uuid]]''. For example, if the ''[[:cfg:hostname]]'' is set to ''client.example.com'', then the default iSCSI initiator name will be iqn.2010-04.org.ipxe:client.example.com and if no ''hostname'' is defined, then the default iSCSI initiator will be constructed from the system ''[[:cfg:uuid]]'': iqn.2010-04.org.ipxe:7e10b6af-344b-41d7-802e-24f0e68a174d ===== See also ===== * [[:cfg|List of all iPXE settings]] ===== Notes ===== The iSCSI initiator name is often used within access control lists (ACLs) on iSCSI targets. You may wish to specify an explicit iSCSI initiator name to make your access control lists more manageable. If you are using [[:howto:dhcpd|ISC dhcpd]] as your DHCP server, then you may need to add the line option iscsi-initiator-iqn code 203 = string; to the start of your ''/etc/dhcpd.conf'' file. If you are using the [[:howto:msdhcp|Microsoft DHCP server]], then you may need to add a new predefined option via **IPv4** -> **Set Predefined Options** -> **Add**: {{ :screenshots:msdhcp_add_initiator_iqn.png?187x112 |Adding initiator IQN predefined option}}