Displaying and Maintaining MAC Address Table

 

To do…

Use the command…

Remarks

 

Display information about the

display mac-address

 

 

MAC address table

[ display-option ]

The display command can be

 

 

 

 

Display the aging time of the

 

 

display mac-address

executed in any view.

 

dynamic MAC address entries

 

 

aging-time

 

 

in the MAC address table

 

 

 

 

 

 

 

 

Configuration Example

Adding a Static MAC Address Entry Manually

Network requirements

The server connects to the device through GigabitEthernet 1/0/2. To prevent the device from broadcasting packets destined for the server, it is required to add the MAC address of the server to the MAC address table of the device, which then forwards packets destined for the server through GigabitEthernet 1/0/2.

zThe MAC address of the server is 000f-e20f-dc71.

zPort GigabitEthernet 1/0/2 belongs to VLAN 1.

Configuration procedure

# Enter system view.

<device> system-view

# Add a MAC address, with the VLAN, ports, and states specified.

[device] mac-address static 000f-e20f-dc71 interface GigabitEthernet 1/0/2 vlan 1

# Display information about the current MAC address table.

[device] display mac-address interface GigabitEthernet 1/0/2

 

MAC ADDR

VLAN ID STATE

PORT INDEX

AGING TIME(s)

000f-e20f-dc71

1

Config static

GigabitEthernet1/0/2

NOAGED

000f-e20f-a7d6

1

Learned

GigabitEthernet1/0/2

AGING

000f-e20f-b1fb

1

Learned

GigabitEthernet1/0/2

AGING

000f-e20f-f116

1

Learned

GigabitEthernet1/0/2

AGING

--- 4 mac address(es) found on port GigabitEthernet1/0/2 ---

1-8

Page 168
Image 168
3Com WX3000 Displaying and Maintaining MAC Address Table, Configuration Example, Display mac-address, Aging-time