04-Layer 2 - LAN Switching Command Reference

HomeSupportSwitchesH3C S12500 Switch SeriesReference GuidesCommand ReferencesH3C S12500 Command References-Release7374-6W73104-Layer 2 - LAN Switching Command Reference
01-MAC address table commands
Title Size Download
01-MAC address table commands 136.72 KB

The MAC address table contains only Layer 2 Ethernet interfaces and Layer 2 aggregate interfaces.

This document covers the configuration of unicast MAC address entries, including static, dynamic, blackhole, and multiport unicast MAC address entries. For more information about configuring static multicast MAC address entries, see IP Multicast Configuration Guide.

display mac-address

Use display mac-address to display MAC address entries.

Syntax

display mac-address [ mac-address [ vlan vlan-id ] | [ [ dynamic | static ] [ interface interface-type interface-number ] | blackhole | multiport ] [ vlan vlan-id ] [ count ] ]

Views

Any view

Predefined user roles

network-admin

network-operator

mdc-admin

mdc-operator

Parameters

mac-address: Specifies a MAC address in the format of H-H-H. When entering a MAC address, you can omit the leading zeros in each H section. For example, enter f-e2-1 for 000f-00e2-0001.

vlan vlan-id: Specifies a VLAN. The value range for the vlan-id argument is 1 to 4094.

dynamic: Displays dynamic MAC address entries.

static: Displays static MAC address entries.

interface interface-type interface-number: Specifies an interface by its type and number.

blackhole: Displays blackhole MAC address entries.

multiport: Displays multiport unicast MAC address entries.

count: Displays only the number of MAC address entries that match all entry attributes you specify in the command. Detailed information about MAC address entries is not displayed. For example, you can use the display mac-address vlan 20 dynamic count command to display the number of dynamic entries for VLAN 20. If no entry attribute is specified, the command displays the number of entries in the MAC address table. If this keyword is not specified, the command displays detailed information about specified MAC address entries.

Usage guidelines

A MAC address entry contains a destination MAC address, an outgoing interface, and a VLAN ID.

If you execute this command without specifying any parameters, it displays all MAC address entries.

This command displays dynamic MAC address entries for an aggregate interface only when the aggregate interface has at least one Selected member port.

Examples

# Display MAC address entries for VLAN 100.

<Sysname> display mac-address vlan 100

MAC Address      VLAN ID    State            Port/NickName            Aging

0001-0101-0101   100        Multiport        GE3/0/1                  N

                                             GE3/0/2

0033-0033-0033   100        Blackhole        N/A                      N

0000-0000-0002   100        Static           GE3/0/3                  N

00e0-fc00-5829   100        Learned          GE3/0/4                  Y

# Display the number of MAC address entries.

<Sysname> display mac-address count

1 mac address(es) found.

Table 1 Command output

Field

Description

VLAN ID

ID of the VLAN to which the outgoing interface of the MAC address entry belongs.

State

MAC address entry state:

·     StaticStatic MAC address entry.

·     LearnedDynamic MAC address entry. Dynamic entries can be learned or manually configured.

·     BlackholeBlackhole MAC address entry.

·     MultiportMultiport unicast MAC address entry.

Port/NickName

When the field displays an interface name, the field indicates the outgoing interface for packets that are destined for the MAC address. This field displays N/A for a blackhole MAC address entry.

Aging

Whether the entry can age out:

·     Y—The entry can age out.

·     N—The entry never ages out.

mac address(es) found

Number of matching MAC address entries.

 

Related commands

·     mac-address

·     mac-address timer

display mac-address aging-time

Use display mac-address aging-time to display the aging timer for dynamic MAC address entries.

Syntax

display mac-address aging-time

Views

Any view

Predefined user roles

network-admin

network-operator

mdc-admin

mdc-operator

Examples

# Display the aging timer for dynamic MAC address entries.

<Sysname> display mac-address aging-time

MAC address aging time: 300s.

Related commands

mac-address timer

display mac-address mac-learning

Use display mac-address mac-learning to display the global MAC address learning status and the MAC learning status of the specified interface or all interfaces.

Syntax

display mac-address mac-learning [ interface interface-type interface-number ]

Views

Any view

Predefined user roles

network-admin

network-operator

mdc-admin

mdc-operator

Parameters

interface interface-type interface-number: Specifies an interface by its type and number. If you do not specify an interface, the command displays the MAC address learning status of all interfaces.

Examples

