When configuring MAC address learning for the TN11TBE board, the user sets the aging time of MAC addresses to T. After the user resets the MAC address aging time, the aging time ranges from 50%*T to 150%*T, that is, the maximum offset is 50%*T.
The aging mechanism of the Layer 2 switching chip used on the TN11TBE board is as follows: The chip sets an aging flag at period T, age the packets with aging flags and delete them from the Layer 2 switching table during the next T period. Thus, the aging time ranges from T to 2T. To reduce the offset, T is divided by 2 and sent to the chip by the optimized software. Therefore, the maximum aging time offset is 50%*T.
After the aging time is reset, MAC addresses restart to age. Test procedures: Set MAC address aging time to five minutes and stop sending packets after the board learns 100 MAC addresses; Reset the MAC address aging time to four minutes; Two minutes later, reset the MAC address aging time to ten minutes. Test results:
The MAC addresses become aged in advance, that is, all the MAC addresses become aged in five minutes.
The aging time tested by using the following methods is accurate:
1. Set the aging time, continuously send packets, and stop sending packets. Then, check whether the MAC addresses are aged when the aging time expires.
2. Continuously send packets, set the aging time, and stop sending packets. Then, check whether the MAC addresses are aged when the aging time expires.