H3C S3610[5510] Series Ethernet Switches Operation Manual-Release 0001-(V1.02)

HomeSupportSwitchesH3C S3610[S5510] Switch SeriesConfigure & DeployConfiguration GuidesH3C S3610[5510] Series Ethernet Switches Operation Manual-Release 0001-(V1.02)
06-MAC Address Table Management Operation
Title Size Download
06-MAC Address Table Management Operation 65 KB

Chapter 1  MAC Address Table Management

1.1  Introduction to MAC Address Table Management

1.1.1  Introduction to MAC Address Table

An Ethernet switch needs to maintain a MAC address table to speed up packet forwarding. A table entry includes the MAC address of a device connected to the Ethernet switch, the interface number, and VLAN ID of the Ethernet switch connected to the device.

A MAC address table includes both static and dynamic address entries.

l           Static entries are manually configured by users and will never be aged out.

l           Dynamic entries can be manually configured by users or dynamically learned by the Ethernet switch. Dynamic entries can be aged out (if a dynamic entry has its aging time configured as aging, it will be aged out; if its aging time is configured as no-aging, the entry will not be aged out).

Figure 1-1 illustrates how an Ethernet switch learns a MAC addresses: after receiving a data frame from a port (assumed as port 1), the Ethernet switch analyzes its source MAC address (assumed as MAC-SOURCE) and considers that the packets destined for MAC-SOURCE can be forwarded through port 1. If the table contains the MAC-SOURCE, the Ethernet switch will update the corresponding entry, otherwise, it will add the new MAC address and the corresponding port 1 as a new entry to the table.

Figure 1-1 MAC address learning process

 

&  Note:

During MAC address learning, static MAC addresses that are manually configured by users will not be overwritten by dynamic MAC addresses. However, the latter can be overwritten by the former.

 

The Ethernet switch forwards packets whose destination MAC addresses can be found in the MAC address table and broadcasts those whose destination MAC addresses are not in the table. After the Ethernet switch broadcasts the packet:

l           If the packet reaches the destination network device, the device sends a response packet back which contains the MAC address of this device. The Ethernet switch learns and adds this new MAC address to the MAC address table of the device. The consequent packets destined for the same MAC address can be forwarded directly thereafter.

l           If the packet fails to reach the network device that the MAC address corresponds to, the switch will be unable to learn the MAC address of the destination device because the switch receives no response packet returned from the destination network device.

1.1.2  Classification and Characteristics of MAC Address Entries

Depending on their characteristics and how they are configured, MAC address entries fall into the following three categories:

l           Static MAC address entries: Also known as "permanent addresses", this type of entries are added or deleted manually and will never be aged out. Static address entries can be added manually to reduce the broadcast traffic on a network with minor device changes.

l           Dynamic MAC address entries: These are the MAC address entries that will be aged out after the aging timer configured expires. Dynamic MAC address entries can be generated by the switch through MAC address learning or configured manually.

l           Blackhole MAC address entries: These are special MAC addresses manually configured by users. When the switch receives a packet whose source address or destination address is a blackhole MAC address, the switch discards the packet.

Table 1-1 shows the classification and characteristics of MAC address entries.

Table 1-1 Classification and characteristics of MAC address entries

MAC address entry

Configuration mode

To be aged out or not

Reserved or not after the device is reset (with the configuration saved)

Static MAC address entry

Configured manually by users

No

Yes

Dynamic MAC address entry

Generated by the device through MAC address learning or configured manually by users

Yes

No

Blackhole MAC address entry

Configured manually by users

No

Yes

 

1.2  Configuring the MAC Address Table

1.2.1  Configuring MAC Address Table Entries

Administrators can manually add, modify, or delete the entries in a MAC address table according to actual needs.

Table 1-2 Configure MAC Address Table Entries

Operation

Command

Remarks

Enter system view

system-view

Add/modify a MAC address entry

Add/modify a MAC address entry in system view

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

Either is required.

By default, the MAC address table maintained by the switch contains only the MAC addresses learned.

Add/modify a MAC address entry in Ethernet port view

