CCENT Answer 102: Switch MAC Learning

 In CCENT-OLD, Q&A

Today’ post gives the letter answer, and explains why, for this latest #CCENT question. The question focuses on switch learning, with a little layer 3 weaved in. Don’t read here until you try the question!

Literal Answer(s):

D

Figure Reference

Figure 102 is just a repeat of the figure from the question, for handy reference.

 

Figure 102: Network Used for Question 102

Explanation: Only Dynamic MAC Table Entries

All the different conditions in the question exist for one reason: to make sure you know that the switches will learn their MAC table entries dynamically, with no static entries. Port security causes the switch to out static MAC addresses into the MAC address table, and the question told us that port security was not used. The question also told us that the switches did not use any statically configured MAC table entries.

In short, the question is about dynamically-learned MAC addresses, and those addresses only.

Explanation: Source and Destination MACs for the Various Frames

The next step is to think about what happens with encapsulation, and the combination of Layers 2 and 3. Based on the topology, and the IPv4 addressing, PC1 and PC4 are in different subnets. The IP packets must flow through router R1. That means the IP packet going from PC1 to PC4 first flows to R1, then from R1 to PC4. And those packets use different Ethernet headers and trailers, with different source and destination MAC addresses, which then impacts switch learning.

So, what addresses are used? PC1 sends its IP packets to PC4’s destination IP address (10.1.2.4), encapsulated in an Ethernet frame. When sent by PC1, that frame has:

  • Source MAC of PC1-MAC
  • Destination MAC of R1-G0/0-MAC

Once R1 receives the frame, it de-encapsulates the IP packet, and re-encapsulates it in a new Ethernet frame, forwarding that frame out its G0/1 interface. That new frame uses these Ethernet addresses:

  • Source MAC of R1-G0/1-MAC
  • Destination MAC of PC4-MAC

Once the packet sent by PC1 arrives at PC4, then PC4 replies. That return IP packet has a similar encapsulation, but with the opposite MAC addresses. First, from PC4 to R1, it has source MAC PC4-MAC and destination MAC R1-G0/1-MAC, and after R1 routes the packet to the left, it has source MAC R1-G0/0-MAC and destination MAC PC1-MAC.

Which Addresses are Learned?

Armed with all these concepts, you can then analyze the question one half at a time. While analyzing all the details, keep the following in mind from the earlier discussions:

  • PC1-MAC is used only in frames to the left side of the router
  • PC4-MAC is used only in frames to the right side of the router

Starting on the simpler LAN, on the right, SW4 receives the following frames:

  • Source R1-G0/1-MAC, coming in G0/2 (a frame holding a packet going from PC1 to PC4)
  • Source PC4-MAC, coming in F0/8 (a frame holding a packet going from PC4 to PC1)

SW4 places these matching facts in its MAC table.

As for the one answer that mentions SW4, note that it also mentions PC1-MAC, and not PC4-MAC or R1-G0/1-MAC. SW4 will not learn PC1-MAC at all.

Now looking at the LAN on the left, SW1 receives the following frames:

  • Source PC1-MAC, coming in F0/1 (a frame holding a packet going from PC1 to PC4)
  • Source R1-G0/0-MAC, coming in F0/3 (a frame holding a packet going from PC4 to PC1)

SW1 places these matching facts in its MAC table. Neither of these happens to match either of the answers.

Finally, SW2 receives the following frames:

  • Source PC1-MAC, coming in F0/4 (a frame holding a packet going from PC1 to PC4)
  • Source R1-G0/0-MAC, coming in F0/5 (a frame holding a packet going from PC4 to PC1)

SW1 places these matching facts in its MAC table. Of these two MAC table entries, the entry for PC1-MAC, off SW2’s port F0/4, matches one of the answers.

CCENT Question 102: Switch MAC Learning
CCENT Question 103: IPv4 ARP Tables
Subscribe
Notify of
guest

1 Comment
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
Bav

Very useful thanks for making these.

1
0
Would love your thoughts, please comment.x
()
x