Solved

trunking and spanning tree

Posted on 2013-11-16
12
473 Views
Last Modified: 2013-11-21
Hi

when switch's are connected together - What are the advantages of trunking in terms of preventing L2 loops?.

If i uplink over access ports (without portfast on) - is this ok?
forgetting about VLAN tagging and carrying multiple vlan in this question (and presuming i have no stacking cables) -
Is there any other reason/s to trunk your uplinks between switches?

Does a trunk help in avoiding loops if so can someone explain please thanks
0
Comment
Question by:philb19
  • 3
  • 3
  • 3
  • +2
12 Comments
 
LVL 26

Expert Comment

by:Soulja
ID: 39653194
Trunks have nothing to do with prevention loops. It is only needed if carry multiple vlans between switches.

Only difference between the two is one tags multiple vlans and the other only carries one vlan.

If you uplink with an access port you would not enable portfast. Portfast is only for interfaces with end hosts (servers, computers, printers, etc.

So no advantages.
0
 
LVL 21

Expert Comment

by:Rick_O_Shay
ID: 39653196
Trunking doesn't help to prevent loops. The multilink trunk is considered one link by spanning tree. Using multiple links between switches that are not trunked will be detected as a loop.

Trunking allows you to have a bigger pipe between switches and the things you mentioned above.

Spanning tree works by sending packets out each port and listening to see if they are heard back on a different port which would imply there is a second link to the same switch in the topology.
0
 
LVL 26

Expert Comment

by:Soulja
ID: 39653202
You can have an mulilink (port channel), single vlan, uplink also and be seen as one link.

The only difference is one carries multiple vlans and the other doesn't.

There is no bandwidth advantages between an uplink and a trunk, so I don't understand the "bigger pipe" statement.
0
 

Author Comment

by:philb19
ID: 39653225
thanks - yes I have also read of  "bandwidth or bigger pipe" advantages of trunk - either I misunderstand or not true - I cant understand how? it could? - anyone please explain
0
 
LVL 26

Expert Comment

by:Soulja
ID: 39653234
If that can be explained it will be totally new to me.

Only think I can think of is that in HP lingo, they call port channels, trunks. This is not the trunking we are talking about though.

A gig port carrying a trunk that is tagging several vlans don't seem to have any bandwidth advantages than a gig port that is uplinking one vlan. If anything the uplink of the one vlan would have more bandwidth since its the only vlan using the link.
0
 
LVL 57

Expert Comment

by:giltjr
ID: 39653260
Soulja is on track with is "HP terms" comment.

In the Cisco world a trunk is a connection between switches that carries multiple tagged VLAN's.

In the most of the rest world (not just HP) a trunk is multiple physical connections between two switches that appear as single logical connection.   In Cisco terms this is a etherchannel, in more generic terms this is called link aggregation.

Now if you are using the term trunk to describe link aggregation, then yes it does prevent loops because instead of two independent connection between two switches (which is a loop) you have "one" logical connection (which is not a loop).
0
Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 
LVL 45

Expert Comment

by:Craig Beck
ID: 39653262
Yes, as Soujla says, trunk means link-bundling in HP-talk.

Cisco VLAN Trunk = HP Tagged Port
Cisco PortChannel = HP Trunk

HP do things the opposite way to Cisco in terms of configuring ports and VLANs.

In Cisco we do:

interface range GigabitEthernet0/1 - 4
 switchport mode trunk
 switchport trunk allowed vlan 10,20,30



...but in HP we do:

vlan 10
 tagged 1-4
vlan 20
 tagged 1-4
vlan 30
 tagged 1-4


Back to the question around access ports between switches...

If you configure two switches with an access link between them, the traffic coming into the switch would be placed on whichever VLAN the port is configured to use (if it's a Cisco switch).  So,

Switch1
interface GigabitEthernet0/1
 switchport mode access
 switchport access vlan 10


Switch2
interface GigabitEthernet0/1
 switchport mode access
 switchport access vlan 20


All traffic going from VLAN10 on switch1 would be placed into VLAN20 on switch2, and all traffic from switch2 on VLAN20 would go into VLAN10 on switch1.

Access ports between switches don't specifically 'have' to use the same VLAN ID.
0
 

Author Comment

by:philb19
ID: 39653310
hey thanks for bringing this up  craigbeck - As I am a bit confused as to an article which states that 2 switches (diff vlan) connected together via access ports makes - " 1 Broadcast domain" - All i have read and understood is that a VLAN "is" a broadcast domain - please read below - and advise if they are right that the "2"  seperate PCs in different vlans are in  "1" broadcast domain

http://journey4ccie.com/2013/01/09/vlans-trunk-links-and-access-ports-here-is-the-trick/
0
 
LVL 45

Accepted Solution

by:
Craig Beck earned 250 total points
ID: 39653317
Yes, they are correct.  If you link 2 separate VLANs via an access port that joins both VLANs in one broadcast domain.

A broadcast domain is a layer-2 segment, so it has no concept of logical separation - that's all handled in the switch.  If you physically join two logical segments, they become one logical segment.  It's a bit hard to understand but that's the best way I can say it :-)

Basically, no matter what VLAN ID is on each switch, if you join two VLANs together via an access link it's one big VLAN.
0
 

Author Comment

by:philb19
ID: 39653330
ok - what if in their diagram the link (both ports of switch connection were trunk ports) - im guessing the frame would then be tagged with the source vlan and "would not" be able to ping each other - as PCs  on separate VLANs - same ip subnet does not matter ? - is that correct? thanks again
0
 
LVL 45

Expert Comment

by:Craig Beck
ID: 39653335
If the links were trunks that would create several broadcast domains - one per VLAN.  Indeed, when a frame passes from one switch to another it would be tagged in the correct VLAN when it leaves the source switch to cross the trunk.  When it gets to the other switch the frame will be placed on whichever VLAN was indicated in the 802.1q header.
0
 
LVL 57

Assisted Solution

by:giltjr
giltjr earned 250 total points
ID: 39653336
The article is correct (and craigbeck).  Although most people will NOT setup their switches this way, it will work as described.

The key is when a port is in a access ports,  the traffic between the two switches is sent/received untagged.  So SW2 has no clue that SW1 is using VLAN 10 and SW1 has no clue that SW2 is using VLAN20.  The VLAN ID's are only used within the switches or on any port that sends/received tagged traffic.

Think of it this way.  You have two buildings.

When people in building #1 send confidential memos to others a carrier (the switch) gets the memo and puts it inside a red folder takes it to the recipient and removes it from the folder prior to delivery.

When people in building #2 send confidential memos to others a carrier (the switch) gets the memo and puts it inside a yellow folder takes it to the recipient and removes it from the folder prior to delivery.

Now if something must be delivered to somebody in the other building it must go through a tunnel that connects the buildings.  Anything that leaves building #1 must be in a red folder and anything that leaves building #2 must be in a yellow folder.  HOWEVER, the folders can never leave their respective buildings.

So when the carrier from building#1 gets ready to go through the tunnel a "guard" verifies that he has a red folder, then the guard takes the folder.  The carrier goes through the tunnel and upon arriving at the other end of the tunnel in building #2 a guard accepts the memo and puts it in a yellow folder.  Anything going from building #2 to building #1 goes through the same process, but the colors of the folders are reverse.

If a carrier tries to take a memo from building #1 to building #2 and it is NOT in a red folder, the guard will say "no" and prevent the memo from going through the tunnel.  Same thing for building #2 to building #2, except of course for the color of the folder.


The the tunnel between the buildings were a "trunk" (a.k.a tagged) then the memo would be left in the folder, but because each building uses a different color folder, the memo will not be delivered.

Hope this make sense.
0

Featured Post

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

Suggested Solutions

This is an article about my experiences with remote access to my clients (so that I may serve them) and eventually to my home office system via Radmin Remote Control. I have been using remote access for over 10 years and have been improving my metho…
Meet the world's only “Transparent Cloud™” from Superb Internet Corporation. Now, you can experience firsthand a cloud platform that consistently outperforms Amazon Web Services (AWS), IBM’s Softlayer, and Microsoft’s Azure when it comes to CPU and …
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…

759 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now