Open erikpu opened 6 years ago
On some platforms (including Mellanox) system MAC and management interface MAC are different (there is some alignment of last byte). You can find the details about getting system MAC here: https://github.com/Azure/sonic-buildimage/blob/master/src/sonic-config-engine/sonic_platform.py#L43
By default "lldpd" will take the first MAC address from all the considered interfaces to compute the chassis ID. So, it looks like in our case first interface is "eth0" and as a result incorrect MAC is taken by "lldpd" (only on platforms with different system and management MAC).
To solve this problem "lddpd" should be configured with the correct system MAC, not sure what is the right way, but probably it is possible to use something like shown below: http://vincentbernat.github.io/lldpd/usage.html
...
configure system chassisid description
Override chassis ID with the provided value instead of using
MAC address from one interface or host name.
...
In SONiC lldpd configuration can be done in "lldp" docker container, using "lldpcli" utility or by editing "/etc/lldpd.conf" config file (it is passed to "lldpd" in "usr/bin/start.sh" script): (all LDDP config files are here https://github.com/Azure/sonic-buildimage/tree/master/dockers/docker-lldp-sv2)
sonic # docker exec -it lldp lldpcli show chassis summary
-------------------------------------------------------------------------------
Local chassis:
-------------------------------------------------------------------------------
Chassis:
ChassisID: mac <macaddr>
SysName: <sysname>
-------------------------------------------------------------------------------
sonic #
sonic # docker exec -it lldp cat /etc/lldpd.conf
configure ports eth0 lldp portidsubtype local eth0
Thank you!
Although there is a WA i believe the issue should be kept as open and hopefully will be handled
The lldpd used in SONiC doesn't have a way to set a management MAC address. Latest lldpd has such option
Currently SONiC runs lldpd as /usr/sbin/lldpd -d -I Ethernet,eth -C eth0 https://github.com/Azure/sonic-buildimage/blob/master/dockers/docker-lldp-sv2/supervisord.conf The -C option tells lldpd to scan eth0 only as a source of management mac addresses.
Hi, I have two switches (Mellanox SN2100 and Arista 7050QX-32S) with SONiC connected to each other (topology here) and I am investigating LLDP behaviour. Mellanox's DEVICE_METADATA is configured as follows:
Also, we can see that the MAC address of the connected interface (Ethernet32) is
ec:0d:9a:8d:f1:c0
:Despite this, Arista has in its LLDP-entries from Mellanox the following Chassis MAC address:
ec:0d:9a:8d:f1:e4
.This is the same MAC-address as Mellanox's
eth0
uplink interface:I am wondering why LLDP uses this MAC address as Chassis MAC address of the Mellanox machine, and why not the configured MAC address in
config_db.json
and the MAC address of the connected Mellanox interface (Ethernet32). Can you shed some light on this? Or point me to some related code so I can dig into it? Thanks in advance!SONiC version:
and