Usage

lldpd comes with two parts: a daemon (lldpd) sending and receiving LLDP advertisements and a client (lldpcli) to query and configure the daemon. Both parts are documented in their manual pages:

lldpd.8

Here is the manual page for lldpd (version 1.0.18):

NAME lldpd — LLDP daemon SYNOPSIS lldpd [-dxcseiklrv] [-D debug] [-p pidfile] [-S description] [-P platform] [-X socket] [-m management] [-u file] [-I interfaces] [-C interfaces] [-M class] [-H hide] [-L lldpcli] [-O configfile] DESCRIPTION lldpd is a daemon able to receive and send LLDP frames. The Link Layer Discovery Protocol is a vendor-neutral Layer 2 protocol that allows a network device to advertise its identity and capabilities on the local network. lldpd also implements an SNMP subagent using AgentX protocol to in- terface to a regular SNMP agent like Net-SNMP. To enable this sub- agent, you need something like that in your snmpd.conf(5): master agentx This daemon implements both reception and sending. It will collect various information to send LLDP frames to all Ethernet interfaces, including management address, speed and VLAN names. The options are as follows: -d Do not daemonize. If this option is specified, lldpd will run in the foreground. When specified one more time, lldpd will not log to syslog but only to stderr. Then, this option can be specified many times to increase verbosity. When spec- ified four times, debug logs will be enabled. They can be filtered with -D flag. -D debug This option allows the user to filter out debugging informa- tion by specifying allowed tokens. This option can be re- peated several times to allow several tokens. This option must be combined with the -d flag to have some effect. Only debugging logs can be filtered. Here is a list of allowed to- kens with their description: main Main daemon. interfaces Discovery of local interfaces. lldp LLDP PDU encoding/decoding. edp EDP PDU encoding/decoding. cdp CDP/FDP PDU encoding/decoding. sonmp SONMP PDU encoding/decoding. event Events management. libevent Events management but for logs generated by libevent. privsep Privilege separation. localchassis Retrieval of information related to the local chassis. rpc Client communication. control Management of the Unix control socket. snmp SNMP subagent. libsnmp SNMP subagent but for logs generated by Net- SNMP. decode Generic PDU decoding. marshal Low-level serialization mechanisms. alloc Low-level allocation mechanisms. send Sending PDU to some interface. receive Receiving PDU from some interface. loop Main loop. smartfilter Smart filtering of different protocols on the same port. netlink Netlink subsystem. -p pidfile Use the provided PID file to record lldpd PID instead of @LLDPD_PID_FILE@. -k Disable advertising of kernel release, version and machine. Kernel name (ie: Linux) will still be shared, and Inventory software version will be set to 'Unknown'. -S description Override system description with the provided description. The default description is the kernel name, the node name, the kernel version, the build date and the architecture (ex- cept if you use the -k flag described above). -P platform Override the CDP platform name with the provided value. The default description is the kernel name (Linux). -x Enable SNMP subagent. With this option, lldpd will enable an SNMP subagent using AgentX protocol. This allows you to get information about local system and remote systems through SNMP. -X socket Enable SNMP subagent using the specified socket. lldpd will enable an SNMP subagent using AgentX protocol for the given socket. This option implies the previous one. The default socket is usually /var/agentx/master. You can specify a socket like tcp:127.0.0.1:705 for example. Since the process that will open this socket is enclosed in a chroot, you need to specify an IP address (not a hostname) when using a TCP or UDP socket. -c Enable the support of CDP protocol to deal with Cisco routers that do not speak LLDP. If repeated, CDPv1 packets will be sent even when there is no CDP peer detected. If repeated once again, CDPv2 packets will be sent even when there is no CDP peer detected. If repeated once again (i.e. -cccc), CDPv1 will be disabled and CDPv2 will be enabled. If repeated once again (i.e. -ccccc), CDPv1 will be disabled and CDPv2 will be forced. -f Enable the support of FDP protocol to deal with Foundry routers that do not speak LLDP. If repeated, FDP packets will be sent even when there is no FDP peer detected. -s Enable the support of SONMP protocol to deal with Nortel routers and switches that do not speak LLDP. If repeated, SONMP packets will be sent even when there is no SONMP peer detected. -e Enable the support of EDP protocol to deal with Extreme routers and switches that do not speak LLDP. If repeated, EDP packets will be sent even when there is no EDP peer detected. -l Force to send LLDP packets even when there is no LLDP peer detected but there is a peer speaking another protocol de- tected. By default, LLDP packets are sent when there is a peer speaking LLDP detected or when there is no peer at all. If repeated, LLDP is disabled. -r Receive-only mode. With this switch, lldpd will not send any frame. It will only listen to neighbors. -m management Specify the management addresses of this system. As for in- terfaces (described below), this option can use wildcards and inversions. Without this option, the first IPv4 and the first IPv6 are used. If an exact IP address is provided, it is used as a management address without any check. If only negative patterns are provided, only one IPv4 and one IPv6 addresses are chosen. Otherwise, many of them can be se- lected. If you want to remove IPv6 addresses, you can use !*:*. If an interface name is matched, the first IPv4 ad- dress and the first IPv6 address associated to this interface will be chosen. -u file Specify the Unix-domain socket used for communication with lldpctl(8). -I interfaces Specify which interface to listen and send LLDPDU to. Without this option, lldpd will use all available physical inter- faces. This option can use wildcards. Several interfaces can be specified separated by commas. It is also possible to re- move an interface by prefixing it with an exclamation mark. It is possible to allow an interface by prefixing it with two exclamation marks. An allowed interface beats a forbidden in- terface which beats a simple matched interface. For example, with eth*,!eth1,!eth2 lldpd will only use interfaces starting by eth with the exception of eth1 and eth2. While with *,!eth*,!!eth1 lldpd will use all interfaces, except inter- faces starting by eth with the exception of eth1. When an exact match is found, it will circumvent some tests. For ex- ample, if eth0.12 is specified, it will be accepted even if this is a VLAN interface. -C interfaces Specify which interfaces to use for computing chassis ID. Without this option, all interfaces are considered. lldpd will take the first MAC address from all the considered in- terfaces to compute the chassis ID. The logic of this option is the same as for -I flag: you can exclude interfaces with an exclamation mark and use globbing to specify several in- terfaces. If all interfaces are removed (with !*), the system name is used as a chassis ID instead. -M class Enable emission of LLDP-MED frame. Depending on the selected class, the standard defines which set of TLV should be trans- mitted. See section 10.2.1. Some devices may be strict about this aspect. The class should be one of the following value: 1 Generic Endpoint (Class I) 2 Media Endpoint (Class II). In this case, the standard requires to define at least one network policy through lldpcli. 3 Communication Device Endpoints (Class III). In this case, the standard requires to define at least one net- work policy through lldpcli. 4 Network Connectivity Device -i Disable LLDP-MED inventory TLV transmission. lldpd will still receive (and publish using SNMP if enabled) those LLDP- MED TLV but will not send them. Use this option if you don't want to transmit sensible information like serial numbers. -H hide Filter neighbors. See section "FILTERING NEIGHBORS" for de- tails. -L lldpcli Provide an alternative path to lldpcli for configuration. If empty, does not use lldpcli for configuration. -O configfile Override default configuration locations processed by lldpcli at start. If a directory is provided, each file contained in it will be read if ending by .conf. Order is alphabetical. -v Show lldpd version. When repeated, show more build informa- tion. FILTERING NEIGHBORS In a heterogeneous network, you may see several different hosts on the same port, even if there is only one physically plugged to this port. For example, if you have a Nortel switch running LLDP which is plugged to a Cisco switch running CDP and your host is plugged to the Cisco switch, you will see the Nortel switch as well because LLDP frames are forwarded by the Cisco switch. This may not be what you want. The -H hide parameter will allow you to tell lldpd to discard some frames that it receives and to avoid to send some other frames. Incoming filtering and outgoing filtering are unrelated. Incoming filtering will hide some remote ports to get you a chance to know ex- actly what equipment is on the other side of the network cable. Out- going filtering will avoid to use some protocols to avoid flooding your network with a protocol that is not handled by the nearest equipment. Keep in mind that even without filtering, lldpd will speak protocols for which at least one frame has been received and LLDP otherwise (there are other options to change this behaviour, for ex- ample -cc, -ss, -ee, -ll and -ff ). When enabling incoming filtering, lldpd will try to select one proto- col and filter out neighbors using other protocols. To select this protocol, the rule is to take the less used protocol. If on one port, you get 12 CDP neighbors and 1 LLDP neighbor, this mean that the re- mote switch speaks LLDP and does not filter CDP. Therefore, we select LLDP. When enabling outgoing filtering, lldpd will also try to select one protocol and only speaks this protocol. The filtering is done per port. Each port may select a different protocol. There are two additional criteria when enabling filtering: allowing one or several protocols to be selected (in case of a tie) and allow- ing one or several neighbors to be selected. Even when allowing sev- eral protocols, the rule of selecting the protocols with the less neighbors still apply. If lldpd selects LLDP and CDP, this means they have the same number of neighbors. The selection of the neighbor is random. Incoming filtering will select a set of neighbors to be dis- played while outgoing filtering will use the selected set of neigh- bors to decide which protocols to use: if a selected neighbor speaks LLDP and another one CDP, lldpd will speak both CDP and LLDP on this port. There are some corner cases. A typical example is a switch speaking two protocols (CDP and LLDP for example). You want to get the infor- mation from the best protocol but you want to speak both protocols because some tools use the CDP table and some other the LLDP table. The table below summarize all accepted values for the -H hide parame- ter. The default value is 15 which corresponds to the corner case de- scribed above. The filter column means that filtering is enabled. The 1proto column tells that only one protocol will be kept. The 1neigh column tells that only one neighbor will be kept. incoming outgoing filter 1proto 1neigh filter 1proto 1neigh 0 1 x x x x 2 x x 3 x x 4 x x 5 x 6 x 7 x x x x x 8 x x x 9 x x x x 10 x x 11 x x 12 x x x x 13 x x x 14 x x x x 15 x x x 16 x x x x x 17 x x x x 18 x x x 19 x x x FILES @LLDPD_CTL_SOCKET@ Unix-domain socket used for communication with lldpctl(8). @sysconfdir@/lldpd.conf Configuration file for lldpd. Commands in this files are executed by lldpcli(8) at start. @sysconfdir@/lldpd.d Directory containing configuration files whose commands are executed by lldpcli(8) at start. SEE ALSO lldpctl(8), lldpcli(8), snmpd(8) HISTORY The lldpd program is inspired from a preliminary work of Reyk Floeter. AUTHORS The lldpd program was written by Pierre-Yves Ritschard <pyr@openbsd.org>, and Vincent Bernat <bernat@luffy.cx>.

