xref: /freebsd/usr.bin/iscsictl/iscsi.conf.5 (revision 06c3fb27)
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.Dd February 25, 2022
26.Dt ISCSI.CONF 5
27.Os
28.Sh NAME
29.Nm iscsi.conf
30.Nd iSCSI initiator configuration file
31.Sh DESCRIPTION
32The
33.Nm
34configuration file is used by the
35.Xr iscsictl 8
36utility.
37The general syntax is:
38.Bf Li
39.Bd -literal
40	# this is a comment
41	nickname_1 {
42	   variable = value;
43	   ...
44	}
45	nickname_2 {
46	   variable = value;
47	   ...
48	}
49	...
50.Ed
51.Ef
52.Bl -tag -width MaxConnections
53.It Cm AuthMethod
54Sets the authentication type.
55Type can be either
56.Qq Ar None ,
57or
58.Qq Ar CHAP .
59Default is
60.Qq Ar None .
61When set to
62.Cm CHAP ,
63both
64.Cm chapIName
65and
66.Cm chapSecret
67must be defined.
68.It Cm chapIName
69Login for CHAP authentication.
70.It Cm chapSecret
71Secret for CHAP authentication.
72.It Cm tgtChapName
73Target login for Mutual CHAP authentication.
74.It Cm tgtChapSecret
75Target secret for Mutual CHAP authentication.
76.It Cm HeaderDigest
77Sets the header digest; a checksum calculated over the header of iSCSI
78PDUs, and verified on receive.
79Digest can be either
80.Qq Ar None ,
81or
82.Qq Ar CRC32C .
83Default is
84.Qq Ar None .
85.It Cm DataDigest
86Sets the data digest; a checksum calculated over the Data Section of iSCSI
87PDUs, and verified on receive.
88Digest can be either
89.Qq Ar None ,
90or
91.Qq Ar CRC32C .
92Default is
93.Qq Ar None .
94.It Cm InitiatorName
95Sets the initiator name.
96By default, the name is concatenation of
97.Qq Ar iqn.1994-09.org.freebsd:
98with the hostname.
99.It Cm TargetName
100Sets the target name.
101Not required for discovery sessions.
102.It Cm TargetAddress
103Sets the target address and port, in
104.Sy address[:port]
105format.
106The
107.Sy address
108can be either an IP address, or hostname.
109The optional port defaults to 3260.
110.It Cm SessionType
111Sets the session type.
112Type can be either
113.Qq Ar Discovery ,
114or
115.Qq Ar Normal .
116Default is
117.Qq Ar Normal .
118For normal sessions, the
119.Sy TargetName
120must be defined.
121Discovery sessions result in the initiator connecting to all the targets
122returned by SendTargets iSCSI discovery with the defined
123.Sy TargetAddress .
124.It Cm Enable
125Enable or disable the session.
126State can be either
127.Qq Ar On ,
128or
129.Qq Ar Off .
130Default is
131.Qq Ar On .
132.It Cm Offload
133Name of selected iSCSI hardware offload driver.
134Default is
135.Qq Ar None .
136.It Cm Protocol
137Name of selected protocol.
138It can be either
139.Qq Ar iSER ,
140for iSCSI over RDMA, or
141.Qq Ar iSCSI .
142Default is
143.Qq Ar iSCSI .
144.It Cm dscp
145The DiffServ Codepoint used for sending data.
146The DSCP can be set to numeric, or hexadecimal values directly,
147as well as the well-defined
148.Qq Ar cs<n>
149and
150.Qq Ar af<xx>
151codepoints.
152Default is no specified dscp codepoint, which means the default
153of the outgoing interface is used.
154.It Cm pcp
155The 802.1Q Priority CodePoint used for sending packets.
156The PCP can be set to a value in the range between
157.Qq Ar 0
158to
159.Qq Ar 7 .
160When omitted, the default for the outgoing interface is used.
161.It Cm PingTimeout
162Specify the time in seconds to wait between pings (SCSI NOP), and
163for a ping response before declaring the session as dead and
164attempting a re-establishment.
165If this entry is not present in the conf file, the default value
166configured using
167.Qq Ar kern.iscsi.ping_timeout
168(default at
169.Qq Ar 5
170seconds) is taken by the driver.
171If present, the PingTimeout can be set to any positive value
172starting with
173.Qq Ar 1 .
174.It Cm LoginTimeout
175Specify the time in seconds to wait for a login PDU to be sent or
176received after trying to establish a new session.
177When no login PDU is received within this time, the login on a
178particular connection fails and a new reconnection attempt is made.
179If this entry is not present in the conf file, the default value of
180.Qq Ar 60
181seconds is used, as configured by
182.Qq Ar kern.iscsi.login_timeout .
183The LoginTimeout can be set to any positive value starting with
184.Qq Ar 1 .
185.El
186.Sh FILES
187.Bl -tag -width indent
188.It Pa /etc/iscsi.conf
189.El
190.Sh EXAMPLES
191.Bd -literal
192myiscsi { # nickname
193   targetaddress = iscsi1
194   targetname    = iqn.1900.com.com:sn.123456
195}
196
197myiscsi6 { # nickname
198   targetaddress = [2001:db8::de:ef]:3260
199   targetname    = iqn.1900.com.com:sn.123456
200}
201
202chaptest {
203   targetaddress = 10.0.0.1;
204   targetname    = iqn.1900.com.com:sn.123456;
205   initiatorname = iqn.2005-01.il.ac.huji.cs:nobody;
206   authmethod    = CHAP;
207   chapiname     = iqn.2005-01.il.ac.huji.cs:nobody;
208   chapsecret    = "secretsecret";
209}
210.Ed
211.Sh SEE ALSO
212.Xr iscsictl 8
213.\"Sh HISTORY
214.\"Sh AUTHORS
215