# Display the global MAC address learning status and the MAC learning status of all interfaces.

<Sysname> display mac-address mac-learning

Global MAC address learning status: Enabled.

 

Port                        Learning Status

GE3/0/1                     Enabled

GE3/0/2                     Enabled

GE3/0/3                     Enabled

GE3/0/4                     Enabled

Table 2 Command output

Field

Description

Global MAC address learning status

Global MAC address learning status:

·     Enabled.

·     Disabled.

Learning Status

MAC address learning status of an interface:

·     Enabled.

·     Disabled.

 

Related commands

mac-address mac-learning enable

display mac-address mac-move

Use display mac-address mac-move to display the MAC address move records after the device is started.

Syntax

In standalone mode:

display mac-address mac-move [ slot slot-number ]

In IRF mode:

display mac-address mac-move [ chassis chassis-number [ slot slot-number ] ]

Views

Any view

Predefined user roles

network-admin

network-operator

mdc-admin

mdc-operator

Parameters

slot slot-number: Specifies a card. The slot-number argument represents the number of the slot that houses the card. If this option is not specified, the command displays MAC address move records on all cards. (In standalone mode.)

chassis chassis-number slot slot-number: Specifies a card of an IRF member device. (In IRF mode.)

·     The chassis-number argument represents the ID of the IRF member device.

·     The slot-number argument represents the number of the slot that houses the card.

·     If neither chassis chassis-number nor slot slot-number is specified, the command displays the MAC address move records on all cards of an IRF fabric.

·     If chassis chassis-number is specified and slot slot-number is not specified, the command displays the MAC address move records on all cards of the specified IRF member device.

Usage guidelines

When MAC address moves for a MAC address always occur between the specified two interfaces, Layer 2 loops might occur on the network. To discover and locate loops, you can view the MAC address move records:

·     In the MAC address move records, records with the same MAC address, VLAN, source port, and new port are considered to be the same record.

·     A card can save a maximum of 20 MAC address move records. When the number of MAC address move records exceeds 20, the most recent record will override the oldest record based on the last MAC address move time. (In standalone mode.)

·     Each card of an IRF member device can save a maximum of 20 MAC move records. When the number of MAC address move records exceeds 20, the most recent record will override the oldest record based on the last MAC address move time. (In IRF mode.)

Examples

# (In IRF mode.) Display the MAC address move records on all cards.

<Sysname> display mac-address mac-move

-------------chassis 2 slot 5 MAC address moving information----------

MAC address    VLAN Current port  Source port   Last time              Times

000f-e212-3500    1    GE2/5/0/2    GE2/5/0/4   2013-06-06 09:55:28        7

000f-e212-3500    1    GE2/5/0/4    GE2/5/0/2   2013-06-06 09:55:28        5

 

---  4 MAC address moving records found  ---

Table 3 Command output

Field

Description

MAC address

MAC address.

VLAN

VLAN to which the outgoing interface of the MAC address belongs.

Current port

Interface to which the MAC address was moved.

Source port

Interface from which the MAC address was moved.

Last time

Last time when the MAC address was moved.

Times

Number of MAC address moves after the device is started. For a MAC address record, the number of MAC address moves is increased by 1 when a new MAC address move has the same MAC address, VLAN, Current Port, and Source Port fields as the MAC address record.

 

Related commands

mac-address notification mac-move

mac-address (interface view)

Use mac-address to add or modify a MAC address entry on an interface.

Use undo mac-address to delete a MAC address entry on an interface.

Syntax

mac-address { dynamic | multiport | static } mac-address vlan vlan-id

undo mac-address { dynamic | multiport | static } mac-address vlan vlan-id

Default

An interface is not configured with MAC address entries.

Views

Layer 2 Ethernet interface view, Layer 2 aggregate interface view

Predefined user roles

network-admin

mdc-admin

Parameters

dynamic: Specifies dynamic MAC address entries.

static: Specifies static MAC address entries.

multiport: Specifies multiport unicast MAC address entries. A frame whose destination MAC address matches a multiport unicast MAC address entry is sent out of multiple ports.

mac-address: Specifies a MAC address in the format of H-H-H, excluding multicast and all-zero MAC addresses. When entering a MAC address, you can omit the leading zeros in each H section. For example, enter f-e2-1 for 000f-00e2-0001.

vlan vlan-id: Specifies an existing VLAN to which the specified interface belongs. The value range for the vlan-id argument is 1 to 4094.

