Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

Announcement: Try the Ask AI chatbot for answers to your technical questions about Juniper products and solutions.

close
header-navigation
keyboard_arrow_up
close
keyboard_arrow_left
Juniper Cloud-Native Router User Guide
Table of Contents Expand all
list Table of Contents
file_download PDF
{ "lLangCode": "en", "lName": "English", "lCountryCode": "us", "transcode": "en_US" }
English
keyboard_arrow_right

MAC Learning and Aging

Release: JCNR 23.3
{}
Change Release
date_range 27-Nov-24

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 Cloud-Native Router controller CLI:

    content_copy zoom_out_map
    show bridge mac-table
    Routing Instance : default-domain:default-project:ip-fabric:__default__
    Bridging domain VLAN id : 3002
    MAC                  MAC                Logical
    address              flags              interface
    
    00:00:5E:00:53:01      D                 bond0
  • The command purel2cli --mac show​ on the CLI of the vRouter pod:

    content_copy zoom_out_map
    purel2cli --mac show
    ==================================================
    ||  MAC            vlan      port      hit_count||
    ==================================================
    00:01:01:01:01:03  1221      2          1101892
    00:01:01:01:01:02  1221      2          1101819
    00:01:01:01:01:04  1221      2          1101863
    00:01:01:01:01:01  1221      2          1101879
    5a:4c:4c:75:90:fe  1250      5          12
    Total Mac entries 5

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:

content_copy zoom_out_map
l2_mac_entry_list
vrf_id          vlan_id          mac                  index          packets          time_since_add          last_stats_change
0               1001             00:10:94:00:00:01    5644           615123154        12:55:14.248785         00:00:00.155450
0               1001             00:10:94:00:00:65    6480           615108294        12:55:14.247765         00:00:00.155461
0               1002             01:10:94:00:00:02    5628           615123173        12:55:14.248295         00:00:00.155470
footer-navigation