Link to home
Start Free TrialLog in
Avatar of BarepAssets
BarepAssetsFlag for Ireland

asked on

Spanning Tree + Switching Loops

Hi,
I am trying to understand bridign loops to get better understanding of spanning tree
Firstly the cisco documentation talks alot about segments to me i take it as a segment is broadcast domain so each vlan is a segment??

So for example say we have 2 vlans spread over couple of switches same user vlans 2 + 3.

Say a pc connected to one of the access ports on 1  of the switches say fa0/3 in vlan 2 on switch2 . When it sends a frame to a pc on vlan 3. Does all the access ports in vlan 2 see the frame or is just fa0/3?? Do all switch access ports see all frames in the same vlan/same segment or is just broadcast frames that all switchports will see.
The way i though it happened was that each switch learns from each source address so say the pc on fa0/3 transmits a frame the switch puts in it cam table the source mac of the pc as reachable though fa0/3


What is confusing is the bridging loops.
the example i have  has    2 segments and 2 switches a pc on 1 segment transmits to a pc on another segment why does both switches on the first segment get the frame and put in there cam table would  switch 2 not just get it as it is on the fa0/3 of the switch ?? see attachement

Figure5-1.gif
Avatar of noci
noci

>> i take it as a segment is broadcast domain so each vlan is a segment??
Well multiple segments may combine into one Broadcast domain. VLAN's are distinct Broadcast domains thus also different segments.


>> Does all the access ports in vlan 2 see the frame or is just fa0/3??
That depends...
  If the target address is a multicast or broadcast MAC address then yes it goes to all ports.
  If the target address is unknown (in the CAM/MAC table) then it is treated as broadcast.
  If the target address us unicast and known where it lives, it is direct delivery only.

>>Do all switch access ports see all frames in the same vlan/same segment or is just
>> broadcast frames that all switchports will see.
See previous.

>>The way i though it happened was that each switch learns from each source address
>> so say the pc on fa0/3 transmits a frame the switch puts in it cam table the source
>> mac of the pc as reachable though fa0/3
That's correct. But if the PC has never sent a message than a broadcast is needed to get a response.

>> What is confusing is the bridging loops.
>> the example i have  has    2 segments and 2 switches a pc on 1 segment transmits to
>> a pc on another segment why does both switches on the first segment get the frame
>> and put in there cam table would  switch 2 not just get it as it is on the fa0/3 of the
>> switch ?? see attachement
Well the address is of the target system behind the the switch so both will absorb the packet. WITHOUT Spanning Tree or other measures then BOTH will forward the packets.
(no think of what will happen with a broadcast packet..., and there are many broadcast packet in any network for address discovery ARP, or DHCP etc.)
 If there is a STP protocol then both switch will agree on who will forward a packet.
The other will block an interface.
Try a 'show span' on both switches. (And in a LAB env try it without STP, the network will come down on you, so no real live network please, this is like a big DONT TRY THIS AT HOME warning!!! ;).

But your picture is not an UTP network one, this can only be configured this way if you still have a COAX network (10Base5 or 10Base 2).
Spanning Tree exists to help in the prevention of loops by making sure frames exiting one segment are not processed as incoming from to that segment when multiple paths out are available.

http://www.cisco.com/en/US/docs/internetworking/technology/handbook/Transparent-Bridging.html#wp1020561
Here is a diagram I did a while back that may help visualize it.  I partially color coded the VLANs so some are Red some are Blue.  Then you can see the center lines that are "both" colors,..these are the truck line that carry multiple "segments" (aka multiple VLANs)

MultiSubnetSimpleLANwithTrunks.jpg
@pwindell
Your drwaing only doesn't contain double links or loops.

If the L2 Switches are linked through a 2nd L3 Switch there are loops that need to be resolved. And that's where STP comes in. where selectively some ports on the trunking are blocked to still allow traffic. to go from any place to any other place.
Avatar of BarepAssets

ASKER

thanks for the replies

@nico   Well the address is of the target system behind the the switch so both will absorb the packet. WITHOUT Spanning Tree or other measures then BOTH will forward the packets.-- this is exactly the point i am confused on. So the pc is connected to either 1 of the switches or the other. Why would both absorb a typical unicast packet i can understand why broadcast??  Why would both forward unicast traffic?

Is it because say  the initial unicast destination is unknown the switch will broadcast to find destination because it broadcast it is recieved on the other  switch as both switches have switchports in the same vlan i.e same segment so then it will put the source as on that segment in its cam table??

But still that does not make sense going forward then if it is just unicast the traffic will go to switchport that it is connected to say switch 1 and switch 1 will just forward it. It is not going broadcast once it is aware of the destination.

Is the spanning tree only concerned with broadcast traffic??
ASKER CERTIFIED SOLUTION
Avatar of noci
noci

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Your drwaing only doesn't contain double links or loops.
Correct.  It was not drawn up special for this case and wasn't intended to address all parts of the question.  It is intended to show the "segments" (VLANs) and how in some places more than one runs over the same wire but is yet logically separated.