Usage guidelines

Typically, the device automatically builds the MAC address table by learning the source MAC addresses of incoming frames on each interface. However, you can manually configure static MAC address entries. For a MAC address, a manually configured static entry takes precedence over a dynamically learned entry. To improve the security for the user device connected to an interface, manually configure a static entry to bind the user device to the interface. Then, the frames destined for the user device (for example, Host A) are always sent out of the interface. Other hosts using the forged MAC address of Host A cannot obtain the frames destined for Host A.

The MAC address entry configuration cannot survive a reboot unless you save it. The dynamic MAC address entries, however, are lost upon reboot whether or not you save the configuration.

The mac-address multiport command specifies the MAC address for a multiport unicast MAC address entry. The ipv6 neighbor command specifies the MAC address for a static neighbor entry. In IRF mode, to avoid a conflict, make sure these two MAC addresses are different. For more information about static neighbor entries, see Layer 3—IP Services Configuration Guide.

The multiport unicast MAC address entries on an Ethernet interface might not take effect after the Ethernet interface joins an aggregation group. H3C recommends that you configure multiport unicast MAC address entries on aggregate interfaces in Layer 2 aggregate interface view.

Examples

# Add a static entry for MAC address 000f-e201-0101 on interface GigabitEthernet 3/0/1 that belongs to VLAN 2.

<Sysname> system-view

[Sysname] interface GigabitEthernet 3/0/1

[Sysname-GigabitEthernet3/0/1] mac-address static 000f-e201-0101 vlan 2

# Add a static entry for MAC address 000f-e201-0101 on Layer 2 aggregate interface Bridge-Aggregation 1 that belongs to VLAN 1.

<Sysname> system-view

[Sysname] interface bridge-aggregation 1

[Sysname-Bridge-Aggregation1] mac-address static 000f-e201-0102 vlan 1

# Add a multiport unicast MAC address entry for MAC address 0001-0001-0101 on GigabitEthernet 3/0/1 and GigabitEthernet 3/0/2 that belong to VLAN 2.

<Sysname> system-view

[Sysname] interface GigabitEthernet 3/0/1

[Sysname-GigabitEthernet3/0/1] mac-address multiport 0001-0001-0101 vlan 2

[Sysname-GigabitEthernet3/0/1] quit

[Sysname] interface GigabitEthernet 3/0/2

[Sysname-GigabitEthernet3/0/2] mac-address multiport 0001-0001-0101 vlan 2

Related commands

·     display mac-address

·     mac-address (system view)

mac-address (system view)

Use mac-address to add or modify a MAC address entry.

Use undo mac-address to delete one or all MAC address entries.

Syntax

mac-address { dynamic | static } mac-address interface interface-type interface-number vlan vlan-id

mac-address blackhole mac-address vlan vlan-id

mac-address multiport mac-address interface interface-list vlan vlan-id

undo mac-address [ [ dynamic | static ] mac-address interface interface-type interface-number vlan vlan-id ]

undo mac-address [ blackhole | dynamic | static ] [ mac-address ] vlan vlan-id

undo mac-address [ dynamic | static ] interface interface-type interface-number

undo mac-address multiport mac-address interface interface-list vlan vlan-id

undo mac-address [ multiport ] [ [ mac-address ] vlan vlan-id ]

Default

The system is not configured with MAC address entries.

Views

System view

Predefined user roles

network-admin

mdc-admin

Parameters

dynamic: Specifies dynamic MAC address entries.

static: Specifies static MAC address entries.

blackhole: Specifies blackhole MAC address entries. The packets whose source or destination MAC addresses match blackhole MAC address entries are dropped.

multiport: Specifies multiport unicast MAC address entries. A frame whose destination MAC address matches a multiport unicast MAC address entry is sent out of multiple ports.

mac-address: Specifies a MAC address in the format of H-H-H, excluding multicast and all-zero MAC addresses. When entering a MAC address, you can omit the leading zeros in each H section. For example, enter f-e2-1 for 000f-00e2-0001.

vlan vlan-id: Specifies an existing VLAN to which the interface belongs. The value range for the vlan-id argument is 1 to 4094.

interface interface-type interface-number: Specifies an outgoing interface by its type and number.

interface interface-list: Specifies interfaces in the format of { interface-type interface-number [ to interface-type interface-number ] } &<1-n>. The interface type can be the Layer 2 Ethernet interface or Layer 2 aggregate interface. &<1-n> specifies that you can configure a maximum of n interfaces or interface ranges. The value range for n is 1 to 4.

