{"id":6362,"date":"2026-05-04T12:10:33","date_gmt":"2026-05-04T12:10:33","guid":{"rendered":"http:\/\/docs.connexite.co.uk\/index.php\/docs\/connexite-documentation\/synapse-cli-documentation\/cli-configuring-mac-address\/"},"modified":"2026-05-04T12:19:09","modified_gmt":"2026-05-04T12:19:09","slug":"cli-configuring-mac-address","status":"publish","type":"docs","link":"https:\/\/docs.connexite.co.uk\/index.php\/docs\/network\/synapse-cli-documentation\/cli-configuring-mac-address\/","title":{"rendered":"Configuring MAC Address"},"content":{"rendered":"<h2 class=\"connexite-doc-h2\">Overview of MAC Address<\/h2>\n<p>The MAC address table contains address information that the switch uses to forward traffic between ports. The switch sends packets between any combination of ports, based on the destination address of the received packet. Using the MAC address table, the switch forwards the packet only to the port associated with the destination address. If the destination address is on the port that sent the packet, the packet is filtered and not forwarded. The MAC address table includes these types of addresses: Dynamic address: a source MAC address that the switch learns and then ages when it is not in use. Static address: a manually entered unicast address that does not age and that is not lost when the switch resets. Filter address: Also a static MAC address, but drop the packet with the specified source or destination unicast filter address. All addresses are associated with a VLAN. An address can exist in more than one VLAN and have different destinations in each. Each VLAN maintains its own logical address table. A known address in one VLAN is unknown in another until it is learned or statically associated with a port in the other VLAN. Dynamic addresses are source MAC addresses that the switch learns and then ages when they are not in use. You can change the aging time setting for all VLANs or for a specified VLAN. Setting too short an aging time can cause addresses to be prematurely removed from the table. Then when the switch receives a packet for an unknown destination, it floods the packet to all ports in the same VLAN as the receiving port. This unnecessary flooding can impact performance. Setting too long an aging time can cause the address table to be filled with unused addresses, which prevents new addresses from being learned.<\/p>\n<h2 class=\"connexite-doc-h2\">Configuring<\/h2>\n<p>\u25cf Changing MAC Address Aging Time<\/p>\n<pre class=\"connexite-doc-command\"><code>SWITCH(config)#mac-address-table aging-time &lt;0-600&gt;<\/code><\/pre>\n<pre class=\"connexite-doc-command\"><code>SWITCH(config)#no mac-address-table aging-time<\/code><\/pre>\n<p class=\"connexite-doc-command-desc\">Set the length of time that a dynamic entry remains in the MAC address table. The range is 1 to 600 seconds. The default is 300 seconds. You can also enter 0, which disables aging. \u25cf Adding Static MAC Address Entries<\/p>\n<pre class=\"connexite-doc-command\"><code>SWITCH(config)#mac-address-table static MAC_ADDR vlan VLANID interface IFNAME<\/code><\/pre>\n<pre class=\"connexite-doc-command\"><code>SWITCH(config)#no mac-address-table static MAC_ADDR vlan VLANID interface IFNAME<\/code><\/pre>\n<p class=\"connexite-doc-command-desc\">Add a static address to the MAC address table. MAC_ADDR: specify the destination MAC unicast address to add to the address table. Packets with this destination address received in the specified VLAN are forwarded to the specified interface. VLANID: specify the VLAN for which the packet with the specified MAC address is received, Valid VLAN IDs are 1 to 4094. IFNAME: specify the interface to which the received packet is forwarded, Valid interfaces include physical ports or port channels. \u25cf Adding Filter MAC Address Entries<\/p>\n<pre class=\"connexite-doc-command\"><code>SWITCH(config)#mac-address-table filter MAC_ADDR vlan VLANID<\/code><\/pre>\n<pre class=\"connexite-doc-command\"><code>SWITCH(config)#no mac-address-table filter MAC_ADDR vlan VLANID<\/code><\/pre>\n<p class=\"connexite-doc-command-desc\">Add a filter address to the MAC address table. VLANID: specify the VLAN for which the packet with the specified MAC address is received, Valid VLAN IDs are 1 to 4094. IFNAME: specify the interface to which the received packet is dropped, Valid interfaces include physical ports or port channels. \u25cf Clearing Dynamic MAC Address Entries<\/p>\n<pre class=\"connexite-doc-command\"><code>SWITCH#clear mac-address-table dynamic<\/code><\/pre>\n<pre class=\"connexite-doc-command\"><code>SWITCH#clear mac-address-table dynamic vlan VLANID<\/code><\/pre>\n<pre class=\"connexite-doc-command\"><code>SWITCH#clear mac-address-table dynamic interface IFNAME<\/code><\/pre>\n<p class=\"connexite-doc-command-desc\">Clear Dynamic Mac Address Entries. Support all, based on vlan or based on interface options. \u25cf Enable\/disable Port MAC Address Learning Mainly used in the following scenarios\uff1a When the network is relatively stable and the MAC addresses of the packets are relatively fixed, the device does not need to continue to learn the MAC addresses of all other packets. At this time, by applying a flow policy, the MAC address learning function is disabled for all traffic classifications under the policy, which can not only save the cost of MAC address entries, but also improve the operation efficiency of the device. Some illegal users sometimes attack the network by changing the MAC address frequently. At this time, by applying the flow policy, and disabling the MAC address learning function for all traffic classifications under the policy, the device MAC address table caused by such attacks can be avoided. Item overflow problem to protect device performance from being affected.<\/p>\n<pre class=\"connexite-doc-command\"><code>SWITCH(config-if)#mac-address-table learning disable action (forward | drop)<\/code><\/pre>\n<pre class=\"connexite-doc-command\"><code>SWITCH(config-if)#no mac-address-table learning disable<\/code><\/pre>\n<p class=\"connexite-doc-command-desc\">This command supports physical ports and AP ports, but does not support AP member ports. Disabling the port MAC address learning function. forward: If there is a matching entry in the MAC address table, the packet is forwarded according to the MAC table; if there is no matching entry, the packet is broadcast. discard: If there is a matching entry in the MAC address table, the packet is forwarded according to the MAC table; if there is no matching entry, the packet is discarded. The default port MAC address learning is enabled. \u25cf Port MAC Address Learning Limit In order to control the number of access users or prevent the MAC address table from being attacked, you can limit the number of MAC addresses that the switch module is allowed to learn, so as to control the number of access users to improve network security.<\/p>\n<pre class=\"connexite-doc-command\"><code>SWITCH(config-if)#mac-address-table limit maximum MAXINUM action (forward | drop)<\/code><\/pre>\n<pre class=\"connexite-doc-command\"><code>SWITCH(config-if)#no mac-address-table limit<\/code><\/pre>\n<p class=\"connexite-doc-command-desc\">This command supports physical ports and AP ports, but does not support AP member ports. Configuring the function of limiting the number of learned MAC addresses on a port. MAXINUM: range &lt;1-32767&gt; forward: After the number of MAC address entries reaches the limit, the packets whose source MAC address is the new MAC address continue to be forwarded, but the MAC address entry is not recorded. discard: After the number of MAC address entries reaches the limit, the packets whose source MAC address is the new MAC address will be discarded. \u25cf Enable\/disable VLAN MAC Address Learning To improve the security of the device, network administrators can specify certain VLANs to only allow packets from certain MAC addresses to pass through. After the MAC address learning function is disabled, the device will no longer learn a new MAC address from this VLAN, so it will not be able to communicate through this VLAN, which enhances the stability and security of the network. When the MAC address learning function is enabled, it receives Ethernet frames from peripheral devices, parses out the source MAC address, and adds a new entry to the MAC address entry. Later, when the switching module receives the Ethernet frame destined for the destination MAC address, it can directly query the MAC address entry to obtain the correct sending interface, avoiding broadcast.<\/p>\n<pre class=\"connexite-doc-command\"><code>SWITCH(config)#mac-address-table learning disable vlan VLAN-LIST action (forward | drop)<\/code><\/pre>\n<pre class=\"connexite-doc-command\"><code>SWITCH(config)#no mac-address-table learning disable vlan VLAN-LIST<\/code><\/pre>\n<p class=\"connexite-doc-command-desc\">Disabling the VLAN MAC address learning function. VLAN-LIST: Support single vlan or range mode, for example: 10 or 10-20. forward: If there is a matching entry in the MAC address table, the packet is forwarded according to the MAC table; if there is no matching entry, the packet is broadcast. discard: If there is a matching entry in the MAC address table, the packet is forwarded according to the MAC table; if there is no matching entry, the packet is discarded. The default port MAC address learning is enabled. \u25cf Limit the Number of Learned Addresses on VLAN In order to control the number of access users or prevent the MAC address table from being attacked, you can limit the number of MAC addresses that the switch module allows to learn in the VLAN, so as to control the number of access users to improve network security.<\/p>\n<pre class=\"connexite-doc-command\"><code>SWITCH(config-if)#mac-address-table limit vlan VLAN-LIST maximum MAXINUM action (forward | drop)<\/code><\/pre>\n<pre class=\"connexite-doc-command\"><code>SWITCH(config-if)#no mac-address-table limit vlan VLAN-LIST<\/code><\/pre>\n<p class=\"connexite-doc-command-desc\">Configuring the function of limiting the number of learned VLAN MAC addresses. VLAN-LIST: Support single vlan or range mode, for example: 10 or 10-20. MAXINUM: range &lt;1-32767&gt;. forward: After the number of MAC address entries reaches the limit, the packets whose source MAC address is the new MAC address continue to be forwarded, but the MAC address entry is not recorded. discard: After the number of MAC address entries reaches the limit, the packets whose source MAC address is the new MAC address will be discarded. \u25cf Turn On\/off the Flipping Function MAC address flapping means that the MAC address learned by one interface on the device is also learned on another interface in the same VLAN, and the MAC address entry learned later overwrites the original entry. MAC address flapping may be caused by the following reasons\uff1a The network cable of the switch module in the network is incorrectly connected or configured incorrectly to form a ring network, resulting in MAC address drift. Some illegal users in the network conduct MAC address attacks. Configuring the MAC address flapping detection function can detect whether all the MAC addresses on the device are flapping. If drift occurs, the drift event will be recorded, and maintenance personnel can locate the fault according to the alarm information.<\/p>\n<pre class=\"connexite-doc-command\"><code>SWITCH(config)#mac-address-table flapping detect<\/code><\/pre>\n<pre class=\"connexite-doc-command\"><code>SWITCH(config)#no mac-address-table flapping detect<\/code><\/pre>\n<p class=\"connexite-doc-command-desc\">Configure and enable the MAC address flapping function, which is disabled by default. \u25cf Flapping Detected to Trigger Shutdown After an interface is configured with a MAC address flapping action, if the system detects that the MAC learned by the interface is flapping, it will shut down the interface. Whether the port shutdown action is executed depends on whether the Mac-address-table-flapping option of the errdisable module is selected. It is enabled by default.<\/p>\n<pre class=\"connexite-doc-command\"><code>SWITCH(config)#mac-address-table flapping detect action shutdown<\/code><\/pre>\n<pre class=\"connexite-doc-command\"><code>SWITCH(config)#no mac-address-table flapping detect action<\/code><\/pre>\n<p class=\"connexite-doc-command-desc\">Configure and enable the MAC address flapping function, which is disabled by default. \u25cf Configure The Number Of Migrations Triggered By Flipping MAC address migration may be caused by normal unplugging or plugging, or it may be caused by other abnormal reasons such as loops. If the number of MAC address migration exceeds the configured value, it is considered that a flapping event has occurred.<\/p>\n<pre class=\"connexite-doc-command\"><code>SWITCH(config)#mac-address-table flapping detect times VALUE<\/code><\/pre>\n<pre class=\"connexite-doc-command\"><code>SWITCH(config)#no mac-address-table flapping detect times<\/code><\/pre>\n<p class=\"connexite-doc-command-desc\">Configure the number of migrations triggered by flipping. VALUE\uff1a&lt;1 50&gt;\uff0cdefault value is 5 \u25cf Clear the Flapping Record Information<\/p>\n<pre class=\"connexite-doc-command\"><code>SWITCH#clear mac-address-table flapping<\/code><\/pre>\n<p class=\"connexite-doc-command-desc\">Clear the flapping record information.<\/p>\n<h2 class=\"connexite-doc-h2\">Examples<\/h2>\n<p>Example 1\uff1aThis example shows how to change MAC Address aging time to 60 seconds. Step1: Enter configuration mode\uff1a<\/p>\n<pre class=\"connexite-doc-command\"><code>SWITCH#configure terminal<\/code><\/pre>\n<p class=\"connexite-doc-command-desc\">Enter configuration commands, one per line. End with CNTL\/Z. Step2: Change MAC Address aging time to 60 seconds.<\/p>\n<pre class=\"connexite-doc-command\"><code>SWITCH(config)#mac-address-table aging-time 60<\/code><\/pre>\n<p class=\"connexite-doc-command-desc\">Example 2: This example shows how to add a static MAC Address entry. Step1: Enter configuration mode\uff1a<\/p>\n<pre class=\"connexite-doc-command\"><code>SWITCH#configure terminal<\/code><\/pre>\n<p class=\"connexite-doc-command-desc\">Enter configuration commands, one per line. End with CNTL\/Z. Step2: Add a static MAC Address entry.<\/p>\n<pre class=\"connexite-doc-command\"><code>SWITCH(config)#mac-address-table static 000E.C6C1.C8AB vlan 1 interface gigabitEthernet0\/1<\/code><\/pre>\n<p class=\"connexite-doc-command-desc\">Example 3: This example shows how to add a filter MAC Address entry. Step1: Enter configuration mode\uff1a<\/p>\n<pre class=\"connexite-doc-command\"><code>SWITCH#configure terminal<\/code><\/pre>\n<p class=\"connexite-doc-command-desc\">Enter configuration commands, one per line. End with CNTL\/Z. Step2: Add a filter MAC Address entry<\/p>\n<pre class=\"connexite-doc-command\"><code>SWITCH(config)#mac-address-table filter 000E.C6C1.C8AB vlan 1<\/code><\/pre>\n<p class=\"connexite-doc-command-desc\">Example 4: This example shows how to clear dynamic MAC Address entries. Step1: Clear MAC Address entries by interface.<\/p>\n<pre class=\"connexite-doc-command\"><code>SWITCH#clear mac-address-table dynamic interface gigabitEthernet0\/1<\/code><\/pre>\n<h2 class=\"connexite-doc-h2\">Display Information<\/h2>\n<p>\u25cf Display MAC Address Table Entries<\/p>\n<pre class=\"connexite-doc-command\"><code>SWITCH#show mac-address-table<\/code><\/pre>\n<h2 class=\"connexite-doc-h2\">VLAN MAC Address Type Ports<\/h2>\n<p>&#8212;&#8211;+&#8212;&#8212;&#8212;&#8212;&#8212;-+&#8212;&#8212;&#8212;+&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;+ 20 0000.0000.0009 filter drop 20 0000.0000.000a filter drop \u25cf Display MAC Address Table Statistics<\/p>\n<pre class=\"connexite-doc-command\"><code>SWITCH#show mac-address-table count<\/code><\/pre>\n<p class=\"connexite-doc-command-desc\">Static Address Count: 0 Filter Address Count: 2 Dynamic Address Count: 0 \u25cf Display MAC Address Learning Configuration Information<\/p>\n<pre class=\"connexite-doc-command\"><code>SWITCH#show mac-address-table learning<\/code><\/pre>\n<h2 class=\"connexite-doc-h2\">Interface Status Action<\/h2>\n<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;- GiE0\/4 Disabled Forward Vlan 3-6 Disabled Drop Vlan 9-10 Disabled Drop \u25cf Display MAC Address Limit Configuration Information<\/p>\n<pre class=\"connexite-doc-command\"><code>SWITCH#show mac-address-table limit<\/code><\/pre>\n<h2 class=\"connexite-doc-h2\">Interface Limit Action<\/h2>\n<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;- GiE0\/5 1000 Drop Vlan 20-25 100 forward \u25cf Display MAC Address Flapping Information<\/p>\n<pre class=\"connexite-doc-command\"><code>SWITCH#show mac-address-table flapping<\/code><\/pre>\n<p class=\"connexite-doc-command-desc\">Mac-address-table Flapping Configurations: &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;- Mac-address-table flapping detect : Disabled Mac-address-table flapping times : 5 Mac-address-table flapping action : none &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;- Mac-address-table Flapping entries : 0<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Networking \u203a Switching \u203a Edge \u203a Synapse<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":6349,"menu_order":13,"comment_status":"open","ping_status":"closed","template":"","doc_tag":[115,119,116],"class_list":["post-6362","docs","type-docs","status-publish","hentry","doc_tag-connexite","doc_tag-network","doc_tag-synapse-cli-documentation","no-post-thumbnail"],"acf":[],"_links":{"self":[{"href":"https:\/\/docs.connexite.co.uk\/index.php\/wp-json\/wp\/v2\/docs\/6362","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/docs.connexite.co.uk\/index.php\/wp-json\/wp\/v2\/docs"}],"about":[{"href":"https:\/\/docs.connexite.co.uk\/index.php\/wp-json\/wp\/v2\/types\/docs"}],"author":[{"embeddable":true,"href":"https:\/\/docs.connexite.co.uk\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/docs.connexite.co.uk\/index.php\/wp-json\/wp\/v2\/comments?post=6362"}],"version-history":[{"count":1,"href":"https:\/\/docs.connexite.co.uk\/index.php\/wp-json\/wp\/v2\/docs\/6362\/revisions"}],"predecessor-version":[{"id":6410,"href":"https:\/\/docs.connexite.co.uk\/index.php\/wp-json\/wp\/v2\/docs\/6362\/revisions\/6410"}],"up":[{"embeddable":true,"href":"https:\/\/docs.connexite.co.uk\/index.php\/wp-json\/wp\/v2\/docs\/6349"}],"wp:attachment":[{"href":"https:\/\/docs.connexite.co.uk\/index.php\/wp-json\/wp\/v2\/media?parent=6362"}],"wp:term":[{"taxonomy":"doc_tag","embeddable":true,"href":"https:\/\/docs.connexite.co.uk\/index.php\/wp-json\/wp\/v2\/doc_tag?post=6362"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}