第31章 LLDP を使用したネットワーク設定の問題のデバッグ

Link Layer Discovery Protocol (LLDP) を使用して、トポロジー内のネットワーク設定の問題をデバッグできます。つまり、LLDP は、他のホストまたはルーターやスイッチとの設定の不整合を報告できます。

31.1. LLDP 情報を使用した誤った VLAN 設定のデバッグ

特定の VLAN を使用するようにスイッチポートを設定し、ホストがこれらの VLAN パケットを受信しない場合は、Link Layer Discovery Protocol (LLDP) を使用して問題をデバッグできます。パケットを受信しないホストでこの手順を実行します。

前提条件

  • nmstate パッケージがインストールされている。
  • スイッチは LLDP をサポートしています。
  • LLDP は隣接デバイスで有効になっています。

手順

  1. 次のコンテンツで ~/enable-LLDP-enp1s0.yml ファイルを作成します。

    interfaces:
      - name: enp1s0
        type: ethernet
        lldp:
          enabled: true
  2. ~/enable-LLDP-enp1s0.yml ファイルを使用して、インターフェイス enp1s0 で LLDP を有効にします。

    # nmstatectl apply ~/enable-LLDP-enp1s0.yml
  3. LLDP 情報を表示します。

    # nmstatectl show enp1s0
    - name: enp1s0
      type: ethernet
      state: up
      ipv4:
        enabled: false
        dhcp: false
      ipv6:
        enabled: false
        autoconf: false
        dhcp: false
      lldp:
        enabled: true
        neighbors:
        - - type: 5
            system-name: Summit300-48
          - type: 6
            system-description: Summit300-48 - Version 7.4e.1 (Build 5)
              05/27/05 04:53:11
          - type: 7
            system-capabilities:
            - MAC Bridge component
            - Router
          - type: 1
            _description: MAC address
            chassis-id: 00:01:30:F9:AD:A0
            chassis-id-type: 4
          - type: 2
            _description: Interface name
            port-id: 1/1
            port-id-type: 5
          - type: 127
            ieee-802-1-vlans:
            - name: v2-0488-03-0505
              vid: 488
            oui: 00:80:c2
            subtype: 3
          - type: 127
            ieee-802-3-mac-phy-conf:
              autoneg: true
              operational-mau-type: 16
              pmd-autoneg-cap: 27648
            oui: 00:12:0f
            subtype: 1
          - type: 127
            ieee-802-1-ppvids:
            - 0
            oui: 00:80:c2
            subtype: 2
          - type: 8
            management-addresses:
            - address: 00:01:30:F9:AD:A0
              address-subtype: MAC
              interface-number: 1001
              interface-number-subtype: 2
          - type: 127
            ieee-802-3-max-frame-size: 1522
            oui: 00:12:0f
            subtype: 4
      mac-address: 82:75:BE:6F:8C:7A
      mtu: 1500
  4. 出力を確認して、想定される設定と一致していることを確認します。たとえば、スイッチに接続されているインターフェイスの LLDP 情報は、このホストが接続されているスイッチポートが VLAN ID 448 を使用していることを示しています。

    - type: 127
            ieee-802-1-vlans:
            - name: v2-0488-03-0505
              vid: 488

    enp1s0 インターフェイスのネットワーク設定で異なる VLANID を使用している場合は、それに応じて変更してください。

関連情報

VLAN タグの設定