I needed help in understanding if LLDP/CDP is the Layer 2 equivalent to RIP or say any Layer 3 route advertising protocol. If not,is there a protocol that advertises the MAC Address Tables among switches?

  • 1
    Well, there's Gratuitous ARP.
    – AndreKR
    Commented Jul 29, 2018 at 7:10

5 Answers 5


LLDP is not a layer 2 equivalent of RIP.

RIP is a routing protocol, advertising routes between routers.

LLDP is a device discovery protocol, so neighboring devices can learn about each other.

Switches make their forwarding decisions independently, so there is no need to advertise MAC address tables between them.

  • Unless they're TRILL or SPB switches, which afaik do distribute their address tables using IS-IS? Commented Jul 29, 2018 at 10:07
  • Thank you Ron. I asked this stupid question because I met with a scenario where one switch had the mac address of another switch in its table and I could not imagine a scenario.
    – nowiz
    Commented Jul 29, 2018 at 11:16
  • @nowiz: Of another switch itself? Maybe you connected to its management webpage. Maybe you pinged its management IP address. All the same rules which apply to regular hosts will apply to managed switches. Commented Jul 29, 2018 at 14:21

No. A MAC address table is only relevant for the switch that has the table. The MAC address table relates a MAC address to the interface where it was seen. Switch A has no use to know that a MAC Address X was seen on Interface 1 of Switch B. Switch A does need to know that it has seen the MAC Address X on its own Interface 48 (possibly, Switch A's connection to Switch B). If the MAC address never enters Switch A, maintaining a table entry for the MAC address would be a waste of resources.

A switch will create/update an entry in its MAC address table based on the source MAC address of a frame entering the switch. The entry in the MAC address table will eventually time out if there are no frames from that MAC address during a certain time period.


RIP is a routing protocol that is used, generally speaking, to connect new networks dynamically without adding routes at every routing point in the network. This is exclusively a Layer 3+ concept.

It wouldn't actually even make sense to distribute a CAM table. Any device within the L2 broadcast domain is permitted to have an entry for the same MAC address. There is no reason to share. It will automatically be updated if it is needed.

There IS actually something that advertises layer 2 addresses. ARP! While it is generally a query-based protocol (ARP "who is" query is answered by an "is at" frame), there are perfectly valid times to send out ARP "is-at" broadcast packets that advertise your MAC address. This is called "gratuitous ARP".

This is most often found in ARP spoofing wherein an attacker will broadcast a fake ARP entry. However, HSRP and VRRP also use gratuitous ARP for device failover to inform the layer 2 switch fabric of the new destination.


Switches normally don't advertise MAC addresses, they learn them from the data frames passing through the switches.

However there do exist systems that advertise MAC addresses, typically as part of building virtual Ethernet networks. A configuration that is getting a bunch of hype right now is to use VXLAN for the data encapsulation, while using multiprotcol BGP to advertise the location of MAC addesses.


Apart from LLDP and ARP, VxLAN and Trill are good technologies for MAC addresses advertisement. VxLAN and Trill work using L2 and link state machanism (Layer 3) to compute complete architecture.

  • 1
    VXLAN and TRILL provide L2 connectivity (in very different ways) and have no connection whatsoever to L2 advertising.
    – Zac67
    Commented Jul 31, 2018 at 16:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.