Dell Networking SONiC Media Access Control (MAC) address

Summary: This article explains about MAC address in Dell SONiC switches

This article applies to This article does not apply to This article is not tied to any specific product. Not all product versions are identified in this article.

Instructions

Index

What is the MAC address
How MAC address is learned in switch
Configure a static MAC address
Configure MAC aging time
Configure MAC address dampening
Sample Configuration
Verification
   View MAC address table
   View MAC address table entries by MAC address
   View MAC address table entries by VLAN
   View MAC address count
   View MAC address entries by interface
   View MAC address entries by PortChannel
   View static MAC address entries
   View dynamic MAC address entries




What is the MAC address

A Media Access Control (MAC) address is a unique 48-bit identifier presented in the format nn.nn.nn.nn.nn.nn. A switch's MAC address table contains both static and dynamic entries:

  • Static MAC Addresses: These are manually configured by the user and do not have an expiration time.
  • Dynamic MAC Addresses: These are learned by the hardware and will be removed or "aged out" after a set duration, known as the aging time.
 
NOTE: The maximum capacity of the mac address table varies between switch models and configured L2/L3 switch profile. For a deeper understanding on L2 and L3 Profile, refer article Dell Networking SONiC OS L2 and L3 Switch Profiles
 

How MAC address is learned in switch

When a switch receives a packet, it identifies the source MAC address from the packet and logs it alongside the receiving port. Then, the switch checks its MAC address table to find the port associated with the destination MAC address of the packet for the given VLAN.

  • If the destination MAC is in the table, the switch forwards the packet to the respective port or port channel.
  • If not, the switch broadcasts the packet to all ports within the VLAN.

Should a dynamic MAC address not be associated with any received packets when its aging time elapses, the switch removes it from the MAC address table.
 

NOTE: The default MAC aging time in Dell SONiC is 600 seconds (10 Mins).
 

Configure a static MAC address

To set a static MAC address on the MAC address table, you need to manually input the address. You should specify the corresponding Ethernet port or port channel and the VLAN. This information helps the switch identify the appropriate interface through which to send packets destined for a device with that specific MAC address.

Configuration syntax

admin@sonic:~$ sonic-cli
sonic# configure
sonic(config)# mac address-table mac-address Vlan vlan-id <Eth slot/port[/breakout-port]| PortChannel number>
 
Sample Configuration
admin@sonic:~$ sonic-cli
sonic# configure
sonic(config)# no mac address-table 00:00:00:00:00:01 Vlan 10 
 

To delete a static MAC address, use the no version of the complete command without the Ethernet port or port channel number.

Sample Configuration

admin@sonic:~$ sonic-cli
sonic# configure
sonic(config)# no mac address-table 00:00:00:00:00:01 Vlan 10 
 
 

Configure MAC aging time

Configure the aging time for all dynamically-learned MAC addresses (0 to 1000000 seconds; default 600). Static MAC address entries are not affected by the mac address-table aging-time command. When the aging time is reached, a dynamic MAC address entry is deleted from the table. Enter 0 to disable MAC aging. Enter the no version of the command to restore the default aging time.

Configuration syntax
admin@sonic:~$ sonic-cli
sonic# configure
sonic(config)# mac address-table aging-time <seconds>

Sample Configuration
admin@sonic:~$ sonic-cli
sonic# show mac address-table aging-time 
Global aging time: 600 seconds

admin@sonic:~$ sonic-cli
sonic# configure
sonic(config)# mac address-table aging-time 1000
sonic(config)# exit
sonic# show mac address-table aging-time 
Global aging time: 1000 seconds

sonic(config)# mac address-table aging-time 0
sonic(config)# exit
sonic# show mac address-table aging-time 
Global aging time: 0 seconds(disabled)

sonic(config)# no mac address-table aging-time 
sonic(config)# exit
sonic# show mac address-table aging-time 
Global aging time: 600 seconds
 
 

Configure MAC address dampening

