日本語フォーラム

 View Only

[CX-Switch] インターフェーステンプレート機能で効率良く設定しよう

This thread has been viewed 11 times
  • 1.  [CX-Switch] インターフェーステンプレート機能で効率良く設定しよう

    Posted Dec 09, 2025 12:15 AM
    Edited by namishingo Dec 09, 2025 01:12 AM

    HPE Aruba Networking CXスイッチでは複数のインターフェースに同じ設定を行っていくため、インターフェーステンプレート (Interface Persona)機能があります。実際に使ってみる例を紹介します。

    【設定方法】

    1. インターフェーステンプレートを作成します。
      6300(config)# interface persona downlink-ports
    2. テンプレートの中身を設定します。勿論後で変更することも可能です。ここではVLANの設定、802.1X認証とMAC認証の有効化の設定を行っています。
      6300(config-if)# vlan access 100
      6300(config-if)# aaa authentication port-access client-limit 256
      6300(config-if)# aaa authentication port-access dot1x authenticator
      6300(config-if-dot1x-auth)# enable
      6300(config-if-dot1x-auth)# exit
      6300(config-if)# aaa authentication port-access mac-auth
      6300(config-if-macauth)# enable
    3. running-configを確認するとこんな感じになります。
      6300(config-if)# show run cu
      interface persona downlink-ports
          shutdown
          no routing
          vlan access 100
          aaa authentication port-access client-limit 256
          aaa authentication port-access dot1x authenticator
              enable
          aaa authentication port-access mac-auth
              enable
          exit
    4. 適用するインターフェースにテンプレートをアタッチします。ここでは、1/1/5と1/1/6のインターフェースに作成したテンプレートをアタッチしています。
      6300(config)# interface 1/1/5-1/1/6
      6300(config-if-<1/1/5-1/1/6>)# persona custom downlink-ports attach
    5. テンプレートをアタッチしたインターフェースのrunning-configを確認してみましょう。
      6300(config-if-<1/1/5-1/1/6>)# show run cu
      interface 1/1/5
          no shutdown
          persona custom downlink-ports attach
          no routing
          vlan access 100
          aaa authentication port-access client-limit 256
          port-access allow-flood-traffic enable
          aaa authentication port-access dot1x authenticator
              enable
          aaa authentication port-access mac-auth
              enable
          exit
      interface 1/1/6
          no shutdown
          persona custom downlink-ports attach
          no routing
          vlan access 100
          aaa authentication port-access client-limit 256
          port-access allow-flood-traffic enable
          aaa authentication port-access dot1x authenticator
              enable
          aaa authentication port-access mac-auth
              enable
          exit
      テンプレートで設定した内容が反映されていることが分かります。

    【設定を変更した場合は?】

    設定を変更するときもテンプレートの設定を変更するだけです。例えばVLANの設定を変更してみましょう。

    1. テンプレートでVLANの設定を変更します。
      6300(config)# interface persona downlink-ports
      6300(config-if)# vlan access 200
    2. 1/1/5と1/1/6インターフェースのrunning-configを確認します。
      6300(config)# interface 1/1/5-1/1/6
      6300(config-if-<1/1/5-1/1/6>)# show run cu
      interface 1/1/5
          no shutdown
          persona custom downlink-ports attach
          no routing
          vlan access 200
          aaa authentication port-access client-limit 256
          port-access allow-flood-traffic enable
          aaa authentication port-access dot1x authenticator
              enable
          aaa authentication port-access mac-auth
              enable
          exit
      interface 1/1/6
          no shutdown
          persona custom downlink-ports attach
          no routing
          vlan access 200
          aaa authentication port-access client-limit 256
          port-access allow-flood-traffic enable
          aaa authentication port-access dot1x authenticator
              enable
          aaa authentication port-access mac-auth
              enable
          exit
      VLANの設定がVLAN100からVLAN200に変わっていることが確認できます。

    【Tips】

    • インターフェースにテンプレートを設定する際、attach または copy を選択することができます。
      6300(config)# interface 1/1/7
      6300(config-if)# persona custom downlink-ports
        attach  Attach this interface to the persona interface of the same name
        copy    Copy settings from the persona interface of the same name
        <cr>
      atattchはインターフェーステンプレートの内容が変更されると連動して反映されるモードです。copyは実行した時点のインターフェーステンプレートの設定をコピーするモードとなりますので、テンプレートの内容が変更されても連動して反映されません。

    • テンプレートをattachで適用しているインターフェースで設定を個別に変更することは可能です。ただし、テンプレートの設定において、同じ項目の設定が変更された場合、その設定で上書きされます。
      <例1>
      下記のような設定となっているとします。
      interface 1/1/5
          no shutdown
          persona custom downlink-ports attach
          no routing
          vlan access 200
          aaa authentication port-access client-limit 256
          port-access allow-flood-traffic enable
          aaa authentication port-access dot1x authenticator
              enable
          aaa authentication port-access mac-auth
              enable
      
      interface persona downlink-ports
          no shutdown
          no routing
          vlan access 200
          aaa authentication port-access client-limit 256
          port-access allow-flood-traffic enable
          aaa authentication port-access dot1x authenticator
              enable
          aaa authentication port-access mac-auth
              enable

      1/1/5において、VLANの設定を変更します。
      6300(config)# interface 1/1/5
      6300(config-if)# vlan access 100

      running-configを確認すると、個別に変更できていることが分かります。
      interface 1/1/5
          no shutdown
          persona custom downlink-ports attach
          no routing
          vlan access 100
          aaa authentication port-access client-limit 256
          port-access allow-flood-traffic enable
          aaa authentication port-access dot1x authenticator
              enable
          aaa authentication port-access mac-auth
              enable
      
      interface persona downlink-ports
          no shutdown
          no routing
          vlan access 200
          aaa authentication port-access client-limit 256
          port-access allow-flood-traffic enable
          aaa authentication port-access dot1x authenticator
              enable
          aaa authentication port-access mac-auth
              enable

      テンプレートでVLANの設定を変更します。
      6300(config)# interface persona downlink-ports
      6300(config-if)# vlan access 1

      running-configを確認すると、1/1/5の設定にも反映されていることが分かります。
      interface 1/1/5
          no shutdown
          persona custom downlink-ports attach
          no routing
          vlan access 1
          aaa authentication port-access client-limit 256
          port-access allow-flood-traffic enable
          aaa authentication port-access dot1x authenticator
              enable
          aaa authentication port-access mac-auth
              enable
      
      interface persona downlink-ports
          no shutdown
          no routing
          vlan access 1
          aaa authentication port-access client-limit 256
          port-access allow-flood-traffic enable
          aaa authentication port-access dot1x authenticator
              enable
          aaa authentication port-access mac-auth
              enable


      <例2>
      下記のような設定になっているとします。

      interface 1/1/5
          no shutdown
          persona custom downlink-ports attach
          no routing
          vlan access 200
          aaa authentication port-access client-limit 256
          port-access allow-flood-traffic enable
          aaa authentication port-access dot1x authenticator
              enable
          aaa authentication port-access mac-auth
              enable
      
      interface persona downlink-ports
          no shutdown
          no routing
          vlan access 200
          aaa authentication port-access client-limit 256
          port-access allow-flood-traffic enable
          aaa authentication port-access dot1x authenticator
              enable
          aaa authentication port-access mac-auth
              enable


      1/1/5でMAC認証の設定を削除します。

      6300(config)# interface 1/1/5
      6300(config-if)# no aaa authentication port-access mac-auth enable


      running-configを確認すると、個別に変更できていることが分かります。

      interface 1/1/5
          no shutdown
          persona custom downlink-ports attach
          no routing
          vlan access 200
          aaa authentication port-access client-limit 256
          port-access allow-flood-traffic enable
          aaa authentication port-access dot1x authenticator
              enable
      
      interface persona downlink-ports
          no shutdown
          no routing
          vlan access 200
          aaa authentication port-access client-limit 256
          port-access allow-flood-traffic enable
          aaa authentication port-access dot1x authenticator
              enable
          aaa authentication port-access mac-auth
              enable
      


      テンプレートで1/1/5において削除したMAC認証以外の設定を変更してみます。

      6300(config)# interface persona downlink-ports
      6300(config-if)# vlan access 1


      running-configを確認してみます。VLANの設定は連動して反映されていますが、個別で削除した設定は戻りません。

      interface 1/1/5
          no shutdown
          persona custom downlink-ports attach
          no routing
          vlan access 1
          aaa authentication port-access client-limit 256
          port-access allow-flood-traffic enable
          aaa authentication port-access dot1x authenticator
              enable
      
      interface persona downlink-ports
          no shutdown
          no routing
          vlan access 1
          aaa authentication port-access client-limit 256
          port-access allow-flood-traffic enable
          aaa authentication port-access dot1x authenticator
              enable
          aaa authentication port-access mac-auth
              enable


      インターフェーステンプレートで該当箇所の設定を削除して、再度設定してみます。

      6300(config)# interface persona downlink-ports
      6300(config-if)# no aaa authentication port-access mac-auth enable
      6300(config-if)# aaa authentication port-access mac-auth enable


      再度1/1/5にもMAC認証の設定が反映されました。

      interface 1/1/5
          no shutdown
          persona custom downlink-ports attach
          no routing
          vlan access 1
          aaa authentication port-access client-limit 256
          port-access allow-flood-traffic enable
          aaa authentication port-access dot1x authenticator
              enable
          aaa authentication port-access mac-auth
              enable
      
      interface persona downlink-ports
          no shutdown
          no routing
          vlan access 1
          aaa authentication port-access client-limit 256
          port-access allow-flood-traffic enable
          aaa authentication port-access dot1x authenticator
              enable
          aaa authentication port-access mac-auth
              enable


    ------------------------------
    Shingo Namitoko
    HPE Networking Employee
    ------------------------------