设置 AIX 主机的认证

可以遵循某些准则和任务,正确设置 AIX 主机以在系统上进行认证。

虽然系统支持 iSCSI 的单向认证和双向认证,但是 AIX 软件启动器当前只支持单向认证。 系统目标认证发起方。

CHAP 设置在主机上的 /etc/iscsi/targets 文件中定义。 AIX 启动器或主机总线适配器 (HBA) 始终将其 iSCSI 限定名 (IQN) 用作 CHAP 用户名。

要在 AIX 主机上设置认证,请完成以下步骤:

  1. 使用任何编辑器打开 /etc/iscsi/targets 文件。
  2. 对于包含目标定义的每行,均在一对引号中附加启动器的 CHAP 秘密:
    192.168.1.7      3260     iqn.1986-03.com.ibm:2145.sahyadri.node1 "secret"

    您在此设置的 CHAP 密码值必须与在系统上为与此主机关联的主机对象配置的值相匹配。 因为系统对每个启动器都进行认证,所以此 CHAP 密码对于特定集群系统上的所有目标均相同。

    AIX 主机的 CHAP 设置 中显示了 /etc/iscsi/targets 文件的示例。
    Figure 1. AIX 主机的 CHAP 设置
    #ChapSecret             = %x22*( any character ) %x22
    #                       ;   "                      "
    #                       ; ChapSecret is a string enclosed in double quotes. The
    #                       ; quotes are required, but are not part of the secret.
    #
    #EXAMPLE 1: iSCSI Target without CHAP(MD5) authentication
    #      Assume the target is at address 192.168.3.2,
    #      the valid port is 5003
    #      the name of the target is iqn.com.ibm-4125-23WTT26
    #The target line would look like:
    #192.168.3.2 5003 iqn.com.ibm-4125-23WWT26
    #
    #EXAMPLE 2: iSCSI Target with CHAP(MD5) authentication
    #      Assume the target is at address 10.2.1.105,
    #      the valid port is 3260
    #      the name of the target is iqn.com.ibm-K167-42.fc1a
    #      the CHAP secret is "This is my password."
    #The target line would look like:
    #10.2.1.105 3260 iqn.com.ibm-K167-42.fc1a "This is my password."
    #
    #EXAMPLE 3: iSCSI Target with CHAP(MD5) authentication and line continuation
    #      Assume the target is at address 10.2.1.106,
    #      the valid port is 3260
    #      the name of the target is iqn.com.ibm:00.fcd0ab21.shark128
    #      the CHAP secret is "123ismysecretpassword.fc1b"
    #The target line would look like:
    #10.2.1.105 3260 iqn.2003-01.com.ibm:00.fcd0ab21.shark128
    
    
    192.168.1.41 3260 iqn.1986-03.com.ibm:2145.pahar.dvt110702
    192.168.2.43 3260 iqn.1986-03.com.ibm:2145.moscow.dvt110706 "svcchapsecret"

    先前示例中的两个目标是不同 集群系统的成员。 一个目标配置为认证启动器,而另一个目标没有配置为认证启动器。

    目标 iqn.1986-03.com.ibm:2076.pahar.dvt110702 没有配置为进行认证;因此 CHAP 密码字段为空白。 目标 iqn.1986-03.com.ibm:2076.moscow.dvt110706 配置为进行认证;因此 CHAP 密码字段设置为 svcchapsecret 以进行认证。