How To Enable LLDP Service on CentOS

May 22, 2021 Linux

linux networking
LLDP (Link Layer Discovery Protocol) can be essential in situations of complex network-server infrastructure configurations and it’s extremely helpful in case there is no direct access to our setup but we need to determine what network ports on the switches are our servers NIC cards connected to.

Below we present how to install and enable LLDP Daemon on CentOS Linux, based on CinderCloud VPS, and check what are the corresponding neighbor port IDs connected to our server network cards.

Steps:

1. Install EPEL release package

[root@infra1 ~]# yum install epel-release

2. Install LLDP daemon package

[root@infra1 ~]# yum install lldpd

3. Start and enable LLDP daemon

[root@infra1 ~]# systemctl --now enable lldpd

lldpd package comes with lldpcli command, which can be used to control lldpd daemon:

Examples of usage:

1. Show neighbor ports on the switch side, connected to the particular NICs on our server (check what is the port ID on the other side of the patchcord):

[root@infra1 ~]# lldpcli show neighbors

2. Show information about all the interfaces, known to the lldpd daemon:

[root@infra1 ~]# lldpcli show interfaces

3. Show basic information about the host

[root@infra1 ~]# lldpcli show chassis detail

CinderCloud.com - probly the cheapest Linux VPS servers

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.