web analytics

Learning MAC Addresses

Thankfully , the networking staff does not have to type in all those MAC table entries.
Instead, the switches do their second main function: to learn the MAC addresses and interfaces
to put into its address table. With a complete MAC address table, the switch can make
accurate forwarding and filtering decisions as just discussed.

Switches build the address table by listening to incoming frames and examining the source
MAC address in the frame. If a frame enters the switch and the source MAC address is not
in the MAC address table, the switch creates an entry in the table. That table entry lists the
interface from which the frame arrived. Switch learning logic is that simple.

Figure 7-6 depicts the same single-switch topology network as Figure 7-3, but before the
switch has built any address table entries. The figure shows the first two frames sent in
this network—first a frame from Fred, addressed to Barney, and then Barney’s response,
addressed to Fred.
Free CISCO CCNA Routing and Switching ICND1 Study Guide
Figure 7-6 Switch Learning: Empty Table and Adding Two Entries

(Figure 7-6 depicts the MAC learning process only, and ignores the forwarding process and
therefore ignores the destination MAC addresses.)

Focus on the learning process and how the MAC table grows at each step as shown on the
right side of the figure. The switch begins with an empty MAC table, as shown in the upper
right part of the figure. Then Fred sends his first frame (labeled “1”) to Barney, so the switch
adds an entry for 0200.1111.1111, Fred’s MAC address, associated with interface F0/1.
Why F0/1? The frame sent by Fred entered the switch’s F0/1 port. SW1’s logic runs something
like this: “The source is MAC 0200.1111.1111, the frame entered F0/1, so from my
perspective, 0200.1111.1111 must be reachable out my port F0/1.”

Continuing the example, when Barney replies in Step 2, the switch adds a second entry, this
one for 0200.2222.2222, Barney’s MAC address, along with interface F0/2. Why F0/2? The frame Barney sent entered the switch’s F0/2 interface. Learning always occurs by looking at
the source MAC address in the frame, and adds the incoming interface as the associated port.

Subscribe To Get

Latest IT certification News 

Help You Pass Any IT Exam