lldpcli.8

Here is the manual page for lldpcli and lldpctl (version 1.0.18):

NAME lldpcli, lldpctl — control LLDP daemon SYNOPSIS lldpcli [-dv] [-u socket] [-f format] [-c file] [command ] lldpctl [-dv] [-u socket] [-f format] [interfaces ] DESCRIPTION The lldpcli program controls lldpd(8) daemon. When no command is specified, lldpcli will start an interactive shell which can be used to input arbitrary commands as if they were speci- fied on the command line. This interactive shell should provide com- pletion and history support. The options are as follows: -d Enable more debugging information. This flag can be repeated. -u socket Specify the Unix-domain socket used for communication with lldpd(8). -v Show lldpcli version. When repeated, show more build informa- tion. -f format Choose the output format. Currently plain, xml, json, json0 and keyvalue formats are available. The default is plain. json0 is more verbose than json but the structure of the JSON object is not affected by the number of interfaces or the number of neighbors. It is therefore easier to parse. -c file Read the given configuration file. This option may be re- peated several times. If a directory is provided, each file contained in it will be read if ending by .conf. Order is alphabetical. When invoked as lldpctl, lldpcli will display detailed information about each neighbors on the specified interfaces or on all interfaces if none are specified. This command is mostly kept for backward com- patibility with older versions. The following commands are supported by lldpcli. When there is no ambiguity, the keywords can be abbreviated. For example, show neighbors ports eth0 summary and sh neigh p eth0 sum are the same command. exit Quit lldpcli. help […] Display general help or help about a command. Also, you can get help using the completion or by pressing the ? key. How- ever, completion and inline help may be unavailable if lldpcli was compiled without readline support but help com- mand is always available. show neighbors [ports ethX [,…]] [details | summary] [hidden] Display information about each neighbor known by lldpd(8) daemon. With summary, only the name and the port description of each remote host will be displayed. On the other hand, with details, all available information will be displayed, giving a verbose view. When using hidden, also display remote ports hidden by the smart filter. When specifying one or sev- eral ports, the information displayed is limited to the given list of ports. show interfaces [ports ethX [,…]] [details | summary] [hidden] Display information about each local interface known by lldpd(8) daemon. With summary, only the name and the port de- scription of each local interface will be displayed. On the other hand, with details, all available information will be displayed, giving a verbose view. When using hidden, also display local ports hidden by the smart filter. When specify- ing one or several ports, the information displayed is lim- ited to the given list of ports. show chassis [details | summary] Display information about local chassis. With summary, most details are skipped. On the other hand, with details, all available information will be displayed, giving a verbose view. watch [ports ethX [,…]] [details | summary] [hidden] [limit X] Watch for any neighbor changes and report them as soon as they happen. When specifying ports, the changes are only re- ported when happening on the given ports. hidden, summary and details have the same meaning than previously described. If limit is specified, lldpcli will exit after receiving the specified number of events. show configuration Display global configuration of lldpd(8) daemon. show statistics [ports ethX [,…]] [summary] Report LLDP-related statistics, like the number of LLDPDU transmitted, received, discarded or unrecognized. When speci- fying ports, only the statistics from the given port are re- ported. With summary the statistics of each port is summed. update Make lldpd(8) update its information and send new LLDP PDU on all interfaces. configure system hostname name Override system hostname with the provided value. By default, the system name is the FQDN found from the resolved value of uname -n. As a special value, use "." (dot) to use the short hostname instead of a FQDN. unconfigure system hostname Do not override system hostname and restore the use of the node name. configure system description description Override chassis description with the provided value instead of using kernel name, node name, kernel version, build date and architecture. unconfigure system description Do not override chassis description and use a value computed from node name, kernel name, kernel version, build date and architecture instead. configure system chassisid description Override chassis ID with the provided value instead of using MAC address from one interface or host name. unconfigure system chassisid Do not override chassis ID and use a value computed from one of the interface MAC address (or host name if none is found). configure system platform description Override platform description with the provided value instead of using kernel name. This value is currently only used for CDP. unconfigure system platform Do not override platform description and use the kernel name. This option undoes the previous one. configure system capabilities enabled capabilities Override system capabilities with the provided value instead of using kernel information. Several capabilities can be specified separated by commas. Only available capabilities can be enabled. Valid capabilities are: other repeater bridge wlan router telephone docsis station Here is an example of use: configure system capabilities enabled bridge,router unconfigure system capabilities enabled Do not override capabilities and use the kernel information. This option undoes the previous one. configure system interface pattern pattern Specify which interface to listen and send LLDPDU to. Without this option, lldpd will use all available physical inter- faces. This option can use wildcards. Several interfaces can be specified separated by commas. It is also possible to re- move an interface by prefixing it with an exclamation mark. It is possible to allow an interface by prefixing it with two exclamation marks. An allowed interface beats a forbidden in- terfaces which beats a simple matched interface. For example, with eth*,!eth1,!eth2 lldpd will only use interfaces starting by eth with the exception of eth1 and eth2. While with *,!eth*,!!eth1 lldpcli will use all interfaces, except inter- faces starting by eth with the exception of eth1. When an exact match is found, it will circumvent some tests. For ex- ample, if eth0.12 is specified, it will be accepted even if this is a VLAN interface. unconfigure system interface pattern Remove any previously configured interface pattern and use all physical interfaces. This option undoes the previous one. configure system interface permanent pattern Specify interfaces whose configuration is permanently kept by lldpd. By default, lldpd disregard any data about interfaces when they are removed from the system (statistics, custom configuration). This option allows one to specify a pattern similar to the interface pattern. If an interface disappear but matches the pattern, its data is kept in memory and reused if the interface reappear at some point. For example, on Linux, one could use the pattern eth*,eno*,enp*, which should match fixed interfaces on most systems. unconfigure system interface permanent Remove any previously configured permanent interface pattern. Any interface removed from the system will be forgotten. This option undoes the previous one. configure system interface description Some OS allows the user to set a description for an inter- face. Setting this option will enable lldpd to override this description with the name of the peer neighbor if one is found or with the number of neighbors found. unconfigure system interface description Do not update interface description with the name of the peer neighbor. This option undoes the previous one. configure system interface promiscuous Enable promiscuous mode on managed interfaces. When the interface is not managed any more (or when quitting lldpd), the interface is left in promiscuous mode as it is difficult to know if someone else also put the interface in promiscuous mode. This option is known to be useful when the remote switch is a Cisco 2960 and the local network card features VLAN hardware acceleration. In this case, you may not receive LLDP frames from the remote switch. The most plausible explanation for this is the frame is tagged with some VLAN (usually VLAN 1) and your network card is filtering VLAN. This is not the only available solution to work-around this problem. If you are concerned about performance issues, you can also tag the VLAN 1 on each interface instead. Currently, this option has no effect on anything else than Linux. On other OS, either disable VLAN acceleration, tag VLAN 1 or enable promiscuous mode manually on the interface. unconfigure system interface promiscuous Do not set promiscuous mode on managed interfaces. This op- tion does not disable promiscuous mode on interfaces already using this mode. configure system ip management pattern pattern Specify the management addresses of this system. As for in- terfaces (described above), this option can use wildcards and inversions. Without this option, the first IPv4 and the first IPv6 are used. If an exact IP address is provided, it is used as a management address without any check. If only negative patterns are provided, only one IPv4 and one IPv6 addresses are chosen. Otherwise, many of them can be se- lected. If you want to remove IPv6 addresses, you can use !*:*. If an interface name is matched, the first IPv4 ad- dress and the first IPv6 address associated to this interface will be chosen. unconfigure system ip management pattern Unset any specific pattern for matching management addresses. This option undoes the previous one. configure system bond-slave-src-mac-type value Set the type of src mac in lldp frames sent on bond slaves Valid types are: real Slave real mac zero All zero mac fixed An arbitrary fixed value (00:60:08:69:97:ef) local Real mac with locally administered bit set. If the real mac already has the locally administered bit set, fallback to the fixed value. Default value for bond-slave-src-mac-type is local. Some switches may complain when using one of the two other possi- ble values (either because 00:00:00:00:00:00 is not a valid MAC or because the MAC address is flapping from one port to another). Using local might lead to a duplicate MAC address on the network (but this is quite unlikely). configure system max-neighbors neighbors Change the maximum number of neighbors accepted (for each protocol) on an interface. This is a global value. The de- fault is 32. This setting only applies to future neighbors. configure lldp agent-type nearest-bridge | nearest-non-tpmr-bridge | nearest-customer-bridge The destination MAC address used to send LLDPDU allows an agent to control the propagation of LLDPDUs. By default, the 01:80:c2:00:00:0e MAC address is used and limit the propaga- tion of the LLDPDU to the nearest bridge (nearest-bridge). To instruct lldpd to use the 01:80:c2:00:00:03 MAC address instead, use nearest-nontpmr-bridge instead. To use the 01:80:c2:00:00:00 MAC address instead, use nearest-customer-bridge instead. configure lldp capabilities-advertisements unconfigure lldp capabilities-advertisements Enable or disable advertisements of the chassis capabilities TLV. configure lldp management-addresses-advertisements unconfigure lldp management-addresses-advertisements Enable or disable advertisements of the management address TLV. configure lldp portidsubtype ifname | macaddress configure [ports ethX [,…]] lldp portidsubtype local value Force port ID subtype. By default, lldpd will use the MAC ad- dress as port identifier and the interface name as port de- scription, unless the interface has an alias. In this case, the interface name will be used as port identifier and the description will be the interface alias. With this command, you can force the port identifier to be the interface name (with ifname), the MAC address (with macaddress) or a local value (with value). In the latest case, the local value should be provided. configure [ports ethX [,…]] lldp portdescription description Force port description to the provided string. configure lldp tx-interval interval Change transmit delay to the specified value in seconds. The transmit delay is the delay between two transmissions of LLDP PDU. The default value is 30 seconds. Note: lldpd also starts another system based refresh timer on each port to detect changes such as a hostname. This is the value of the tx-in- terval multiplied by 20. You can specify an interval value in milliseconds by append- ing a "ms" suffix to the figure (e.g. "configure lldp tx-in- terval 1500ms" is 1.5s, not 1500s). In this case the TTL for received and sent LLDP frames is rounded up to the next sec- ond. Note: the effective interval can be limited by the oper- ating system capabilities and CPU speed. configure lldp tx-hold hold Change transmit hold value to the specified value. This value is used to compute the TTL of transmitted packets which is the product of this value and of the transmit delay. The de- fault value is 4 and therefore the default TTL is 120 sec- onds. configure [ports ethX [,…]] lldp status rx-and-tx | rx-only | tx-only | disabled Configure the administrative status of the given port. By de- fault, all ports are configured to be in rx-and-tx mode. This means they can receive and transmit LLDP frames (as well as other protocols if needed). In rx-only mode, they won't emit any frames and in tx-only mode, they won't receive any frames. In disabled mode, no frame will be sent and any in- coming frame will be discarded. This setting does not over- ride the operational mode of the main daemon. If it is con- figured in receive-only mode (with the -r flag), setting any transmit mode won't have any effect. configure [ports ethX [,…]] lldp vlan-tx vlan_id [prio priority [dei dei]] Configure the given port to send LLDP frames over a specified VLAN. With VLAN Identifier (VID) as vlan_id, Priority Code Point (PCP) as priority, and Drop Eligible Indicator (DEI) as dei. lldpd accepts LLDP frames on all VLANs. configure [ports ethX [,…]] lldp custom-tlv [add | replace] oui oui subtype subtype [oui-info content] Emit a custom TLV for OUI oui, with subtype subtype and op- tionally with the bytes specified in content. Both oui and content should be a comma-separated list of bytes in hex for- mat. oui must be exactly 3-byte long. If add is specified then the TLV will be added. This is the default action. If replace is specified then all TLVs with the same oui and subtype will be replaced. unconfigure [ports ethX [,…]] lldp custom-tlv [oui oui] [subtype subtype] When no oui is specified, remove all previously configured custom TLV. When OUI oui and subtype subtype is specified, remove specific instances of custom TLV. configure med fast-start enable | tx-interval interval Configure LLDP-MED fast start mechanism. When a new LLDP-MED- enabled neighbor is detected, fast start allows lldpd to shorten the interval between two LLDPDU. enable should en- able LLDP-MED fast start while tx-interval specifies the in- terval between two LLDPDU in seconds. The default interval is 1 second. Once 4 LLDPDU have been sent, the fast start mecha- nism is disabled until a new neighbor is detected. unconfigure med fast-start Disable LLDP-MED fast start mechanism. configure [ports ethX [,…]] med location coordinate latitude latitude longitude longitude altitude altitude unit datum datum Advertise a coordinate based location on the given ports (or on all ports if no port is specified). The format of latitude is a decimal floating point number followed either by N or S. The format of longitude is a decimal floating point number followed either by E or W. altitude is a decimal floating point number followed either by m when expressed in meters or f when expressed in floors. A space is expected between the floating point number and the unit. datum is one of those values: » WGS84 » NAD83 » NAD83/MLLW A valid use of this command is: configure ports eth0 med location coordinate latitude 48.85667N longitude 2.2014E altitude 117.47 m datum WGS84 configure [ports ethX [,…]] med location address country country [type value […]] Advertise a civic address on the given ports (or on all ports if no port is specified). country is the two-letter code representing the country. The remaining arguments should be paired to form the address. The first member of each pair in- dicates the type of the second member which is a free-form text. Here is the list of valid types: » language » country-subdivision » county » city » city-division » block » street » direction » trailing-street-suffix » street-suffix » number » number-suffix » landmark » additional » name » zip » building » unit » floor » room » place-type » script A valid use of this command is: configure ports eth1 med location address country US street "Commercial Road" city "Roseville" configure [ports ethX [,…]] med location elin number Advertise the availability of an ELIN number. This is used for setting up emergency call. If the provided number is too small, it will be padded with 0. Here is an example of use: configure ports eth2 med location elin 911 configure [ports ethX [,…]] med policy application application [unknown] [tagged] [vlan vlan] [priority priority] [dscp dscp] Advertise a specific network policy for the given ports (or for all ports if no port was provided). Only the application type is mandatory. application should be one of the follow- ing values: » voice » voice-signaling » guest-voice » guest-voice-signaling » softphone-voice » video-conferencing » streaming-video » video-signaling The unknown flag tells that the network policy for the speci- fied application type is required by the device but is cur- rently unknown. This is used by Endpoint Devices, not by Net- work Connectivity Devices. If not specified, the network pol- icy for the given application type is defined. When a VLAN is specified with vlan tells which 802.1q VLAN ID has to be advertised for the network policy. A valid value is between 1 and 4094. tagged tells the VLAN should be tagged for the specified application type. priority allows one to specify IEEE 802.1d / IEEE 802.1p Layer 2 Priority, also known as Class of Service (CoS), to be used for the specified application type. This field is usu- ally ignored if no VLAN is specified. The names match 802.1D-2004 standard (table G-2). Some more recent standards may use different labels. Only the numeric values should be relied upon. The accepted labels are: 1 background 0 best-effort 2 excellent-effort 3 critical-applications 4 video 5 voice 6 internetwork-control 7 network-control dscp represents the DSCP value to be advertised for the given network policy. DiffServ/Differentiated Services Code Point (DSCP) value as defined in IETF RFC 2474 for the specified application type. Value: 0 (default per RFC 2475) through 63. Note: The class selector DSCP values are backwards compatible for devices that only support the old IP precedence Type of Service (ToS) format. (See the RFCs for what these values mean) A valid use of this command is: configure med policy application voice vlan 500 priority voice dscp 46 configure inventory hardware-revision value Override hardware-revision with the provided value. By de- fault, the hardware-revision is fetched from /sys/class/dmi unconfigure inventory hardware-revision Do not override hardware-revision and restore the use of the /sys/class/dmi value. configure inventory software-revision value Override software-revision with the provided value. By de- fault, the software-revision is fetched from uname unconfigure inventory software-revision Do not override software-revision and restore the use of the uname value. configure inventory firmware-revision value Override firmware-revision with the provided value. By de- fault, the firmware-revision is fetched from /sys/class/dmi unconfigure inventory firmware-revision Do not override firmware-revision and restore the use of the /sys/class/dmi value. configure inventory serial-number value Override serial-number with the provided value. By default, the serial-number is fetched from /sys/class/dmi unconfigure inventory serial-number Do not override serial-number and restore the use of the /sys/class/dmi value. configure inventory manufacturer value Override manufacturer with the provided value. By default, the manufacturer is fetched from /sys/class/dmi unconfigure inventory manufacturer Do not override manufacturer and restore the use of the /sys/class/dmi value. configure inventory model value Override model with the provided value. By default, the model is fetched from /sys/class/dmi unconfigure inventory model Do not override model and restore the use of the /sys/class/dmi value. configure inventory asset value Override asset with the provided value. By default, the asset is fetched from /sys/class/dmi unconfigure inventory asset Do not override asset and restore the use of the /sys/class/dmi value. configure [ports ethX [,…]] med power pse | pd source source priority priority value value Advertise the LLDP-MED POE-MDI TLV for the given ports or for all interfaces if no port is provided. One can act as a PD (power consumer) or a PSE (power provider). No check is done on the validity of the parameters while LLDP-MED requires some restrictions: » PD shall never request more power than physical 802.3af class. » PD shall never draw more than the maximum power adver- tised by PSE. » PSE shall not reduce power allocated to PD when this power is in use. » PSE may request reduced power using conservation mode » Being PSE or PD is a global parameter, not a per-port pa- rameter. lldpcli does not enforce this: a port can be set as PD or PSE. LLDP-MED also requires for a PSE to only have one power source (primary or backup). Again, lldpcli does not enforce this. Each port can have its own power source. The same applies for PD and power priority. LLDP-MED MIB does not allow this kind of representation. Valid types are: pse Power Sourcing Entity (power provider) pd Power Device (power consumer) Valid sources are: unknown Unknown primary For PSE, the power source is the primary power source. backup For PSE, the power source is the backup power source or a power conservation mode is asked (the PSE may be running on UPS for example). pse For PD, the power source is the PSE. local For PD, the power source is a local source. both For PD, the power source is both the PSE and a lo- cal source. Valid priorities are: unknown Unknown priority critical Critical high High low Low value should be the total power in milliwatts required by the PD device or available by the PSE device. Here is an example of use: configure med power pd source pse priority high value 5000 configure [ports ethX [,…]] dot3 power pse | pd [supported] [enabled] [paircontrol] powerpairs powerpairs [class class] [type type source source priority priority requested requested allocated allocated] Advertise Dot3 POE-MDI TLV for the given port or for all ports if none was provided. One can act as a PD (power con- sumer) or a PSE (power provider). This configuration is dis- tinct of the configuration of the transmission of the LLDP- MED POE-MDI TLV but the user should ensure the coherency of those two configurations if they are used together. supported means that MDI power is supported on the given port while enabled means that MDI power is enabled. paircontrol is used to indicate if pair selection can be controlled. Valid values for powerpairs are: signal The signal pairs only are in use. spare The spare pairs only are in use. When specified, class is a number between 0 and 4. The remaining parameters are in conformance with 802.3at and are optional. type should be either 1 or 2, indicating which if the device conforms to 802.3at type 1 or 802.3at type 2. Values of source and priority are the same as for LLDP-MED POE-MDI TLV. requested and allocated are expressed in milli- wats. Here are two valid uses of this command: configure ports eth3 dot3 power pse supported enabled paircontrol powerpairs spare class class-3 configure dot3 power pd supported enabled powerpairs spare class class-3 type 1 source pse priority low requested 10000 allocated 15000 pause Pause lldpd operations. lldpd will not send any more frames or receive ones. This can be undone with resume command. This only works interactively as lldpd asks lldpcli to unpause af- ter reading the configuration file. resume Resume lldpd operations. lldpd will start to send and re- ceive frames. This command is issued internally after pro- cessing configuration but can be used at any time if a manual pause command is issued. FILES @LLDPD_CTL_SOCKET@ Unix-domain socket used for communication with lldpd(8). SEE ALSO lldpd(8) AUTHORS The lldpcli program was written by Vincent Bernat <bernat@luffy.cx>.