web analytics

Demonstrating MAC Learning

To see a switches MAC address table, use the show mac address-table command. With
no additional parameters, this command lists all known MAC addresses in the MAC table,
including some overhead static MAC addresses that you can ignore. To see all the dynamically
learned MAC addresses only, instead use the show mac address-table dynamic command.

The examples in this chapter use almost no configuration, as if you just unboxed the switch
when you first purchased it. For the examples, the switches have no configuration other
than the hostname command to set a meaningful hostname. Note that to do this in lab, all I
did was

■ Use the erase startup-config EXEC command to erase the startup-config file
■ Use the delete vlan.dat EXEC command to delete the VLAN configuration details
■ Use the reload EXEC command to reload the switch (thereby using the empty startupconfig,
with no VLAN information configured)
■ Configure the hostname SW1 command to set the switch hostname

Once done, the switch starts forwarding and learning MAC address, as demonstrated in
Example 7-1.
Example 7-1 show mac address-table dynamic for Figure 7-7
Free CISCO CCNA Routing and Switching ICND1 Study Guide

First, focus on two columns of the table: the Mac Address and Ports columns of the table.
The values should look familiar: they match the earlier single-switch example, as repeated
here as Figure 7-9. Note the four MAC addresses listed, along with their matching ports, as
shown in the figure.

Free CISCO CCNA Routing and Switching ICND1 Study Guide
Figure 7-9 Single Switch Topology Used in Verification Section

Next, look at the Type field in the header. The column tells us whether the MAC address
was learned by the switch as described earlier in this chapter. You can also statically predefine
MAC table entries using a couple of different features, including port security, and
those would appear as Static in the Type column.

Finally, the VLAN column of the output gives us a chance to briefly discuss how VLANs
impact switching logic. LAN switches forward Ethernet frames inside a VLAN. What that
means is if a frame enters via a port in VLAN 1, then the switch will forward or flood that
frame out other ports in VLAN 1 only, and not out any ports that happen to be assigned to
another VLAN. Chapter 11, “Implementing Ethernet Virtual LANs,” looks at all the details
of how switches forward frames when using VLANs.

Subscribe To Get

Latest IT certification News 

Help You Pass Any IT Exam