Disclosed herein are
system, method, and
computer program product aspects for implementing
anycast gateways. Some aspects of this disclosure relate to a method including receiving, by an access node, a first TLV from a first gateway. The first TLV includes a CMAC address for the first gateway, an
IP address of the first gateway, and an L2 I-SID associated with the first gateway. The method further includes receiving, by the access node, a second TLV from a second gateway, where the second TLV includes the CMAC address, the
IP address, and the L2 I-SID. The method further includes, in response to determining that the L2 I-SID exists in an LSDB of the access node, determining that the first gateway is closer to the access node than the second gateway. The method also includes storing the CMAC address in a
database to point to the first gateway based on the determination.