interface interface-type interface-number

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

 

&  Note:

You cannot configure any dynamic, static, or blackhole MAC address over an aggregated port.

 

1.2.2  Configuring MAC Address Aging Time for the System

Setting the aging time too long will result in a large number of outdated table entries being kept in the MAC address table, and thereby exhausting the MAC address table resources and making it impossible for the Ethernet switch to update the MAC address table according to the network change. On the other hand, if the aging time is set too short, valid MAC address table entries may be deleted by the Ethernet switch. This may cause the switch to broadcast a large number of packets with unknown MAC addresses, resulting in degradation of the switch performance. Therefore, it is important that subscribers set an appropriate aging time according to the actual network environment in order to implement MAC address aging effectively.

Table 1-3 Configure MAC address aging time for the system

To do…

Use the command…

Remarks

Enter system view

system-view

Configure the dynamic MAC address aging time

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

Optional

300 seconds by default

 

&  Note:

The configured MAC address aging time takes effect on all the ports. The address aging only applies to dynamic MAC address entries (those learned by the switch or configured by the user).

 

1.2.3  Configuring the Maximum Number of MAC Addresses that an Ethernet Port or Port Group Can Learn

If the switch maintains an oversize MAC address table, it may take longer for the switch to find the entry corresponding to the destination MAC address for packet forwarding, thus degrading the forwarding performance of the switch. By setting the maximum number of MAC addresses that an Ethernet port can learn, you can limit the number of entries in the Ethernet port MAC address table maintained by the Ethernet switch. If the maximum number of MAC address is set to count, then after the number of learned MAC addresses has reached to count, the interface will no longer learn any more MAC addresses.

You can also configure the switch to forward or not to forward the packets that have not yet been learned by the source MAC address after the maximum number of MAC address entries that can be learned is reached.

Table 1-4 Configure the maximum number of MAC addresses that an Ethernet port or port group can learn

To do…

Use the command…

Remarks

Enter system view

system-view

Enter Ethernet port view or port group view

Enter the Ethernet port view of a specified port

interface interface-type interface-number

At least one required

The consequent configurations apply to the current interface only after entering its interface view; the consequent configurations apply to all ports in a port group after entering the port group view

Enter the port group view of a specified port group

port-group { aggregation agg-id | manual port-group-name }

Configure the maximum number of MAC addresses that can be learned by an Ethernet port or port group

mac-address max-mac-count { count | disable-forwarding }

Required

By default, no limit is configured on the maximum number of MAC addresses that an Ethernet port can learn.

 

1.3  Displaying MAC Address Table Configuration

After the above-mentioned configuration, you can use the display command in any view to display MAC address table operating information, so as to verify configuration result.

Table 1-5 Display MAC address table configuration

To do...

Use the command…

Display the information in the address table

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

Display the aging time of dynamic address table entries

display mac-address aging-time

 

1.4  MAC Address Table Management Configuration Example

1.4.1  Network requirements

The user logs on to the switch through the Console port. Enable the MAC address table management function. Configure the aging time for dynamic table entries on the switch as 500 seconds. Add a static address entry “000f-e20f-dc71” to Ethernet1/0/1 in VLAN 1.

1.4.2  Configuration procedure

# Enter system view of the switch.

<Sysname> system-view

# Add the specified static MAC address entry.

[Sysname] mac-address static 000f-e20f-dc71 interface Ethernet 1/0/1 vlan 1

# Configure the aging time for dynamic MAC address entries on the switch as 500 seconds.

[Sysname] mac-address timer aging 500

# Display MAC address configuration information in any view.

[Sysname] display mac-address interface Ethernet 1/0/1

MAC ADDR        VLAN ID            STATE              PORT INDEX    AGING TIME(s)

000f-e20f-dc71      1  Config static        Ethernet1/0/1       NOAGED

 

  • Cloud & AI
  • InterConnect
  • Intelligent Computing
  • Security
  • SMB Products
  • Intelligent Terminal Products
  • Product Support Services
  • Technical Service Solutions
All Services
  • Resource Center
  • Policy
  • Online Help
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
新华三官网