To limit the maximum number times that a dynamic MAC address can be assigned to different interfaces, configure a dampening threshold (5 to 100; no default).

Configuration syntax
admin@sonic:~$ sonic-cli
sonic# configure
sonic(config)# mac address-table dampening-threshold <number>

To configure the minimum time interval that a dynamic MAC address can be assigned to different interfaces, configure a dampening interval (1 to 1000000 seconds; no default).

Configuration syntax
admin@sonic:~$ sonic-cli
sonic# configure
sonic(config)# mac address-table dampening-interval <seconds>
 
 

Sample Configuration

admin@sonic:~$ sonic-cli 
sonic# configure
sonic(config)# mac address-table 00:00:00:00:00:01 Vlan 10 Eth1/1
sonic(config)# mac address-table 00:00:00:00:00:01 Vlan 11 Eth1/1
sonic(config)# mac address-table 00:00:00:00:00:03 Vlan 30 Eth1/2
sonic(config)# mac address-table 00:00:00:00:00:05 Vlan 50 Eth1/3
sonic(config)# mac address-table 00:00:00:00:00:07 Vlan 70 Eth1/4
sonic(config)# mac address-table 00:00:00:00:00:09 Vlan 90 Eth1/5
sonic(config)# mac address-table 00:00:00:00:00:98 Vlan 10 Eth1/6
sonic(config)# mac address-table 00:00:00:00:00:99 Vlan 99 PortChannel 110
sonic(config)# mac address-table aging-time 1000
sonic(config)# mac address-table dampening-threshold 10
sonic(config)# mac address-table dampening-interval 100000
 

 

Verification


Use show mac-address table commands to view MAC address table information.
show mac address-table [address mac-address] [aging-time] [interface Eth slot/port[/breakout-port]] [Vlan vlan-id] [PortChannel number] [count] [static] [dynamic]
 


View MAC address table


Sample Output
sonic# show mac address-table 
-----------------------------------------------------------
VLAN MAC-ADDRESS TYPE INTERFACE 
-----------------------------------------------------------
10 00:00:00:00:00:01 STATIC Eth1/1 
11 00:00:00:00:00:01 STATIC Eth1/1 
100 00:00:00:00:00:10 DYNAMIC Eth1/9 
20 00:00:00:00:00:02 DYNAMIC Eth1/2 
30 00:00:00:00:00:03 STATIC Eth1/2 
40 00:00:00:00:00:04 DYNAMIC Eth1/3 
50 00:00:00:00:00:05 STATIC Eth1/3 
60 00:00:00:00:00:06 DYNAMIC Eth1/4 
70 00:00:00:00:00:07 STATIC Eth1/4 
80 00:00:00:00:00:08 DYNAMIC Eth1/4 
90 00:00:00:00:00:09 STATIC Eth1/5 
99 00:00:00:00:00:99 STATIC PortChannel110


View MAC address table entries by MAC address

Sample Output
sonic# show mac address-table address 00:00:00:00:00:01 
-----------------------------------------------------------
VLAN MAC-ADDRESS TYPE INTERFACE 
-----------------------------------------------------------
10 00:00:00:00:00:01 STATIC Eth1/1 
11 00:00:00:00:00:01 STATIC Eth1/1


View MAC address table entries by VLAN

Sample Output
sonic# show mac address-table Vlan 10
-----------------------------------------------------------
VLAN MAC-ADDRESS TYPE INTERFACE 
-----------------------------------------------------------
10 00:00:00:00:00:01 STATIC Eth1/1 
10 00:00:00:00:00:98 STATIC Eth1/1
 
sonic# show mac address-table static Vlan 11 
-----------------------------------------------------------
VLAN MAC-ADDRESS TYPE INTERFACE
-----------------------------------------------------------
11 00:00:00:00:00:01 STATIC Eth1/1
 
sonic# show mac address-table dynamic Vlan 60 
-----------------------------------------------------------
VLAN MAC-ADDRESS TYPE INTERFACE 
-----------------------------------------------------------
60 00:00:00:00:00:06 DYNAMIC Eth1/12