Usage guidelines

Typically, the device automatically builds the MAC address table by learning the source MAC addresses of incoming frames on each interface. However, you can manually configure static MAC address entries. For a MAC address, a manually configured static entry takes precedence over a dynamically learned entry. To improve the security for the user device connected to an interface, manually configure a static entry to bind the user device to the interface. Then, the frames destined for the user device (for example, Host A) are always sent out of the interface. Other hosts using the forged MAC address of Host A cannot obtain the frames destined for Host A.

To drop the packets with the specified source MAC addresses or destination MAC addresses, you can configure blackhole MAC address entries.

To send frames with a specific destination MAC address out of multiple ports, configure a multiport unicast MAC address entry. When you execute this command for the first time, the command adds a MAC address entry. When you execute the command again with the same MAC address and VLAN but with different interfaces, this command adds the specified interfaces for this entry.

A static or blackhole MAC address entry can overwrite a dynamic MAC address entry, but not vice versa.

If you execute the undo mac-address command without specifying any parameters, the command deletes all unicast MAC address entries and static multicast MAC address entries.

You can delete all the MAC address entries (including unicast MAC address entries and static multicast MAC address entries) of the specified VLAN. You can also delete only one type (dynamic, static, blackhole, or multiport unicast) of MAC address entries. You can single out an interface and delete the corresponding unicast MAC address entries, but not the corresponding static multicast MAC address entries.

The MAC address entry configuration cannot survive a reboot unless you save it. The dynamic MAC address entries, however, are lost upon reboot whether or not you save the configuration.

The mac-address multiport command specifies the MAC address for a multiport unicast MAC address entry. The ipv6 neighbor command specifies the MAC address for a static neighbor entry. In IRF mode, to avoid a conflict, make sure these two MAC addresses are different. For more information about static neighbor entries, see Layer 3—IP Services Configuration Guide.

The multiport unicast MAC address entries on an Ethernet interface might not take effect after the Ethernet interface joins an aggregation group. H3C recommends that you configure multiport unicast MAC address entries on aggregate interfaces in Layer 2 aggregate interface view.

Examples

# Add a static entry for MAC address 000f-e201-0101. Then, all frames that are destined for this MAC address are sent out of interface GigabitEthernet 3/0/1, which belongs to VLAN 2.

<Sysname> system-view

[Sysname] mac-address static 000f-e201-0101 interface GigabitEthernet 3/0/1 vlan 2

# Add a multiport unicast MAC address entry for MAC address 000f-e201-0101. Then, all frames that are destined for this MAC address are sent out of GigabitEthernet 3/0/1 through GigabitEthernet 3/0/3, which belong to VLAN 2.

<Sysname> system-view

[Sysname] mac-address multiport 000f-e201-0101 interface GigabitEthernet 3/0/1 to GigabitEthernet 3/0/3 vlan 2

Related commands

·     display mac-address

·     mac-address (interface view)

mac-address mac-learning enable

Use mac-address mac-learning enable to enable MAC address learning on an interface or on a VLAN.

Use undo mac-address mac-learning enable to disable MAC address learning on an interface or on a VLAN.

Syntax

mac-address mac-learning enable

undo mac-address mac-learning enable

Default

MAC address learning is enabled.

Views

VLAN view, Layer 2 Ethernet interface view, Layer 2 aggregate interface view

Predefined user roles

network-admin

mdc-admin

Usage guidelines

To prevent the MAC address table from becoming saturated, you can disable MAC address learning.

For example, a number of packets with different source MAC addresses reaching a device can affect the MAC address table update. To avoid such attacks, you can disable MAC address learning for an interface or VLAN.

Because disabling MAC address learning can result in broadcast storms, enable broadcast storm suppression after you disable MAC address learning on an interface. For more information about broadcast storm suppression, see Interface Configuration Guide.

After MAC address learning is disabled, the existing dynamic MAC addresses age out still based on the aging mechanism.

Examples

# Disable MAC address learning for VLAN 10.

<Sysname> system-view

[Sysname] vlan 10

[Sysname-vlan10] undo mac-address mac-learning enable

# Disable MAC address learning on interface GigabitEthernet 3/0/1.

<Sysname> system-view

[Sysname] interface GigabitEthernet 3/0/1

[Sysname-GigabitEthernet3/0/1] undo mac-address mac-learning enable

