• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 503
  • Last Modified:

trunking and spanning tree

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
philb19
Asked:
philb19
  • 3
  • 3
  • 3
  • +2
2 Solutions
 
SouljaCommented:
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
 
Rick_O_ShayCommented:
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
 
SouljaCommented:
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
Configuration Guide and Best Practices

Read the guide to learn how to orchestrate Data ONTAP, create application-consistent backups and enable fast recovery from NetApp storage snapshots. Version 9.5 also contains performance and scalability enhancements to meet the needs of the largest enterprise environments.

 
philb19Author Commented:
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
 
SouljaCommented:
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
 
giltjrCommented:
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
 
Craig BeckCommented:
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
 
philb19Author Commented:
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
 
Craig BeckCommented:
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
 
philb19Author Commented:
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
 
Craig BeckCommented:
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
 
giltjrCommented:
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

Fill in the form and get your FREE NFR key NOW!

Veeam is happy to provide a FREE NFR server license to certified engineers, trainers, and bloggers.  It allows for the non‑production use of Veeam Agent for Microsoft Windows. This license is valid for five workstations and two servers.

  • 3
  • 3
  • 3
  • +2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now