cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
2037
Views
6
Helpful
7
Replies

Port trunking / bonding high level concept

SJ K
Level 5
Level 5

Hi all,

I have heard about port trunking providing high availability and combined bandwidth.
 

Can I check the following

q1) if i trunk 2 ports together on my Ethernet card in my host computer, do I have to do the same on the ports in the network switch as well ?

q2) if my network switch do not support trunking, does it means that it will not work altogether ? is there a standard for trunking ?

q3) can I trunk 2 ports across different ethernet cards in the same host computer ?

q4) can I trunk 2 ports across 2 different switch (1 port from each switch) ? if the switch are not stack.  if i can't why ?

How does trunking actually works ?

=====================================================================================

q5) in terms of sending out data from application level, how does trunking split the packets across the physical link ?

With regards to the few modes listed in

http://www.linuxhorizon.ro/bonding.html

how would packet#1, packet#2 generated the same application at the same time can be send across the trunk ?

-- can they be send all at the same time  ? and if one of the link in the trunk is down, then packet#1 and #2 will be send sequentially -- which mode will it be then ?

 

Regards,
Noob

 

2 Accepted Solutions

Accepted Solutions

Jon Marshall
Hall of Fame
Hall of Fame

When Unix vendors talk about trunks they mean, as you say, combining multiple physical links into one logical link.

In Cisco terminology that is not a trunk, it is an etherchannel. A trunk in Cisco terminology is a link that can carry traffic for multiple vlans.

So I'll use Cisco terminology here as this is a networking forum :-)

q1) yes you do. You need to configure an etherchannel on the switch.

q2) all Cisco switches support etherchannel as do other vendor switches. An etherchannel on Cisco switches can either be statically configured or you can configure it to dynamically negotiate the etherchannel with the other end.

Dynamic etherchannels use one of two different protocols. PaGP is Cisco proprietary and LACP is a industry standard.

q3) yes, as long as your OS supports it

q4) if the switches are a stack or they are 4500/6500/6800 running VSS or they are Nexus switches supporting vPC then yes you have the same etherchannel across multiple switches.

If they are none of the above then all the etherchannel ports must terminate on the same switch.

Not sure what you mean by how does it actually work although q5) may help.

q5) for a single connection only one link can be used. Etherchannel spreads connections across the links and it can use the source and destination mac addresses, IP addresses, port numbers or a combination of them as input to a hash algorithm that chooses a specific link to use.

Note not all switches support all the methods above, it depends on the switch.

What is important to understand is that etherchannel cannot use multiple links for the same connection or flow. So lets say you have two servers and one is backing up to the other and you have 1.5Gbps of traffic between the servers.

You have an etherchannel of 2 x 1Gbps links. Because the servers connection is one flow it cannot use both links in the etherchannel. In this scenario you would need to use higher bandwidth links in the etherchannel.

But if there were two flows each of 1Gbps then it could spread them across both links.

So etherchannel can increase bandwidth and does but it has limitations. But it definitely increases redundancy which is why you often use etherchannels to connect switches to each other.

If a link fails the other links in an etherchannel are still active.

And finally an etherchannel is seen by STP as one logical link so there is no blocking of links within the etherchannel.

All of the above is about etherchannels and not trunks (Cisco terminology) because I think that's what all your questions were about but if you were also asking about trunks then just say and we can cover those as well.

Jon

View solution in original post

Not sure who has graded 1 star, but its a 5 star reply for me!

No problem, I didn't assume it was you. It's either someone making a mistake or just as likely someone who doesn't really understand either networking or how the community works :-)

if we are to utilize the 2nd link, another TCP connection will have to be established between the client and the database (using some hash algorithm that choose the 2nd link for usage)

Not necessarily.

It depends on the switch capability. If the switch could use TCP ports as part of the input to the algorithm and you were using them in your configuration then yes, potentially the second connection could use another link in the etherchannel.

If the switch only supported src/dst mac address or IP address then no because they would be the same.

UDP is the same as TCP in this regard.

Jon

View solution in original post

7 Replies 7

Jon Marshall
Hall of Fame
Hall of Fame

When Unix vendors talk about trunks they mean, as you say, combining multiple physical links into one logical link.

In Cisco terminology that is not a trunk, it is an etherchannel. A trunk in Cisco terminology is a link that can carry traffic for multiple vlans.

So I'll use Cisco terminology here as this is a networking forum :-)

q1) yes you do. You need to configure an etherchannel on the switch.

