text stringlengths 0 6.55k |
|---|
Managing the MAC Address Table (Aging, Clearing) |
This chapter closes with a few comments about how switches manage their MAC address tables. Switches do learn MAC addresses, but those MAC addresses do not remain in the table indefinitely. The switch will remove the entries due to age, due to the table filling, and you can remove entries using a command. |
First, for aging out MAC table entries, switches remove entries that have not been used for a defined number of seconds (default of 300 seconds on many switches). To do that, switches |
|||||||||||||||||||| |
|||||||||||||||||||| |
122 CCNA 200-301 Official Cert Guide, Volume 1 |
look at every incoming frame and every source MAC address, and do something related to learning. If it is a new MAC address, the switch adds the correct entry to the table, of course. However, if that entry already exists, the switch still does something: it resets the |
inactivity timer back to 0 for that entry. Each entry’s timer counts upward over time to mea-sure how long the entry has been in the table. The switch times out (removes) any entries whose timer reaches the defined aging time. |
Example 5-7 shows the aging timer setting for the entire switch. The aging time can be con-figured to a different time, globally and per-VLAN using the mac address-table aging-time time-in-seconds [vlan vlan-number] global configuration command. The example shows a case with all defaults, with the global setting of 300... |
Example 5-7 The MAC Address Default Aging Timer Displayed |
SW1# show mac address-table aging-time |
Global Aging Time: 300 |
Vlan Aging Time |
---- ---------- |
SW1# |
SW1# show mac address-table count |
Mac Entries for Vlan 1: |
--------------------------- |
Dynamic Address Count : 4 |
Static Address Count : 0 |
Total Mac Addresses : 4 |
Total Mac Address Space Available: 7299 |
Each switch also removes the oldest table entries, even if they are younger than the aging time setting, if the table fills. The MAC address table uses content-addressable memory (CAM), a physical memory that has great table lookup capabilities. However, the size of the table depends on the size of the CAM in a particu... |
Finally, you can remove the dynamic entries from the MAC address table with the clear mac address-table dynamic command. Note that the show commands in this chapter can be executed from user and enable mode, but the clear command happens to be an enable mode command. The command also allows parameters to limit the type... |
■ By VLAN: clear mac address-table dynamic vlan vlan-number |
■ By Interface: clear mac address-table dynamic interface interface-id |
■ By MAC address: clear mac address-table dynamic address mac-address |
|||||||||||||||||||| Technet24 |
|||||||||||||||||||| |
Chapter 5: Analyzing Ethernet LAN Switching 123 |
MAC Address Tables with Multiple Switches |
Finally, to complete the discussion, it helps to think about an example with multiple switch-es, just to emphasize how MAC learning, forwarding, and flooding happen independently on each LAN switch. |
Consider the topology in Figure 5-10, and pay close attention to the port numbers. The ports were purposefully chosen so that neither switch used any of the same ports for this example. That is, switch SW2 does have a port F0/1 and F0/2, but I did not plug any devices into those ports when making this example. Also not... |
Fred 0200.1111.1111 |
Wilma 0200.3333.3333 |
F0/1 F0/3 5 SW1 G0/1 G0/2 SW2 |
F0/2 F0/4 |
Barney 0200.2222.2222 |
Betty 0200.4444.4444 |
Figure 5-10 Two-Switch Topology Example |
Think about a case in which both switches learn all four MAC addresses. For instance, that would happen if the hosts on the left communicate with the hosts on the right. SW1’s MAC address table would list SW1’s own port numbers (F0/1, F0/2, and G0/1) because SW1 uses that information to decide where SW1 should forward ... |
Example 5-8 The MAC Address Table on Two Switches |
SW1# show mac address-table dynamic |
Mac Address Table |
------------------------------------------- |
Vlan Mac Address |
---- ----------- |
1 0200.1111.1111 |
1 0200.2222.2222 |
1 0200.3333.3333 |
1 0200.4444.4444 |
Type Ports |
-------- ----- |
DYNAMIC Fa0/1 |
DYNAMIC Fa0/2 |
DYNAMIC Gi0/1 |
DYNAMIC Gi0/1 |
Total Mac Addresses for this criterion: 4 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.