ܼ

CetnOS 6ˤlldpdѤˡ

Ƴ

󥹥ȡ

  • ѥåƳ
    # yum install lldpad
    
    ==============================================================================================================================
     ѥå                      ƥ             С                         ݥȥ꡼              
    ==============================================================================================================================
    󥹥ȡ뤷Ƥޤ:
     lldpad                          x86_64                     0.9.46-3.el6_5                     base                     215 k
    ¸ϢǤΥ󥹥ȡ򤷤ޤ:
     libconfig                       x86_64                     1.3.2-1.1.el6                      base                      51 k
     lldpad-libs                     x86_64                     0.9.46-3.el6_5                     base                      28 k
  • ӥμưưꤹ
    # chkconfig lldpad on
    
    # chkconfig --list | grep lldp
    lldpad          0:off   1:off   2:on    3:on    4:on    5:on    6:off
  • ӥư
    # /etc/init.d/lldpad start
    lldpad ư:                                           [  OK  ]

  • 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 :                                           [  OK  ]
    lldpad ư:                                           [  OK  ]
  • ̤γǧ
    # 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_64 #1 SMP Wed Apr 22 06:48:29 UTC 2015 x86_64
    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

ꤹ륹ץ

   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: 2017-07-04 () 21:59:20 (143d)