xref: /freebsd/usr.bin/iscsictl/iscsi.conf.5 (revision 3e8eb5c7f4909209c042403ddee340b2ee7003a5)
1.\" Copyright (c) 2007-2010 Daniel Braniss <danny@cs.huji.ac.il>
2.\" All rights reserved.
3.\"
4.\" Redistribution and use in source and binary forms, with or without
5.\" modification, are permitted provided that the following conditions
6.\" are met:
7.\" 1. Redistributions of source code must retain the above copyright
8.\"    notice, this list of conditions and the following disclaimer.
9.\" 2. Redistributions in binary form must reproduce the above copyright
10.\"    notice, this list of conditions and the following disclaimer in the
11.\"    documentation and/or other materials provided with the distribution.
12.\"
13.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
14.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
15.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
16.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
17.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
18.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
19.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
20.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
21.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
22.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
23.\" SUCH DAMAGE.
24.\"
25.\" $FreeBSD$
26.\"
27.Dd February 25, 2022
28.Dt ISCSI.CONF 5
29.Os
30.Sh NAME
31.Nm iscsi.conf
32.Nd iSCSI initiator configuration file
33.Sh DESCRIPTION
34The
35.Nm
36configuration file is used by the
37.Xr iscsictl 8
38utility.
39The general syntax is:
40.Bf Li
41.Bd -literal
42	# this is a comment
43	nickname_1 {
44	   variable = value;
45	   ...
46	}
47	nickname_2 {
48	   variable = value;
49	   ...
50	}
51	...
52.Ed
53.Ef
54.Bl -tag -width MaxConnections
55.It Cm AuthMethod
56Sets the authentication type.
57Type can be either
58.Qq Ar None ,
59or
60.Qq Ar CHAP .
61Default is
62.Qq Ar None .
63When set to
64.Cm CHAP ,
65both
66.Cm chapIName
67and
68.Cm chapSecret
69must be defined.
70.It Cm chapIName
71Login for CHAP authentication.
72.It Cm chapSecret
73Secret for CHAP authentication.
74.It Cm tgtChapName
75Target login for Mutual CHAP authentication.
76.It Cm tgtChapSecret
77Target secret for Mutual CHAP authentication.
78.It Cm HeaderDigest
79Sets the header digest; a checksum calculated over the header of iSCSI
80PDUs, and verified on receive.
81Digest can be either
82.Qq Ar None ,
83or
84.Qq Ar CRC32C .
85Default is
86.Qq Ar None .
87.It Cm DataDigest
88Sets the data digest; a checksum calculated over the Data Section of iSCSI
89PDUs, and verified on receive.
90Digest can be either
91.Qq Ar None ,
92or
93.Qq Ar CRC32C .
94Default is
95.Qq Ar None .
96.It Cm InitiatorName
97Sets the initiator name.
98By default, the name is concatenation of
99.Qq Ar iqn.1994-09.org.freebsd:
100with the hostname.
101.It Cm TargetName
102Sets the target name.
103Not required for discovery sessions.
104.It Cm TargetAddress
105Sets the target address and port, in
106.Sy address[:port]
107format.
108The
109.Sy address
110can be either an IP address, or hostname.
111The optional port defaults to 3260.
112.It Cm SessionType
113Sets the session type.
114Type can be either
115.Qq Ar Discovery ,
116or
117.Qq Ar Normal .
118Default is
119.Qq Ar Normal .
120For normal sessions, the
121.Sy TargetName
122must be defined.
123Discovery sessions result in the initiator connecting to all the targets
124returned by SendTargets iSCSI discovery with the defined
125.Sy TargetAddress .
126.It Cm Enable
127Enable or disable the session.
128State can be either
129.Qq Ar On ,
130or
131.Qq Ar Off .
132Default is
133.Qq Ar On .
134.It Cm Offload
135Name of selected iSCSI hardware offload driver.
136Default is
137.Qq Ar None .
138.It Cm Protocol
139Name of selected protocol.
140It can be either
141.Qq Ar iSER ,
142for iSCSI over RDMA, or
143.Qq Ar iSCSI .
144Default is
145.Qq Ar iSCSI .
146.It Cm dscp
147The DiffServ Codepoint used for sending data.
148The DSCP can be set to numeric, or hexadecimal values directly,
149as well as the well-defined
150.Qq Ar cs<n>
151and
152.Qq Ar af<xx>
153codepoints.
154Default is no specified dscp codepoint, which means the default
155of the outgoing interface is used.
156.It Cm pcp
157The 802.1Q Priority CodePoint used for sending packets.
158The PCP can be set to a value in the range between
159.Qq Ar 0
160to
161.Qq Ar 7 .
162When omitted, the default for the outgoing interface is used.
163.It Cm PingTimeout
164Specify the time in seconds to wait between pings (SCSI NOP), and
165for a ping response before declaring the session as dead and
166attempting a re-establishment.
167If this entry is not present in the conf file, the default value
168configured using
169.Qq Ar kern.iscsi.ping_timeout
170(default at
171.Qq Ar 5
172seconds) is taken by the driver.
173If present, the PingTimeout can be set to any positive value
174starting with
175.Qq Ar 1 .
176.It Cm LoginTimeout
177Specify the time in seconds to wait for a login PDU to be sent or
178received after trying to establish a new session.
179When no login PDU is received within this time, the login on a
180particular connection fails and a new reconnection attempt is made.
181If this entry is not present in the conf file, the default value of
182.Qq Ar 60
183seconds is used, as configured by
184.Qq Ar kern.iscsi.login_timeout .
185The LoginTimeout can be set to any positive value starting with
186.Qq Ar 1 .
187.El
188.Sh FILES
189.Bl -tag -width indent
190.It Pa /etc/iscsi.conf
191.El
192.Sh EXAMPLES
193.Bd -literal
194myiscsi { # nickname
195   targetaddress = iscsi1
196   targetname    = iqn.1900.com.com:sn.123456
197}
198
199myiscsi6 { # nickname
200   targetaddress = [2001:db8::de:ef]:3260
201   targetname    = iqn.1900.com.com:sn.123456
202}
203
204chaptest {
205   targetaddress = 10.0.0.1;
206   targetname    = iqn.1900.com.com:sn.123456;
207   initiatorname = iqn.2005-01.il.ac.huji.cs:nobody;
208   authmethod    = CHAP;
209   chapiname     = iqn.2005-01.il.ac.huji.cs:nobody;
210   chapsecret    = "secretsecret";
211}
212.Ed
213.Sh SEE ALSO
214.Xr iscsictl 8
215.\"Sh HISTORY
216.\"Sh AUTHORS
217