# Disable MAC address learning on interface Bridge-Aggregation 1.

<Sysname> system-view

[Sysname] interface bridge-aggregation 1

[Sysname-Bridge-Aggregation1] undo mac-address mac-learning enable

Related commands

display mac-address mac-learning

mac-address max-mac-count (interface view)

Use mac-address max-mac-count to set the MAC learning limit on an interface.

Use undo mac-address max-mac-count to restore the default.

Syntax

mac-address max-mac-count count

undo mac-address max-mac-count

Default

No MAC learning limit on an interface is set.

Views

Layer 2 Ethernet interface view, Layer 2 aggregate interface view

Predefined user roles

network-admin

mdc-admin

Parameters

count: Sets the maximum number of MAC addresses that can be learned on an interface. When the argument is set to 0, the interface is not allowed to learn MAC addresses. The value range for this argument is 0 to 1048576.

Usage guidelines

This command limits the number of MAC address entries to limit the MAC address table size. A large MAC address table will degrade forwarding performance. When the number of MAC address entries learned by an interface reaches the limit, the interface stops learning MAC address entries.

Examples

# Configure interface GigabitEthernet 3/0/1 to learn a maximum of 600 MAC address entries.

<Sysname> system-view

[Sysname] interface GigabitEthernet 3/0/1

[Sysname-GigabitEthernet3/0/1] mac-address max-mac-count 600

Related commands

·     mac-address

·     mac-address max-mac-count enable-forwarding (interface view)

mac-address max-mac-count (VLAN view)

Use mac-address max-mac-count to set the MAC learning limit for a VLAN.

Use undo mac-address max-mac-count to restore the default.

Syntax

mac-address max-mac-count count

undo mac-address max-mac-count

Default

No MAC learning limit for a VLAN is set.

Views

VLAN view

Predefined user roles

network-admin

mdc-admin

Parameters

count: Sets the maximum number of MAC addresses that can be learned for a VLAN. When the argument is set to 0, the VLAN is not allowed to learn MAC addresses. The value range for this argument is 0 to 1048576.

Usage guidelines

This command limits the number of MAC address entries limit the MAC address table size. A large MAC address table will degrade forwarding performance. When the number of MAC address entries learned by a VLAN reaches the limit, the VLAN stops learning MAC address entries.

This command does not work on a super VLAN, because a super VLAN has no physical interfaces and cannot learn any MAC addresses. For more information about super VLANs, see Layer 2—LAN Switching Configuration Guide.

Examples

# Configure VLAN 10 to learn a maximum of 600 MAC address entries.

<Sysname> system-view

[Sysname] vlan 10

[Sysname-vlan10] mac-address max-mac-count 600

Related commands

·     mac-address

·     mac-address max-mac-count enable-forwarding (VLAN view)

mac-address max-mac-count enable-forwarding (interface view)

Use mac-address max-mac-count enable-forwarding to enable the device to forward unknown frames received on an interface after the MAC learning limit on the interface is reached.

Use undo mac-address max-mac-count enable-forwarding to disable the device from forwarding unknown frames received on an interface after the MAC learning limit on the interface is reached.

Syntax

mac-address max-mac-count enable-forwarding

undo mac-address max-mac-count enable-forwarding

Default

When the MAC learning limit on an interface is reached, the device can forward unknown frames received on the interface.

Views

Layer 2 Ethernet interface view, Layer 2 aggregate interface view

Predefined user roles

network-admin

mdc-admin

Usage guidelines

Unknown frames refer to frames whose source MAC addresses are not in the MAC address table.

Examples

# Configure GigabitEthernet 3/0/1 to learn a maximum of 600 MAC address entries.

<Sysname> system-view

[Sysname] interface GigabitEthernet 3/0/1

[Sysname-GigabitEthernet3/0/1] mac-address max-mac-count 600

# Disable the device from forwarding unknown frames received on GigabitEthernet 1/0/1 after the MAC learning limit on GigabitEthernet 1/0/1 is reached.

[Sysname-GigabitEthernet3/0/1] undo mac-address max-mac-count enable-forwarding

Related commands

·     mac-address

·     mac-address max-mac-count (interface view)

mac-address max-mac-count enable-forwarding (VLAN view)

Use mac-address max-mac-count enable-forwarding to enable the device to forward unknown frames received by interfaces in a VLAN after the MAC learning limit for the VLAN is reached.

