Disabling mac address learning, Disabling global mac address learning, Disabling mac address learning on ports – H3C Technologies H3C S10500 Series Switches User Manual

Page 35

Advertising
background image

24

To do…

Use the command…

Remarks

Add or modify a dynamic or
static MAC address entry

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

Add or modify a blackhole
MAC address entry

mac-address blackhole mac-address vlan
vlan-id

Required
Use either command.
Ensure that you have created the

VLAN and assign the interface to

the VLAN.

Adding or modifying a static or dynamic MAC address table entry on an interface

Follow these steps to add or modify a static or dynamic MAC address table entry in interface view:

To do…

Use the command…

Remarks

Enter system view

system-view

Enter Layer 2 Ethernet
interface view or Layer 2

aggregate interface view

interface interface-type
interface-number

Add or modify a static or
dynamic MAC address entry

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

Required
Ensure that you have created the VLAN
and assign the interface to the VLAN.

Disabling MAC address learning

Sometimes, you might need to disable MAC address learning to prevent the MAC address table from

being saturated, for example, when your device is being attacked by a large amount of packets with

different source MAC addresses.

Disabling global MAC address learning

Disabling global MAC address learning disables the learning function on all ports.
Follow these steps to disable MAC address learning:

To do…

Use the command…

Remarks

Enter system view

system-view

Disable global MAC address
learning

mac-address mac-learning disable

Required
Enabled by default.

NOTE:

When MAC address learning is disabled, the obtained MAC addresses remain valid until they age out.

Disabling MAC address learning on ports

After enabling global MAC address learning, you can disable the function on a single port, or on all

ports in a port group as needed.
Follow these steps to disable MAC address learning on an interface or a port group:

To do…

Use the command…

Remarks

Enter system view

system-view

Advertising