q2) all Cisco switches support etherchannel as do other vendor switches. An etherchannel on Cisco switches can either be statically configured or you can configure it to dynamically negotiate the etherchannel with the other end.

Dynamic etherchannels use one of two different protocols. PaGP is Cisco proprietary and LACP is a industry standard.

q3) yes, as long as your OS supports it

q4) if the switches are a stack or they are 4500/6500/6800 running VSS or they are Nexus switches supporting vPC then yes you have the same etherchannel across multiple switches.

If they are none of the above then all the etherchannel ports must terminate on the same switch.

Not sure what you mean by how does it actually work although q5) may help.

q5) for a single connection only one link can be used. Etherchannel spreads connections across the links and it can use the source and destination mac addresses, IP addresses, port numbers or a combination of them as input to a hash algorithm that chooses a specific link to use.

Note not all switches support all the methods above, it depends on the switch.

What is important to understand is that etherchannel cannot use multiple links for the same connection or flow. So lets say you have two servers and one is backing up to the other and you have 1.5Gbps of traffic between the servers.

You have an etherchannel of 2 x 1Gbps links. Because the servers connection is one flow it cannot use both links in the etherchannel. In this scenario you would need to use higher bandwidth links in the etherchannel.

But if there were two flows each of 1Gbps then it could spread them across both links.

So etherchannel can increase bandwidth and does but it has limitations. But it definitely increases redundancy which is why you often use etherchannels to connect switches to each other.

If a link fails the other links in an etherchannel are still active.

And finally an etherchannel is seen by STP as one logical link so there is no blocking of links within the etherchannel.

All of the above is about etherchannels and not trunks (Cisco terminology) because I think that's what all your questions were about but if you were also asking about trunks then just say and we can cover those as well.

Jon

To whoever marked this post as a 1.

Could you explain why the above was "Not helpful" ?

Or better yet could you write your own response and I can see where I am going wrong.

Jon

Hi Jon,

Thanks for the advice.
Not sure who has graded 1 star, but its a 5 star reply for me!

For answer on Q5), are you implying that ->

let's say there is a TCP connection established between a client and a database server. That connection will only utilize 1 of the 2 link in the ether-channel. All data exchange will be done via that 1 physical link.

if we are to utilize the 2nd link, another TCP connection will have to be established between the client and the database (using some hash algorithm that choose the 2nd link for usage)

Am i right ?

===============================

How about UDP connection (connectionless) ? Let's say there is 2 data packets generated from an application at the same time,  will the 2 packets be send across the logical link together at the same time ?

Regards,
Noob

Not sure who has graded 1 star, but its a 5 star reply for me!

No problem, I didn't assume it was you. It's either someone making a mistake or just as likely someone who doesn't really understand either networking or how the community works :-)

if we are to utilize the 2nd link, another TCP connection will have to be established between the client and the database (using some hash algorithm that choose the 2nd link for usage)

Not necessarily.

It depends on the switch capability. If the switch could use TCP ports as part of the input to the algorithm and you were using them in your configuration then yes, potentially the second connection could use another link in the etherchannel.

If the switch only supported src/dst mac address or IP address then no because they would be the same.

UDP is the same as TCP in this regard.

Jon

Hi Jon

"If the switch only supported src/dst mac address or IP address then no because they would be the same.

UDP is the same as TCP in this regard."

In that case, what will happen ? All connection data will still go through the 1st link ?

================================================================

The reason is because I have been hearing that etherchannel can increase bandwidth, but it seems like that is highly dependent on certain criteria or condition (such as the switch capability to differentiate different connections etc)

Regards
Noob

Yes with UDP using the same example as before it acts just like TCP, all data will go through one link.

Etherchannel can and does increase bandwidth.

I was just pointing out that for a specific connection it won't but there are many different connections (or flows) that are carried on an etherchannel.

As I mentioned switches are often interconnected with etherchannels and there are many end to end conversations going across them.

Even with an etherchannel to a server there will be many client connections and these can be spread across the links.

So most definitely yes etherchannel is a way to increase the bandwidth between devices and apologies if I misled you

I was just trying to point out that etherchannel is not the answer if you have a specific single connection that needs more bandwidth.

Jon

Hi Jon,

Sorry for the late reply.

Thank you so much for the insight.
Its not overly technical but good enough for me to understand the concept.

Appreciate your advice.
Thanks!

Regards,
Noob

 

Review Cisco Networking for a $25 gift card