View MAC address count

Sample Output
sonic# show mac address-table count
MAC Entries for all vlans : 13 
Dynamic Address Count : 5 
Static Address (User-defined) Count : 8 
Total MAC Addresses in Use: 13 


View MAC address entries by interface

Sample Output
sonic# show mac address-table interface Eth1/1
-----------------------------------------------------------
VLAN MAC-ADDRESS TYPE INTERFACE 
-----------------------------------------------------------
10 00:00:00:00:00:01 STATIC Eth1/1 
10 00:00:00:00:00:98 STATIC Eth1/1 
11 00:00:00:00:00:01 STATIC Eth1/1
 
sonic# show mac address-table static interface Eth1/3 
-----------------------------------------------------------
VLAN MAC-ADDRESS TYPE INTERFACE 
-----------------------------------------------------------
30 00:00:00:00:00:03 STATIC Eth1/3
 
sonic# show mac address-table dynamic interface Eth1/5 
-----------------------------------------------------------
VLAN MAC-ADDRESS TYPE INTERFACE 
-----------------------------------------------------------
60 00:00:00:00:00:06 DYNAMIC Eth1/5


View MAC address entries by PortChannel

Sample Output
sonic# show mac address-table interface PortChannel 10 
-----------------------------------------------------------
VLAN MAC-ADDRESS TYPE INTERFACE 
-----------------------------------------------------------
99 00:00:00:00:00:99 STATIC PortChannel10


View static MAC address entries

Sample Output
sonic# show mac address-table static
-----------------------------------------------------------
VLAN MAC-ADDRESS TYPE INTERFACE 
-----------------------------------------------------------
10 00:00:00:00:00:01 STATIC Eth1/1 
11 00:00:00:00:00:01 STATIC Eth1/1 
30 00:00:00:00:00:03 STATIC Eth1/3 
50 00:00:00:00:00:05 STATIC Eth1/5 
70 00:00:00:00:00:07 STATIC Eth1/7 
90 00:00:00:00:00:09 STATIC Eth1/9
10 00:00:00:00:00:98 STATIC Eth1/1 
99 00:00:00:00:00:99 STATIC PortChannel10
 
sonic# show mac address-table static address 00:00:00:00:00:01
-----------------------------------------------------------
VLAN MAC-ADDRESS TYPE INTERFACE 
-----------------------------------------------------------
10 00:00:00:00:00:01 STATIC Eth1/1 
11 00:00:00:00:00:01 STATIC Eth1/1 


View dynamic MAC address entries

Sample Output
sonic# show mac address-table dynamic
-----------------------------------------------------------
VLAN MAC-ADDRESS TYPE INTERFACE 
-----------------------------------------------------------
100 00:00:00:00:00:10 DYNAMIC Eth1/1 
20 00:00:00:00:00:02 DYNAMIC Eth1/2 
40 00:00:00:00:00:04 DYNAMIC Eth1/3 
60 00:00:00:00:00:06 DYNAMIC Eth1/4 
80 00:00:00:00:00:08 DYNAMIC Eth1/5
 
sonic# show mac address-table dynamic address 00:00:00:00:00:06
-----------------------------------------------------------
VLAN MAC-ADDRESS TYPE INTERFACE 
-----------------------------------------------------------
60 00:00:00:00:00:06 DYNAMIC Eth1/1



Affected Products

Enterprise SONiC Distribution, PowerSwitch E3200-ON Series, Dell EMC Networking N3200-ON, PowerSwitch S5212F-ON, PowerSwitch S5224F-ON, PowerSwitch S5232F-ON, PowerSwitch S5248F-ON, PowerSwitch S5296F-ON, PowerSwitch Z9264F-ON, PowerSwitch Z9332F-ON , PowerSwitch Z9432F-ON ...
Article Properties
Article Number: 000217932
Article Type: How To
Last Modified: 02 Oct 2023
Version:  5
Find answers to your questions from other Dell users
Support Services
Check if your device is covered by Support Services.