Use undo mac-address max-mac-count enable-forwarding to disable the device from forwarding unknown frames received by interfaces in a VLAN after the MAC learning limit for the VLAN is reached.

Syntax

mac-address max-mac-count enable-forwarding

undo mac-address max-mac-count enable-forwarding

Default

When the MAC learning limit for a VLAN is reached, the device can forward unknown frames received by interfaces in the VLAN.

Views

VLAN view

Predefined user roles

network-admin

mdc-admin

Usage guidelines

Unknown frames refer to frames whose source MAC addresses are not in the MAC address table.

Examples

# Configure VLAN 10 to learn a maximum of 600 MAC address entries.

<Sysname> system-view

[Sysname] vlan 10

[Sysname-vlan10] mac-address max-mac-count 600

# Disable the device from forwarding unknown frames received by interfaces in VLAN 10 after the MAC learning limit for VLAN 10 is reached.

[Sysname-vlan10] undo mac-address max-mac-count enable-forwarding

Related commands

·     mac-address

·     mac-address max-mac-count (VLAN view)

mac-address notification mac-move

Use mac-address notification mac-move to enable MAC address move notifications and optionally set a detection interval.

Use undo mac-address notification mac-move to disable MAC address move notifications.

Syntax

mac-address notification mac-move [ interval interval-value ]

undo mac-address notification mac-move

Default

MAC address move notifications are disabled.

Views

System view

Predefined user roles

network-admin

mdc-admin

Parameters

interval interval-value: Sets a detection interval for MAC address moves, in the range of 1 to 60 minutes. If you do not specify this option, the default setting of 1 minute is used.

Usage guidelines

With MAC address move notifications enabled, the system displays the MAC address move logs when it detects MAC address moves. Each record of the MAC address move logs contains the following information:

·     MAC address.

·     VLAN ID of the MAC address entry.

·     Current port and source port of the MAC address moves.

·     Number of MAC address moves within a detection interval.

To enable the system to display MAC address move logs, perform the following tasks:

1.     Execute the mac-address notification mac-move command.

2.     Execute the snmp-agent trap enable mac-address command to enable SNMP notifications for the MAC address table.

Within a detection interval, each card can display a maximum of 20 MAC address move records. The most recent record will override the oldest one.

Examples

# Enable MAC address move notifications.

<Sysname> system-view

[Sysname] mac-address notification mac-move

[Sysname]

%Jun 14 17:16:45:688 2012 H3C MAC/4/MAC_FLAPPING: MAC address 0000-0012-0034 in VLAN 500 has moved from port GE2/10/0/16 to port GE1/3/0/1 for 1 times

The output shows that:

·     The VLAN ID of MAC address 0000-0012-0034 is VLAN 500.

·     The MAC address moved from interface GigabitEthernet 2/10/2/16 to interface GigabitEthernet 1/3/0/1.

·     The MAC address has moved once within the last 1 minute.

Related commands

display mac-address mac-move

mac-address notification mac-move suppression

Use mac-address notification mac-move suppression to suppress MAC address moves on an interface.

Use undo mac-address notification mac-move suppression to restore the default.

Syntax

mac-address notification mac-move suppression

undo mac-address notification mac-move suppression

Default

MAC address moves are not suppressed on an interface.

Views

Layer 2 Ethernet interface view, Layer 2 aggregate interface view

Predefined user roles

network-admin

mdc-admin

Usage guidelines

With this feature, an interface goes down when a MAC address has been moved to or from the interface more than the specified threshold within a detection interval. You can use the shutdown command and then the undo shutdown command to bring up the interface. Also, the interface can automatically come up after waiting for the suppression interval.

Examples

# Enable MAC address move suppression on GigabitEthernet 3/0/1.

<Sysname> system-view

[Sysname] interface GigabitEthernet 3/0/1

[Sysname-GigabitEthernet3/0/1] mac-address notification mac-move suppression

Related commands

·     mac-address notification mac-move suppression interval

·     mac-address notification mac-move suppression threshold

mac-address notification mac-move suppression interval

Use mac-address notification mac-move suppression interval to set a suppression interval for MAC address moves.

Use undo mac-address notification mac-move suppression interval to restore the default.

Syntax

mac-address notification mac-move suppression interval interval-value

undo mac-address notification mac-move suppression interval

Default

The suppression interval for MAC address moves is 30 seconds.

Views

System view

Predefined user roles

network-admin

mdc-admin

