1

I have a topology like this:

enter image description here

the port and mac address map:

Mac address         Interface
-----------         ---------
aa:aa:aa:aa:aa:aa - pc1
bb:bb:bb:bb:bb:bb - pc2
cc:cc:cc:cc:cc:cc - sw1_ac
dd:dd:dd:dd:dd:dd - sw2_ac
ee:ee:ee:ee:ee:ee - sw1_tr
ff:ff:ff:ff:ff:ff - sw2_tr

The 192.168.0.1 and 192.168.0.254 are under Vlan3.

if the PC1(192.168.0.1) communicative the PC2(192.168.0.254) normally. how about will the switch1 and switch2's MAC address tables look like?

To my knowledge, I think it will be like this:

Switch1 Mac address table:

Vlan              Mac Address             Type            Ports
----              -----------------       ------          ------
3                 aa:aa:aa:aa:aa:aa       Dynamic         sw1_ac
3                 bb:bb:bb:bb:bb:bb       Dynamic         sw1_tr


Switch2 Mac address table:

Vlan              Mac Address             Type            Ports
----              -----------------       ------          ------
3                 aa:aa:aa:aa:aa:aa       Dynamic         sw2_tr
3                 bb:bb:bb:bb:bb:bb       Dynamic         sw2_ac

I have some questions about this:

1) Is my write MAC address table correct?
2) Will the switch itself interfaces store in the MAC address table?

4
  • Smells like homework...
    – Zac67
    Mar 4, 2020 at 9:27
  • Every time a frame enters a switch, the switch updates its MAC address table with the source address in the frame header and the interface where the frame entered the switch. One entry per address, but an interface may exist in multiple entries. The MAC address table entries have a limited lifetime, and they will eventually expire.
    – Ron Maupin
    Mar 4, 2020 at 11:29
  • So the switch will not store the MAC address of its own?
    – 244boy
    Mar 7, 2020 at 1:11
  • Why would a switch store its own MAC addresses? It knows where to send frames destined to its own MAC addresses, but it needs to know to which interfaces it should send frames that have MAC addresses external to the switch.
    – Ron Maupin
    Mar 30, 2020 at 21:51

2 Answers 2

2

1) Yes, your table looks correct, the switch will update the MAC-address table when it receives a new frame with the source address from the frame. That way it builds the MAC table of what endpoints are connected to what interface.

2) Any switch that I've seen checked doesn't show it's own interface MAC addresses, nor the in-band management interfaces MAC address in the MAC Address Table. The reason is probably to keep the tables more readable. In your example, if both switches are managed in-band, the switches should show each others MAC addresses in their tables.

2

Adding a few points to Stuggi's answer

  1. MAC address table is also a forwarding table, Just like a IP forwarding table at layer 3. In any forwarding table the format is entity : next hop. Hence a switch will never store its own address in the MAC address table.

Becuase if it would, logically it would mean that:

To reach MAC address aa:bb:cc:dd:ee:ff the next hop is my own interface

This ofcourse would not be correct.

  1. Yes, the switch stores the MAC addresses of incoming frames. This is because, for a forwarding table to be effective it must be populated :) At layer 2 we do not have protocols that switches can run to learn about MAC addresses in their LAN (like we have BGP or OSPF at layer 3). Hence, switch stores the MAC addresses that it receives on its interface. It is called as MAC address learning.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.