目次

概要

CetnOS 6にてlldpdを使用する方法。

導入手順

インストール

設定

Tips

一括設定するスクリプト

   for i in `ls /sys/class/net/ | grep eth` ;
         do echo "enabling lldp for interface: $i" ;
         lldptool set-lldp -i $i adminStatus=rxtx  ;
         lldptool -T -i $i -V  sysName enableTx=yes;
         lldptool -T -i $i -V  portDesc enableTx=yes ;
         lldptool -T -i $i -V  sysDesc enableTx=yes;
         lldptool -T -i $i -V sysCap enableTx=yes;
         lldptool -T -i $i -V mngAddr enableTx=yes;
   done

取得結果

# lldptool get-tlv -i eth0
Chassis ID TLV
       MAC: 00:10:18:c8:57:bc
Port ID TLV
       MAC: 00:10:18:c8:57:bc
Time to Live TLV
       120
Port Description TLV
       Interface   2 as eth0
System Name TLV
       kvm01.localnet.asaboya.net
System Description TLV
       Linux kvm01.localnet.asaboya.net 2.6.32-696.3.2.el6.x86_64 #1 SMP Tue Jun 20 01:26:55 UTC 2017 x86_64
System Capabilities TLV
       System capabilities:  Router
       Enabled capabilities: Router
Management Address TLV
       IPv4: 192.168.1.245
       Ifindex: 2
End of LLDPDU TLV

トップ   編集 凍結 差分 履歴 添付 複製 名前変更 リロード   新規 一覧 検索 最終更新   ヘルプ   最終更新のRSS
Last-modified: 2025-03-16 (日) 23:18:31