Giter VIP home page Giter VIP logo

go-lldpd's Introduction

go-lldpd

go-lldpd is a lldpd server written in go which sends machineUUID and installation timestamp of a bare metal server to connected switches. It is configured from a yaml file /etc/metal/install.yaml:

---
machineuuid: 3be6c846-57de-432a-b50e-61c6c559b6bb
timestamp: 2006-01-02T15:04:05Z07:00

The config file location cannot be modified. go-lldpd also expects 2 distinct uplinks to the switch, otherwise it will die.

Example systemd service is also bundled.

go-lldpd's People

Contributors

chbmuc avatar gerrit91 avatar majst01 avatar mwindower avatar robertvolkmann avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

go-lldpd's Issues

Send "Planned Reboot" event in case of shutdown

actually we send provisioned since:timestamp in the SysDescription. It should change to shutdown at:timestamp in case the go-lldpd systemd service received a shutdown event. Metal-Core should then send a "Planned Reboot" event instead a "Phoned Home" event to metal-api. This enables us to detect the machine state more granular.

Downside: Existing machines will not this update, we can probably do this from metal-core ?

Support dcbx messages

Currently we send vanilla lldp messages, these messages do not appear on the switch in case the network card is a DCB capable one, like Intel Series 800

16:49:23.856438 LLDP, length 106
        Chassis ID TLV (1), length 7
          Subtype MAC address (4): b4:96:91:af:72:c0 (oui Unknown)
          0x0000:  04b4 9691 af72 c0
        Port ID TLV (2), length 5
          Subtype Interface Name (5): lan0
          0x0000:  056c 616e 30
        Time to Live TLV (3), length 2: TTL 4s
          0x0000:  0004
        Port Description TLV (4), length 4: lan0
          0x0000:  6c61 6e30
        System Name TLV (5), length 36: 00000000-0000-0000-0000-3cecef18aea0
          0x0000:  3030 3030 3030 3030 2d30 3030 302d 3030
          0x0010:  3030 2d30 3030 302d 3363 6563 6566 3138
          0x0020:  6165 6130
        System Description TLV (6), length 38
          provisioned since 2021-03-24T15:35:45Z
          0x0000:  7072 6f76 6973 696f 6e65 6420 7369 6e63
          0x0010:  6520 3230 3231 2d30 332d 3234 5431 353a
          0x0020:  3335 3a34 355a
        End TLV (0), length 0

But on DCB capable network interfaces a DCBX compatible message must be sent, example tcpdump taken from lldpad running which is visible on the switch side:

16:54:51.318712 LLDP, length 59
        Chassis ID TLV (1), length 7
          Subtype MAC address (4): b4:96:91:af:72:c0 (oui Unknown)
          0x0000:  04b4 9691 af72 c0
        Port ID TLV (2), length 7
          Subtype MAC address (3): b4:96:91:af:72:c0 (oui Unknown)
          0x0000:  03b4 9691 af72 c0
        Time to Live TLV (3), length 2: TTL 120s
          0x0000:  0078
        Organization specific TLV (127), length 25: OUI Ethernet bridged (0x0080c2)
          ETS Configuration Subtype (9)
            Willing:1, CBS:2, RES:0, Max TCs:0
            Priority Assignment Table
             Priority : 0   1   2   3   4   5   6   7
             Value    : 0   0   0   0   0   0   0   0
            TC Bandwidth Table
             TC%   : 0   1   2   3   4   5   6   7
             Value : 0   0   0   0   0   0   0   0
            TSA Assignment Table
             Traffic Class: 0   1   2   3   4   5   6   7
             Value        : 0   0   0   0   0   0   0   0
          0x0000:  0080 c209 8000 0000 0000 0000 0000 0000
          0x0010:  0000 0000 0000 0000 00
        Organization specific TLV (127), length 6: OUI Ethernet bridged (0x0080c2)
          Priority Flow Control Configuration Subtype (11)
            Willing: 1, MBC: 0, RES: 0, PFC cap:8
            PFC Enable
             Priority : 0  1  2  3  4  5  6  7
             Value    : 0  0  0  0  0  0  0  0
          0x0000:  0080 c20b 8800
        End TLV (0), length 0

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.