Locating the Problem of MAC Address Learning

Created: Mar 31, 2017 14:40:37Latest reply: Jun 7, 2018 09:43:42 4853 4 2 1

Many people ask me why MAC address entries cannot be learned. Give a man a fish and you feed him for a day. Teach a man to fish and you feed him for a lifetime. I share the following experience with all of you.

12.gifFirstly, I explain the principle behind the MAC address.

?? What is the MAC address?

A Media Access Control (MAC) uniquely identifies a device and is assigned by IETF to a vendor. A MAC address consists of 48 bits and is usually displayed as 12 bits, in dotted hexadecimal notation. The first 6 bits of a MAC address represent an Organizationally Unique Identifier (OUI), and the last 6 bits are assigned by vendors.

For example, the 48-bit MAC address of 000000001110000011111100001110011000000000110100 is displayed as 00e0.fc39.8034 (12 bits in dotted hexadecimal notation). 00e0.fc is the OUI assigned by the IEEE to Huawei, and 39.8034 is assigned by Huawei.

?? What is the relationship between the MAC address, MAC address entry, and MAC address table?

The MAC address table consists of MAC address entries. A MAC address entry is composed of the MAC address, VLAN ID, and interface number. Here, MAC address entries are not learned.

?? How are MAC address entries learned?

When receiving a data frame, the switch parses the source MAC address and VLAN ID of the data frame together with the interface that receives the data frame. The following figure shows a MAC address entry.

20170331143952685002.jpg

?? What will happen if MAC address entries are not learned?

Problem 1: A MAC address entry guides unicast forwarding of packets. The switch broadcasts a packet where the destination MAC address cannot be found in the MAC address table. As a result, bandwidth is occupied and network resources are wasted.

Problem 2: The device learns MAC address entries after receiving packets. The possible cause is that the switch may not receive packets. Communication between devices fails in this case.

12.gifI will describe how to troubleshoot the problem that MAC address entries are not learned.

?? Step 1: Check whether the interface receives packets.

Run the reset counters interface GigabitEthernet3/0/0 command in the user view to clear statistics on the interface, and then run the display interface GigabitEthernet 3/0/0 command in the user view to check whether the statistics on incoming packets is 0.

http://support.huawei.com/ecommunity/showimage-10092113-10132081-083194e69a94eb040cff07d3bb44ed6e.jpgTips: In complex scenarios, the non-0 statistics on incoming packets do not indicate that the interface receives packets with the specified MAC address. In this case, collect traffic statistics based on source MAC addresses to determine whether the interface receives packets with the specified MAC address. If permitted, use the packet obtaining tools to obtain packets and determine whether the interface receives packets with the specified MAC address.

?? Step 2: Check whether the device configuration is correct.

1.?????? Check whether VLANs are created and interfaces are added to VLANs.

Run the display vlan vlan-id command in any view to check whether VLANs are created and whether interfaces are added to VLANs.

2.?????? Check whether the interface is disabled from learning MAC address entries.

Run the display this command in the interface view to check whether the mac-address learning disable command configuration exists.

3.?????? Check whether MAC address limiting is configured on the interface.

Run the display this command in the interface view to check whether the mac-limit maximum command configuration exists.

4.?????? Check whether the device is disabled from learning MAC address entries in a VLAN.

Run the display this command in the VLAN view to check whether the mac-address learning disable command configuration exists.

5.?????? Check whether MAC address limiting is configured in the VLAN.

Run the display this command in the VLAN view to check whether the mac-limit maximum command configuration exists.

http://support.huawei.com/ecommunity/showimage-10092113-10132081-083194e69a94eb040cff07d3bb44ed6e.jpgTips: After you run the display this command in the interface view, there are many configurations. How do we quickly find out the required configuration? Run the display this | include mac-address command to check commands containing mac-address.

?? Step 3: Check whether the interface is blocked.

1.?????? Check whether the interface is blocked by a spanning tree protocol.

Run the display stp brief command in any view the check the interface status.

2.?????? Check whether the interface is blocked by LBDT or LDT.

Run the display loop-detection command in any view to check whether the interface is blocked by LDT. Run the display loopback-detect command in any view to check whether the interface is blocked by LBDT.

http://support.huawei.com/ecommunity/showimage-10092113-10132081-083194e69a94eb040cff07d3bb44ed6e.jpgTips: The interface is blocked. Is this situation normal? Check whether a loop prevention or detection protocol needs to be enabled on the interface according to the networking. If the loop prevention or detection protocol needs to be enabled on the interface and the interface is blocked correctly, the situation that the interface does not learn MAC addresses is normal.

12.gifI will locate the problem that MAC addresses are not learned.

