ܼ

Fedora 21ˤlldpdѤˡ
Raspberry PiƳλȤʤ뤿ᡢCPUƥARMȤʤ롣

Ƴ

󥹥ȡ

  • ѥåƳ
    # yum install lldpad
    
    ==============================================================================================================================
     Package                    Arch                     Version                                    Repository               Size
    ==============================================================================================================================
    Installing:
     lldpad                     armv7hl                  0.9.46-8.git48a5f38.fc21                   fedora                  239 k
    Installing for dependencies:
     libconfig                  armv7hl                  1.4.9-7.fc21                               fedora                   58 k
  • ӥμưưꤹ
    # systemctl enable lldpad.service
    
    Created symlink from /etc/systemd/system/multi-user.target.wants/lldpad.service to /usr/lib/systemd/system/lldpad.service.
    Created symlink from /etc/systemd/system/sockets.target.wants/lldpad.socket to /usr/lib/systemd/system/lldpad.socket.
  • ӥư
    # systemctl start lldpad
  • ư
    # systemctl status lldpad.service
     lldpad.service - Link Layer Discovery Protocol Agent Daemon.
      Loaded: loaded (/usr/lib/systemd/system/lldpad.service; enabled)
      Active: active (running) since Thu 2016-10-06 23:10:25 JST; 4min 44s ago
    Main PID: 19571 (lldpad)
      CGroup: /system.slice/lldpad.service
              19571 /usr/sbin/lldpad -t
    
    Oct 06 23:10:25 hw-mon02.localnet.asabiya.net systemd[1]: Started Link Layer Discovery Protocol Agent Daemon..

  • eth0֤ͤ
    for i in `ls /sys/class/net/ | grep 'eth\|ens\|eno'`;
    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
  • eth0Υɥ쥹
    lldptool -T -i eth0 -V mngAddr ipv4=[IPADDR]

    ¹
    # lldptool -T -i eth0 -V mngAddr ipv4=192.168.1.10
    ipv4 = 192.168.1.10
  • ͭ
    # systemctl restart lldpad.service
  • ̤γǧ
    # lldptool get-tlv -i eth0
    Chassis ID TLV
           MAC: b8:27:eb:39:f8:13
    Port ID TLV
           MAC: b8:27:eb:39:f8:13
    Time to Live TLV
           120
    Port Description TLV
           Interface   2 as eth0
    System Name TLV
           hw-mon02.localnet.asabiya.net
    System Description TLV
           Linux hw-mon02.localnet.asabiya.net 3.18.13-501.20150510gitf36e19f.sc20.armv7hl.bcm2709 #1 SMP PREEMPT Sun May 10 13:50:02 BST 2015 armv7l
    System Capabilities TLV
           System capabilities:  Station Only
           Enabled capabilities: Station Only
    Management Address TLV
           IPv4: 192.168.xxx.xxx
           Ifindex: 2
    End of LLDPDU TLV

ȥå   Խ ʬ ʎގ̎ ź ʣ ̾ѹ   ǽ   إ   ǽRSS
Last-modified: 2017-05-07 () 23:40:56 (135d)