6.0

Table Of Contents
vSphere Command-Line Interface Concepts and Examples
82 VMware, Inc.
Enabling iSCSI Authentication
YoucanenableiSCSIauthenticationwithESXCLIorwithvicfg-iscsi.
Enabling iSCSI Authentication with ESXCLI
Theesxcli iscsi adapter authcommandsenableiSCSIauthentication.Mutualauthenticationis
supportedforsoftwareiSCSIanddependenthardwareiSCSI,butnotforindependenthardwareiSCSI(see
“SettingiSCSICHAPonpage 62).
1 (Optional)SettheauthenticationinformationforCHAP.
esxcli <conn_options> iscsi adapter auth chap set --direction=uni --chap_username=<name>
--chap_password=<pwd> --level=[prohibited, discouraged, preferred, required]
--secret=<string> --adapter=<adapter_name>
YoucansetpertargetCHAPforstatictargets,peradapterCHAP,orapplythecommandtothediscovery
address.
peradapterCHAP:esxcli iscsi adapter auth chap set
perdiscoveryCHAP:esxcli iscsi adapter discovery sendtarget auth chap set
pertargetCHAP:esxcli iscsi adapter target portal auth chap set
Forexample:
esxcli <conn_options> iscsi adapter auth chap set --direction=uni --chap_username=User1
--chap_password=MySpecialPwd --level=preferred --secret=uni_secret
--adapter=vmhba33
2 (Optional)SettheauthenticationinformationformutualCHAPbyrunningesxcli iscsi adapter
auth chap set againwiththe-doptionsettomutualoptionandadifferentauthenticationusername
andsecret.
esxcli <conn_options> iscsi adapter auth chap set --direction=mutual
--mchap_username=<m_name> --mchap_password=<m_pwd> --level=[prohibited,
required] --secret=<string> --adapter=<adapter_name>
For<level>,specifyprohibitedorrequired.
prohibitedThehostdoesnotuseCHAPauthentication.Ifauthenticationisenabled,specify
chapProhibitedtodisableit.
requiredThehostrequiressuccessfulCHAPauthentication.TheconnectionfailsifCHAP
negotiationfails.YoucansetthisvalueformutualCHAPonlyifCHAPissettochapRequired.
Fordirection,specifymutual.
To enable mutual authentication
1Enableauthentication.
esxcli <conn_options> iscsi adapter auth chap set --direction=uni --chap_username=<name>
--chap_password=<pw> --level=[prohibited, discouraged, preferred, required]
--secret=<string> --adapter=<adapter_name>
Thespecifiedchap_usernameandsecretmustbesupportedonthestorageside.
2ListpossibleVMkernelNICstobind.
esxcli <conn_options> iscsi logicalnetworkportal list
IMPORTANTYouareresponsibleformakingsurethatCHAPissetbeforeyousetmutualCHAP,andfor
usingcompatiblelevelsforCHAPandmutualCHAP.UseadifferentsecretinCHAPandmutualCHAP.