Skip Links

Network World

Wendell Odom

Inferring the VLAN of a frame (poll)

By wendell on Wed, 10/10/07 - 8:20am.

 

For some exam questions, the question doesn't tell you in which VLAN the frame exists - you must somehow infer it from the available information. Monday's question did exactly that. Unlike last week's CCENT-level layer 2 forwarding question, which specified the incoming interface of a new frame, Monday's question doesn't specify the incoming interface. Instead, it describes the source and destination MAC address, and only that it arrived at the switch (SW1 in this case). Today I'll give a few hints about how to infer which VLAN to use, to help you finish your analysis of Monday's question. For those of you that are finished with Monday's question, I'll add a few details that give you a little more to consider.

FYI, I'll put the answers at the bottom of the post, just so you can continue to ignore them if you want to read today's input into the question. 

For a campus LAN to work, MAC addresses need to be unique inside each VLAN or broadcast domain. However, in most cases, MAC addresses are unique amongst all VLANs, because most devices use their burned-in MACs, and these should be unique in the universe. If you make the assumption that MAC addresses are unique in the entire campus, then you can infer the VLAN of a frame once a switch has learned that MAC address. For example, imagine that a new LAN frame, with source MAC address A, arrives at a switch on interface fa0/7. Once that switch performs the "learning" function, its MAC address table should list A and the incoming interface (fa0/7). If the interface is an access interface, the MAC table lists that interface's access VLAN. If the interface is a trunk, the MAC table lists the VLAN that was listed in the frame's trunking header. Either way, the MAC table identifies the VLAN.  

For Monday's specific question, the frame had source MAC address 0200.1111.1111. To infer the VLAN, just look at SW1's MAC address table, find the one entry for 0200.1111.1111, and note the interface (fa/01) and vlan (2). From this information, we can infer that the frame arrived on Fa0/1, and for forwarding purposes, SW1 should forward the frame based on MAC table entries for VLAN 2, and VLAN 2 only. Once you know the frame is in VLAN 2, because this question just focuses on layer 2 forwarding, you can ignore any information about the other VLANs, just examining details about VLAN 2.

For those of you who want a little more time then to look at the rest of the story, now that you're focused on VLAN 2, I'll defer the rest of the scoop until tomorrow's post.

For those of you finished with Monday's question, let me pose a little scenario that could give you a little (not a lot) more to think about. Imagine that Monday's question was a Simlet. You did several show mac address-table commands on various switches, but to find where the frame went, you could either do "show interfaces trunk" commands (as listed Monday) or the "show spanning-tree" commands listed below. Which method would have led you to the answer more quickly? Or would it be a tie in your case? I'll even pose it as a survey to get a broader response (hey, most anyone will take an extra few seconds to click a survey!)

There's a variation on this question that you might find interesting as well. Monday's question could have listed the output of show spanning-tree commands instead of show interfaces trunk, and you could have still found the right answers to this particular question. For those of you still thinking though the question, consider the following command output as well as the details listed Monday. For the rest of you, if you want a little more to consider, look at the output and see if this output would have helped you find the answer more quickly than the show interfaces trunk commands listed on Monday.

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
! SW1 next
SW1#show spanning-tree vlan 2 active
! lines omitted for brevity

Interface        Role Sts Cost      Prio.Nbr Type
---------------- ---- --- --------- -------- --------------------------------
Fa0/1            Desg FWD 19        128.1    P2p 
Fa0/8            Desg FWD 19        128.8    P2p 
Gi0/1            Desg FWD 4         128.25   P2p 
Gi0/2            Desg FWD 4         128.26   P2p 

SW1#show spanning-tree vlan 2 blockedports 

Name                 Blocked Interfaces List
-------------------- ------------------------------------

Number of blocked ports (segments) in vlan 2: 0

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
! SW2 next
SW2#show spanning-tree vlan 2 blockedports 

Name                 Blocked Interfaces List
-------------------- ------------------------------------
VLAN0002             Fa0/9

Number of blocked ports (segments) in vlan 2: 1

SW2#show spanning-tree vlan 2 active
! lines omitted for brevity 

Interface        Role Sts Cost      Prio.Nbr Type
---------------- ---- --- --------- -------- --------------------------------
Fa0/2            Desg FWD 19        128.2    P2p 
Fa0/9            Altn BLK 19        128.9    P2p 
Gi0/1            Desg FWD 4         128.25   P2p 
Gi0/2            Root FWD 4         128.26   P2p 

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
! SW3 next
SW3#show spanning-tree vlan 2 active
! lines omitted for brevity

Interface        Role Sts Cost      Prio.Nbr Type
---------------- ---- --- --------- -------- --------------------------------
Fa0/2            Desg FWD 19        128.2    P2p 
Gi0/1            Root FWD 2345      128.25   P2p 

SW3#show spanning-tree vlan 2 blocked

Name                 Blocked Interfaces List
-------------------- ------------------------------------

Number of blocked ports (segments) in vlan 2: 0

I'll wrap this one up in the next blog entry, commenting on the whole thing. If it doesn't fit in one day's time slot, I'll finish over the next few. Feel free to post some ideas/suggestions for this one, and also ignore any other posts if you want to avoid any more hints!

And the answer(s) is/are....

B and C

About Cisco Cert Zone

Wendell Odom, CCIE No, 1624, has been a network guy for almost 30 years, working as a network engineer, SE, consultant, instructor, and author. He’s been writing and teaching about Cisco CCNA since its introduction in 1998, authoring all Cisco Press CCNA Exam Certification Guides. His primary job is to create Cisco certification content and tools. These cert tools include bestselling Cisco Press titles for CCNA, CCNP, and CCIE R/S; refer to this page for a complete list of titles. Wendell blogs here at Network World’s Cisco Subnet site, and keeps certification links and tools at his web site, www.certskills.com.

See a free preview chapter from Wendell’s CCNA ICND2 Exam Certification Guide), Chapter 17, “IP Version 6”.

Wendell Odom's Cisco Cert Zone blog is also featured on the Cisco Learning Network. See it there, along with the blogs of other Cisco Experts.

Again, check out all of Wendell Odom's books on CertSkills.com.

 

Most Discussed Posts