Parameters

interval interval-value: Sets the MAC address move suppression interval in the range of 30 to 86400 seconds.

Usage guidelines

An interface stays down for the specified suppression interval when a MAC address has been moved to or from the interface more than the specified threshold within a detection interval. You can use the mac-address notification mac-move suppression threshold command to set the threshold.

Examples

# Set the suppression interval to 60 seconds for MAC address moves.

<Sysname> system-view

[Sysname] mac-address notification mac-move suppression interval 60

Related commands

·     mac-address notification mac-move suppression

·     mac-address notification mac-move suppression threshold

mac-address notification mac-move suppression threshold

Use mac-address notification mac-move suppression threshold to set a threshold for MAC address moves sourced from or destined for an interface within a detection interval.

Use undo mac-address notification mac-move suppression threshold to restore the default.

Syntax

mac-address notification mac-move suppression threshold threshold-value

undo mac-address notification mac-move suppression threshold

Default

The threshold is 3.

Views

System view

Predefined user roles

network-admin

mdc-admin

Parameters

threshold-value: Sets the threshold for MAC address moves sourced from or destined for an interface within a detection interval. The value range for this argument is 0 to 1024.

Usage guidelines

The system shuts down an interface when the following conditions exist:

·     The interface is enabled with MAC address move suppression.

·     The number of MAC address moves sourced from or destined for the interface within a detection interval exceeds the threshold.

Examples

# Set the threshold to 10 for MAC address moves sourced from or destined for an interface within a detection interval.

<Sysname> system-view

[Sysname] mac-address notification mac-move suppression threshold 10

Related commands

·     mac-address notification mac-move suppression

·     mac-address notification mac-move suppression interval

mac-address timer

Use mac-address timer to set the aging timer for dynamic MAC address entries.

Use undo mac-address timer to restore the default.

Syntax

mac-address timer { aging seconds | no-aging }

undo mac-address timer

Default

The aging timer is 300 seconds for dynamic MAC address entries.

Views

System view

Predefined user roles

network-admin

mdc-admin

Parameters

aging seconds: Sets an aging timer for dynamic MAC address entries, in the range of 10 to 86400 seconds.

no-aging: Configures dynamic MAC address entries not to age.

Usage guidelines

To set the aging timer appropriately, follow these guidelines:

·     A long aging interval causes the MAC address table to retain outdated entries and fail to accommodate the latest network changes.

·     A short aging interval results in removal of valid entries. Then, unnecessary broadcast packets appear and affect device performance.

Examples

# Set the aging time to 500 seconds for dynamic MAC address entries.

<Sysname> system-view

[Sysname] mac-address timer aging 500

Related commands

display mac-address aging-time

snmp-agent trap enable mac-address

Use snmp-agent trap enable mac-address to enable SNMP notifications for the MAC address table.

Use undo snmp-agent trap enable mac-address to disable SNMP notifications for the MAC address table.

Syntax

snmp-agent trap enable mac-address [ mac-move ]

undo snmp-agent trap enable mac-address [ mac-move ]

Default

SNMP notifications are enabled for the MAC address table.

Views

System view

Predefined user roles

network-admin

mdc-admin

Parameters

mac-move: Enables SNMP notifications about the MAC address moves for the MAC address table. If this keyword is not specified, the command enables all types of SNMP notifications for the MAC address table.

Usage guidelines

When SNMP notifications are disabled for the MAC address table, MAC address moves are reported in syslog messages.

The MAC address table supports only SNMP notifications about MAC address moves. When you enable or disable SNMP notifications about MAC address moves, you enable or disable all types of SNMP notifications for the MAC address table.

Examples

# Disable SNMP notifications about MAC address moves for the MAC address table.

<Sysname> system-view

[Sysname] undo snmp-agent trap enable mac-address mac-move

Related commands

mac-address notification mac-move


 

  • Cloud & AI
  • InterConnect
  • Intelligent Computing
  • Intelligent Storage
  • Security
  • SMB Products
  • Intelligent Terminal Products
  • Product Support Services
  • Technical Service Solutions
All Services
  • Resource Center
  • Policy
  • Online Help
  • Technical Blogs
All Support
  • Become A Partner
  • Partner Policy & Program
  • Global Learning
  • Partner Sales Resources
  • Partner Business Management
  • Service Business
All Partners
  • Profile
  • News & Events
  • Online Exhibition Center
  • Contact Us
All About Us
新华三官网