1de29f585SEdward Tomasz Napierala.\" Copyright (c) 2007-2010 Daniel Braniss <danny@cs.huji.ac.il> 2de29f585SEdward Tomasz Napierala.\" All rights reserved. 3de29f585SEdward Tomasz Napierala.\" 4de29f585SEdward Tomasz Napierala.\" Redistribution and use in source and binary forms, with or without 5de29f585SEdward Tomasz Napierala.\" modification, are permitted provided that the following conditions 6de29f585SEdward Tomasz Napierala.\" are met: 7de29f585SEdward Tomasz Napierala.\" 1. Redistributions of source code must retain the above copyright 8de29f585SEdward Tomasz Napierala.\" notice, this list of conditions and the following disclaimer. 9de29f585SEdward Tomasz Napierala.\" 2. Redistributions in binary form must reproduce the above copyright 10de29f585SEdward Tomasz Napierala.\" notice, this list of conditions and the following disclaimer in the 11de29f585SEdward Tomasz Napierala.\" documentation and/or other materials provided with the distribution. 12de29f585SEdward Tomasz Napierala.\" 13de29f585SEdward Tomasz Napierala.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 14de29f585SEdward Tomasz Napierala.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 15de29f585SEdward Tomasz Napierala.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 16de29f585SEdward Tomasz Napierala.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 17de29f585SEdward Tomasz Napierala.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 18de29f585SEdward Tomasz Napierala.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 19de29f585SEdward Tomasz Napierala.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 20de29f585SEdward Tomasz Napierala.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 21de29f585SEdward Tomasz Napierala.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 22de29f585SEdward Tomasz Napierala.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 23de29f585SEdward Tomasz Napierala.\" SUCH DAMAGE. 24de29f585SEdward Tomasz Napierala.\" 25*bd6bb493SRichard Scheffenegger.Dd February 25, 2022 26de29f585SEdward Tomasz Napierala.Dt ISCSI.CONF 5 27de29f585SEdward Tomasz Napierala.Os 28de29f585SEdward Tomasz Napierala.Sh NAME 29de29f585SEdward Tomasz Napierala.Nm iscsi.conf 30de29f585SEdward Tomasz Napierala.Nd iSCSI initiator configuration file 31de29f585SEdward Tomasz Napierala.Sh DESCRIPTION 32dfc58cbcSEdward Tomasz NapieralaThe 33dfc58cbcSEdward Tomasz Napierala.Nm 34dfc58cbcSEdward Tomasz Napieralaconfiguration file is used by the 35de29f585SEdward Tomasz Napierala.Xr iscsictl 8 3648cb3feeSEd Masteutility. 37dfc58cbcSEdward Tomasz NapieralaThe general syntax is: 38de29f585SEdward Tomasz Napierala.Bf Li 39de29f585SEdward Tomasz Napierala.Bd -literal 40de29f585SEdward Tomasz Napierala # this is a comment 41dfc58cbcSEdward Tomasz Napierala nickname_1 { 42de29f585SEdward Tomasz Napierala variable = value; 43de29f585SEdward Tomasz Napierala ... 44dfc58cbcSEdward Tomasz Napierala } 45dfc58cbcSEdward Tomasz Napierala nickname_2 { 46dfc58cbcSEdward Tomasz Napierala variable = value; 47dfc58cbcSEdward Tomasz Napierala ... 48dfc58cbcSEdward Tomasz Napierala } 49dfc58cbcSEdward Tomasz Napierala ... 50de29f585SEdward Tomasz Napierala.Ed 51de29f585SEdward Tomasz Napierala.Ef 52de29f585SEdward Tomasz Napierala.Bl -tag -width MaxConnections 53de29f585SEdward Tomasz Napierala.It Cm AuthMethod 54dfc58cbcSEdward Tomasz NapieralaSets the authentication type. 55dfc58cbcSEdward Tomasz NapieralaType can be either 56dfc58cbcSEdward Tomasz Napierala.Qq Ar None , 57dfc58cbcSEdward Tomasz Napieralaor 58dfc58cbcSEdward Tomasz Napierala.Qq Ar CHAP . 59dfc58cbcSEdward Tomasz NapieralaDefault is 60dfc58cbcSEdward Tomasz Napierala.Qq Ar None . 61dfc58cbcSEdward Tomasz NapieralaWhen set to 62de29f585SEdward Tomasz Napierala.Cm CHAP , 63dfc58cbcSEdward Tomasz Napieralaboth 64dfc58cbcSEdward Tomasz Napierala.Cm chapIName 65dfc58cbcSEdward Tomasz Napieralaand 66dfc58cbcSEdward Tomasz Napierala.Cm chapSecret 67dfc58cbcSEdward Tomasz Napieralamust be defined. 68de29f585SEdward Tomasz Napierala.It Cm chapIName 69dfc58cbcSEdward Tomasz NapieralaLogin for CHAP authentication. 70dfc58cbcSEdward Tomasz Napierala.It Cm chapSecret 71dfc58cbcSEdward Tomasz NapieralaSecret for CHAP authentication. 72dfc58cbcSEdward Tomasz Napierala.It Cm tgtChapName 73dfc58cbcSEdward Tomasz NapieralaTarget login for Mutual CHAP authentication. 74dfc58cbcSEdward Tomasz Napierala.It Cm tgtChapSecret 75dfc58cbcSEdward Tomasz NapieralaTarget secret for Mutual CHAP authentication. 76dfc58cbcSEdward Tomasz Napierala.It Cm HeaderDigest 77dfc58cbcSEdward Tomasz NapieralaSets the header digest; a checksum calculated over the header of iSCSI 78dfc58cbcSEdward Tomasz NapieralaPDUs, and verified on receive. 79dfc58cbcSEdward Tomasz NapieralaDigest can be either 80dfc58cbcSEdward Tomasz Napierala.Qq Ar None , 81dfc58cbcSEdward Tomasz Napieralaor 82dfc58cbcSEdward Tomasz Napierala.Qq Ar CRC32C . 83dfc58cbcSEdward Tomasz NapieralaDefault is 84dfc58cbcSEdward Tomasz Napierala.Qq Ar None . 85dfc58cbcSEdward Tomasz Napierala.It Cm DataDigest 86dfc58cbcSEdward Tomasz NapieralaSets the data digest; a checksum calculated over the Data Section of iSCSI 87dfc58cbcSEdward Tomasz NapieralaPDUs, and verified on receive. 88dfc58cbcSEdward Tomasz NapieralaDigest can be either 89dfc58cbcSEdward Tomasz Napierala.Qq Ar None , 90dfc58cbcSEdward Tomasz Napieralaor 91dfc58cbcSEdward Tomasz Napierala.Qq Ar CRC32C . 92dfc58cbcSEdward Tomasz NapieralaDefault is 93dfc58cbcSEdward Tomasz Napierala.Qq Ar None . 94dfc58cbcSEdward Tomasz Napierala.It Cm InitiatorName 95dfc58cbcSEdward Tomasz NapieralaSets the initiator name. 96dfc58cbcSEdward Tomasz NapieralaBy default, the name is concatenation of 97dfc58cbcSEdward Tomasz Napierala.Qq Ar iqn.1994-09.org.freebsd: 98dfc58cbcSEdward Tomasz Napieralawith the hostname. 9942e70ae8SEdward Tomasz Napierala.It Cm TargetName 10042e70ae8SEdward Tomasz NapieralaSets the target name. 10142e70ae8SEdward Tomasz NapieralaNot required for discovery sessions. 102dfc58cbcSEdward Tomasz Napierala.It Cm TargetAddress 103dfc58cbcSEdward Tomasz NapieralaSets the target address and port, in 104dfc58cbcSEdward Tomasz Napierala.Sy address[:port] 105dfc58cbcSEdward Tomasz Napieralaformat. 106dfc58cbcSEdward Tomasz NapieralaThe 107dfc58cbcSEdward Tomasz Napierala.Sy address 108dfc58cbcSEdward Tomasz Napieralacan be either an IP address, or hostname. 109dfc58cbcSEdward Tomasz NapieralaThe optional port defaults to 3260. 110dfc58cbcSEdward Tomasz Napierala.It Cm SessionType 111dfc58cbcSEdward Tomasz NapieralaSets the session type. 112dfc58cbcSEdward Tomasz NapieralaType can be either 113dfc58cbcSEdward Tomasz Napierala.Qq Ar Discovery , 114dfc58cbcSEdward Tomasz Napieralaor 115dfc58cbcSEdward Tomasz Napierala.Qq Ar Normal . 116dfc58cbcSEdward Tomasz NapieralaDefault is 117dfc58cbcSEdward Tomasz Napierala.Qq Ar Normal . 118dfc58cbcSEdward Tomasz NapieralaFor normal sessions, the 119dfc58cbcSEdward Tomasz Napierala.Sy TargetName 120dfc58cbcSEdward Tomasz Napieralamust be defined. 121dfc58cbcSEdward Tomasz NapieralaDiscovery sessions result in the initiator connecting to all the targets 122dfc58cbcSEdward Tomasz Napieralareturned by SendTargets iSCSI discovery with the defined 123dfc58cbcSEdward Tomasz Napierala.Sy TargetAddress . 124ba165a31SEdward Tomasz Napierala.It Cm Enable 125ba165a31SEdward Tomasz NapieralaEnable or disable the session. 126ba165a31SEdward Tomasz NapieralaState can be either 127ba165a31SEdward Tomasz Napierala.Qq Ar On , 128ba165a31SEdward Tomasz Napieralaor 129ba165a31SEdward Tomasz Napierala.Qq Ar Off . 130ba165a31SEdward Tomasz NapieralaDefault is 131ba165a31SEdward Tomasz Napierala.Qq Ar On . 132dfc58cbcSEdward Tomasz Napierala.It Cm Offload 133dfc58cbcSEdward Tomasz NapieralaName of selected iSCSI hardware offload driver. 134dfc58cbcSEdward Tomasz NapieralaDefault is 135dfc58cbcSEdward Tomasz Napierala.Qq Ar None . 1366735d502SEdward Tomasz Napierala.It Cm Protocol 1376735d502SEdward Tomasz NapieralaName of selected protocol. 1386735d502SEdward Tomasz NapieralaIt can be either 1396735d502SEdward Tomasz Napierala.Qq Ar iSER , 1406735d502SEdward Tomasz Napieralafor iSCSI over RDMA, or 1416735d502SEdward Tomasz Napierala.Qq Ar iSCSI . 1426735d502SEdward Tomasz NapieralaDefault is 1436735d502SEdward Tomasz Napierala.Qq Ar iSCSI . 144bfabdadeSRichard Scheffenegger.It Cm dscp 14569109a4fSGordon BerglingThe DiffServ Codepoint used for sending data. 14669109a4fSGordon BerglingThe DSCP can be set to numeric, or hexadecimal values directly, 14769109a4fSGordon Berglingas well as the well-defined 148bfabdadeSRichard Scheffenegger.Qq Ar cs<n> 149bfabdadeSRichard Scheffeneggerand 150bfabdadeSRichard Scheffenegger.Qq Ar af<xx> 151bfabdadeSRichard Scheffeneggercodepoints. 152bfabdadeSRichard ScheffeneggerDefault is no specified dscp codepoint, which means the default 153bfabdadeSRichard Scheffeneggerof the outgoing interface is used. 1544dfbcffbSRichard Scheffenegger.It Cm pcp 1554dfbcffbSRichard ScheffeneggerThe 802.1Q Priority CodePoint used for sending packets. 1564dfbcffbSRichard ScheffeneggerThe PCP can be set to a value in the range between 1574dfbcffbSRichard Scheffenegger.Qq Ar 0 1584dfbcffbSRichard Scheffeneggerto 1594dfbcffbSRichard Scheffenegger.Qq Ar 7 . 1604dfbcffbSRichard ScheffeneggerWhen omitted, the default for the outgoing interface is used. 161*bd6bb493SRichard Scheffenegger.It Cm PingTimeout 162*bd6bb493SRichard ScheffeneggerSpecify the time in seconds to wait between pings (SCSI NOP), and 163*bd6bb493SRichard Scheffeneggerfor a ping response before declaring the session as dead and 164*bd6bb493SRichard Scheffeneggerattempting a re-establishment. 165*bd6bb493SRichard ScheffeneggerIf this entry is not present in the conf file, the default value 166*bd6bb493SRichard Scheffeneggerconfigured using 167*bd6bb493SRichard Scheffenegger.Qq Ar kern.iscsi.ping_timeout 168*bd6bb493SRichard Scheffenegger(default at 169*bd6bb493SRichard Scheffenegger.Qq Ar 5 170*bd6bb493SRichard Scheffeneggerseconds) is taken by the driver. 171*bd6bb493SRichard ScheffeneggerIf present, the PingTimeout can be set to any positive value 172*bd6bb493SRichard Scheffeneggerstarting with 173*bd6bb493SRichard Scheffenegger.Qq Ar 1 . 174*bd6bb493SRichard Scheffenegger.It Cm LoginTimeout 175*bd6bb493SRichard ScheffeneggerSpecify the time in seconds to wait for a login PDU to be sent or 176*bd6bb493SRichard Scheffeneggerreceived after trying to establish a new session. 177*bd6bb493SRichard ScheffeneggerWhen no login PDU is received within this time, the login on a 178*bd6bb493SRichard Scheffeneggerparticular connection fails and a new reconnection attempt is made. 179*bd6bb493SRichard ScheffeneggerIf this entry is not present in the conf file, the default value of 180*bd6bb493SRichard Scheffenegger.Qq Ar 60 181*bd6bb493SRichard Scheffeneggerseconds is used, as configured by 182*bd6bb493SRichard Scheffenegger.Qq Ar kern.iscsi.login_timeout . 183*bd6bb493SRichard ScheffeneggerThe LoginTimeout can be set to any positive value starting with 184*bd6bb493SRichard Scheffenegger.Qq Ar 1 . 185de29f585SEdward Tomasz Napierala.El 186de29f585SEdward Tomasz Napierala.Sh FILES 187de29f585SEdward Tomasz Napierala.Bl -tag -width indent 188de29f585SEdward Tomasz Napierala.It Pa /etc/iscsi.conf 189de29f585SEdward Tomasz Napierala.El 190de29f585SEdward Tomasz Napierala.Sh EXAMPLES 191de29f585SEdward Tomasz Napierala.Bd -literal 192de29f585SEdward Tomasz Napieralamyiscsi { # nickname 193de29f585SEdward Tomasz Napierala targetaddress = iscsi1 194de29f585SEdward Tomasz Napierala targetname = iqn.1900.com.com:sn.123456 195de29f585SEdward Tomasz Napierala} 19642e70ae8SEdward Tomasz Napierala 19742e70ae8SEdward Tomasz Napieralamyiscsi6 { # nickname 19842e70ae8SEdward Tomasz Napierala targetaddress = [2001:db8::de:ef]:3260 19942e70ae8SEdward Tomasz Napierala targetname = iqn.1900.com.com:sn.123456 20042e70ae8SEdward Tomasz Napierala} 20142e70ae8SEdward Tomasz Napierala 202de29f585SEdward Tomasz Napieralachaptest { 203de29f585SEdward Tomasz Napierala targetaddress = 10.0.0.1; 204dfc58cbcSEdward Tomasz Napierala targetname = iqn.1900.com.com:sn.123456; 205dfc58cbcSEdward Tomasz Napierala initiatorname = iqn.2005-01.il.ac.huji.cs:nobody; 206dfc58cbcSEdward Tomasz Napierala authmethod = CHAP; 207dfc58cbcSEdward Tomasz Napierala chapiname = iqn.2005-01.il.ac.huji.cs:nobody; 208dfc58cbcSEdward Tomasz Napierala chapsecret = "secretsecret"; 209de29f585SEdward Tomasz Napierala} 210de29f585SEdward Tomasz Napierala.Ed 211de29f585SEdward Tomasz Napierala.Sh SEE ALSO 212914f6e62SJoel Dahl.Xr iscsictl 8 213de29f585SEdward Tomasz Napierala.\"Sh HISTORY 214de29f585SEdward Tomasz Napierala.\"Sh AUTHORS 215