CentOS6 LLDP使用方法
をテンプレートにして作成
[
トップ
] [
新規
|
一覧
|
検索
|
最終更新
|
ヘルプ
]
開始行:
目次~
#contents
*概要 [#s9a19d83]
CetnOS 6にてlldpdを使用する方法。
*導入手順 [#nb1aba49]
**インストール [#n5bcfeb2]
-パッケージ導入
# yum install lldpad
========================================================...
パッケージ アーキテクチャ ...
========================================================...
インストールしています:
lldpad x86_64 ...
依存性関連でのインストールをします。:
libconfig x86_64 ...
lldpad-libs x86_64 ...
-サービスの自動起動を設定する~
# chkconfig lldpad on
# chkconfig --list | grep lldp
lldpad 0:off 1:off 2:on 3:on 4:on ...
-サービスを起動する~
# /etc/init.d/lldpad start
lldpad を起動中: ...
**設定 [#x6df873d]
-eth0が返す値を設定
# lldptool set-lldp adminStatus=rxtx
adminStatus = rxtx
# lldptool -T -i eth0 -V sysName enableTx=yes
enableTx = yes
# lldptool -T -i eth0 -V portDesc enableTx=yes
enableTx = yes
# lldptool -T -i eth0 -V sysDesc enableTx=yes
enableTx = yes
# lldptool -T -i eth0 -V sysCap enableTx=yes
enableTx = yes
# lldptool -T -i eth0 -V mngAddr enableTx=yes
enableTx = yes
-設定の有効化
# /etc/init.d/lldpad restart
lldpad を停止中: ...
lldpad を起動中: ...
-設定結果の確認
# lldptool get-tlv -i eth0
Chassis ID TLV
MAC: 00:50:56:9e:57:5e
Port ID TLV
MAC: 00:50:56:9e:57:5e
Time to Live TLV
120
Port Description TLV
Interface 3 as eth0
System Name TLV
zabbix.asabiya.net
System Description TLV
Linux zabbix.asabiya.net 2.6.32-504.16.2.el6.x86_...
System Capabilities TLV
System capabilities: Station Only
Enabled capabilities: Station Only
Management Address TLV
IPv4: 192.168.xxx.xxx
Ifindex: 3
End of LLDPDU TLV
*Tips [#ud9b925b]
**一括設定するスクリプト [#zecd2699]
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
**取得結果 [#x35ec0f5]
# 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.e...
System Capabilities TLV
System capabilities: Router
Enabled capabilities: Router
Management Address TLV
IPv4: 192.168.1.245
Ifindex: 2
End of LLDPDU TLV
終了行:
目次~
#contents
*概要 [#s9a19d83]
CetnOS 6にてlldpdを使用する方法。
*導入手順 [#nb1aba49]
**インストール [#n5bcfeb2]
-パッケージ導入
# yum install lldpad
========================================================...
パッケージ アーキテクチャ ...
========================================================...
インストールしています:
lldpad x86_64 ...
依存性関連でのインストールをします。:
libconfig x86_64 ...
lldpad-libs x86_64 ...
-サービスの自動起動を設定する~
# chkconfig lldpad on
# chkconfig --list | grep lldp
lldpad 0:off 1:off 2:on 3:on 4:on ...
-サービスを起動する~
# /etc/init.d/lldpad start
lldpad を起動中: ...
**設定 [#x6df873d]
-eth0が返す値を設定
# lldptool set-lldp adminStatus=rxtx
adminStatus = rxtx
# lldptool -T -i eth0 -V sysName enableTx=yes
enableTx = yes
# lldptool -T -i eth0 -V portDesc enableTx=yes
enableTx = yes
# lldptool -T -i eth0 -V sysDesc enableTx=yes
enableTx = yes
# lldptool -T -i eth0 -V sysCap enableTx=yes
enableTx = yes
# lldptool -T -i eth0 -V mngAddr enableTx=yes
enableTx = yes
-設定の有効化
# /etc/init.d/lldpad restart
lldpad を停止中: ...
lldpad を起動中: ...
-設定結果の確認
# lldptool get-tlv -i eth0
Chassis ID TLV
MAC: 00:50:56:9e:57:5e
Port ID TLV
MAC: 00:50:56:9e:57:5e
Time to Live TLV
120
Port Description TLV
Interface 3 as eth0
System Name TLV
zabbix.asabiya.net
System Description TLV
Linux zabbix.asabiya.net 2.6.32-504.16.2.el6.x86_...
System Capabilities TLV
System capabilities: Station Only
Enabled capabilities: Station Only
Management Address TLV
IPv4: 192.168.xxx.xxx
Ifindex: 3
End of LLDPDU TLV
*Tips [#ud9b925b]
**一括設定するスクリプト [#zecd2699]
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
**取得結果 [#x35ec0f5]
# 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.e...
System Capabilities TLV
System capabilities: Router
Enabled capabilities: Router
Management Address TLV
IPv4: 192.168.1.245
Ifindex: 2
End of LLDPDU TLV
ページ名: