Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

 
 

MAC Learning and Aging

SUMMARY Juniper Cloud-Native Router provides automated learning and aging of MAC addresses. Read this topic for an overview of the MAC learning and aging functionality in the cloud-native router.

MAC Learning

MAC learning enables the cloud-native router to efficiently send the received packets to their respective destinations. The cloud-native router maintains a table of MAC addresses grouped by interface. The table includes MAC addresses, VLANs, and the interface on which the vRouter learns each MAC address and VLAN. The MAC table informs the vRouter about the MAC addresses that each interface can reach.

The cloud-native router caches the source MAC address for a new packet flow to record the incoming interface into the MAC table. ​The router learns the MAC addresses for each VLAN or bridge domain. ​The cloud-native router creates a key in the MAC table from the MAC address and VLAN of the packet. Queries sent to the MAC table return the interface associated with the key. To enable MAC learning, the cloud-native router performs these steps:

  • Records the incoming interface into the MAC table by caching the source MAC address for a new packet flow.

  • Learns the MAC addresses for each VLAN or bridge domain.

  • Creates a key in the MAC table from the MAC address and VLAN of the packet.

If the destination MAC address and VLAN are missing (lookup failure), the cloud-native router floods the packet out all the interfaces (except the incoming interface) in the bridge domain.​

By default:

  • MAC table entries time out after 60 seconds.

  • The MAC table size is limited to 10,240 entries.

We recommend that you do not change the default values. Please contact Juniper Support if you need to change the default values.

You can see the MAC table entries by using:

  • Introspect agent at http://host server IP:8085/mac_learning.xml#Snh_FetchL2MacEntry

  • The command show bridge mac-table on the cRPD CLI:

  • The command purel2cli --mac show​ on the CLI of the vRouter pod:

If you exceed the MAC address limit, the counter pkt_drop_due_to_mactable_limit increments. You can see this counter by using the introspect agent at http://host server IP:8085/Snh_AgentStatsReq.​

If you delete or disable an interface, the cloud-native router deletes all the MAC entries associated with that interface from the MAC table.​

MAC Entry Aging

The aging timeout for cached MAC entries is 60 seconds. You can configure the aging timeout at deployment time by editing the values.yaml file. The minimum timeout is 60 seconds and the maximum timeout is 10,240 seconds. You can see the time that is left for each MAC entry through introspect at http://host server IP:8085/mac_learning.xml#Snh_FetchL2MacEntry. We show an example of the output below: