Sunday, April 29, 2018

About CAM lookup and how a frame is forwarded

I'm studying to take my CCNP Switch exam sometime soon, and am reading through the Cisco Press book. Only on chapter 2 so far, but I feel I've found an errata, or at least something that seems very misleading.

In my copy of the book, page 34 and listed as a key topic,

"Incoming frames also include the destination MAC address. Again, the switch looks up this address in the address table, hoping to find the switch port and VLAN where the destination address is attached. If found, the frame can be forwarded out the corresponding switch port."

And then on page 36,

"L2 forwarding table: The frame's destination MAC address is used as an index, or key, into the content-addressable memory (CAM), or address, table. If the address is found, the egress switch port and appropriate VLAN ID are read from the table."

To me, this reads as if the destination MAC address determines the VLAN that the frame will be forwarded on, which to the best of my knowledge is absolutely not the case. A switch with multiple VLANs should keep either a separate table for every VLAN, or (more likely) use the VLAN and destination MAC together as the key in the lookup.

I put together a lab in GNS3 that seems to support my understanding. I can share configs and more details if desired, but in short I have an IOSvL2 (layer 3 switch) node running without any SVIs (so just as a L2 switch) that is learning the same MAC address on 4 different VLANs across 4 different access ports, and I have no trouble forwarding either unicast or broadcast traffic within the correct VLAN, proving (in my mind) that the destination MAC does not have any influence on the VLAN.

I can accept that I might be nitpicking a bit about the few quoted statements, but I want to be sure my understanding is good. Specifically, that the VLAN and MAC are used together as the key for a CAM lookup.

If that understanding is not correct, is there any resource that gives more detail on what keeps a frame within its own VLAN in Cisco hardware?



No comments:

Post a Comment