12.gifTypical problem 1: An interface is not added to a VLAN. As a result, MAC addresses are not learned.

?? Networking

PC1 and PC2 belong to the same network segment and in VLAN 10, and communicate with each other through two switches.

20170331143954820004.png

?? Problem Description

PC1 cannot ping PC2.

20170331143954626005.png

Switch1 learns the MAC address of PC1.

20170331143955237006.jpg

Switch2 does not learn the MAC address of PC1.

20170331143956274007.jpg

?? Location

Step 1: Check whether GE0/0/2 on Switch2 can receive packets.

20170331143957713008.png

The statistics on incoming packets are 0, that is, GE0/0/2 does not receive packets. Why GE0/0/2 cannot receive packets?

Step 2: Check whether the device configuration is correct.

1.??????? Check whether a VLAN is created and whether an interface is added to the VLAN.

20170331143958446009.png

VLAN 10 has been created, but GE0/0/2 is not added to VLAN 10. Add GE0/0/2 to VLAN 10 and perform the ping operation.

20170331143959185010.png

The ping operation is successful. Let's check MAC address entries.

20170331144000179011.png

The MAC address entry has been learned.

12.gifTypical problem 2: The interface is blocked by STP. As a result, MAC address entries are not learned.

?? In VLAN 100, GE3/0/0 cannot learn the MAC address of 00e-fc01-0001.

?? Location

Step 1: Check whether the interface receives packets.

20170331144000333012.png

The preceding figure shows that the interface receives packets. Among the received packets, are there packets with the source MAC address of 00e-fc01-0001? Check traffic statistics based on source MAC addresses.

1.?????? Configure a traffic policy.

20170331144001374013.png

2.?????? Apply the traffic policy to GE3/0/0.

20170331144003287014.jpg

3.?????? Check whether there are statistics.

20170331144004408015.png

The preceding figure shows that the statistics on packets with the source MAC address of GE3/0/0 are not 0. That is, the interface receives packets. Perform further analysis.

Step 2: Check whether the device configuration is correct.

1.?????? Check the first item. Check whether a VLAN is created and an interface is added to the VLAN.

20170331144005498016.jpg

The preceding figure shows that VLAN 100 has been created and GE3/0/0 has been added to VLAN 100.

2.?????? Check the second and third items. Check whether the interface is disabled from learning MAC addresses and whether the maximum number of MAC addresses that can be learned is set.

20170331144006864017.jpg

The preceding figure shows that the two configurations are not performed.

3.?????? Check the fourth and fifth items. Check whether the device is disabled from learning MAC addresses in a VLAN and whether the maximum number of MAC addresses that can be learned is set.

20170331144007714018.png

The preceding figure shows that the two configurations are not performed.

Proceed to step 3.

Step 3: Check whether the interface is blocked.

1.?????? Check whether the interface is blocked by STP.

20170331144008080019.jpg

The preceding figure shows that the interface is blocked. Disable STP and check whether MAC address entries are learned.

20170331144009038020.jpg

The interface learns the MAC address entry. The interface does not learn MAC address entries because it is blocked.

Check whether the interface is correctly blocked by STP according to the networking. If the interface is correctly blocked, the situation that MAC address entries are not learned is normal.

12.gifThe presentation is over. I will explain MAC address flapping in the following issue.

?

  • x
  • convention:

gululu     Created Mar 31, 2017 14:52:23 Helpful(0) Helpful(0)

thanks!
  • x
  • convention:

Come on!
6901443174300     Created Jun 7, 2018 08:56:59 Helpful(0) Helpful(0)

6901443174300
  • x
  • convention:

6901443174300     Created Jun 7, 2018 09:20:29 Helpful(0) Helpful(0)

Posted by gululu at 2017-03-31 14:52 thanks!
6901443174300
  • x
  • convention:

gululu     Created Jun 7, 2018 09:43:42 Helpful(0) Helpful(0)

hi,what is your question?you can tell us in detail,thanks!
  • x
  • convention:

Come on!

Reply

Reply
You need to log in to reply to the post Login | Register

Notice: To protect the legitimate rights and interests of you, the community, and third parties, do not release content that may bring legal risks to all parties, including but are not limited to the following:
  • Politically sensitive content
  • Content concerning pornography, gambling, and drug abuse
  • Content that may disclose or infringe upon others ' commercial secrets, intellectual properties, including trade marks, copyrights, and patents, and personal privacy
Do not share your account and password with others. All operations performed using your account will be regarded as your own actions and all consequences arising therefrom will be borne by you. For details, see " Privacy."
If the attachment button is not available, update the Adobe Flash Player to the latest version!
Fast reply Scroll to top