cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
501
Views
10
Helpful
10
Replies

Network LAN Traffic Cisco switches

BilalButt62333
Beginner
Beginner

My concern is that if we have more than one path in a network in which almost every switch is connected to the other switch so is there any method to decide whether LAN traffic should go from a specific path even if another path is connected and available, for example if i want a switch traffic goes from specific uplink and when that not available other should be use.

1 Accepted Solution

Accepted Solutions

Most of this discussion has focused on layer 2 solutions. I think it might be helpful to think about layer 3 solutions. In reading the initial part of the original post I thought that the issue was about how to select a path through the network when multiple paths/connections are present. There are 2 approaches to this:

1) configure static routes where you evaluate the possibilities and choose the path. The drawback to this is that it is manual and that if something in the network changes (a path becomes not available, or a new path becomes available) you may need to go in and change configurations.

2) configure a dynamic routing protocol. Each protocol has its own method of choosing which path is best but each will identify possible paths and choose the best one. And the dynamic routing protocol will recognize when there are changes in the network and will dynamically change the routing table.

But as I read further in the post the question seems to be if 2 paths are available and I do not want traffic to take a particular path how do I do that? It would be possible to avoid a particular path by configuring Policy Based Routing.

The original post starts with "if we have more than one path in a network" but in the diagram there is only a singe path from any source to some destination.

HTH

Rick

View solution in original post

10 Replies 10

two solution in L2
config port channel and use hash algorithm can give you what you want.

config STP and play with cost of link to make one primary and other backup.

note:- first is better 

I understand the second method (STP) but the first method that you said
about EtherChannel is only between two switches my concern is if you see
picture 1,2 are two ways if I want that 3rd switch LAN traffic goes go from
2 instead of 1 then how is link.PNGthat possible with your 1st method

My first solution if you have two link between two SW, then you can config L2 port channel. 
regard your photo I think it not complete because I dont see SW3-SW2 connection, but anyway play with STP cost can achieve what you want. 
only change cost of link between SW3 and SW1.

Joseph W. Doherty
Hall of Fame Master Hall of Fame Master
Hall of Fame Master

As @MHM Cisco World already described, and which you seem to be aware, you can adjust STP cost to "prioritize" which links will be used in what order.  Further, with Cisco's PVSTP you can do this per VLAN.  I.e. different VLANs can have different priorities for path selection.  (You can also do this with MST, by VLAN or for a group of VLANs.)

paul driver
VIP Expert VIP Expert
VIP Expert

Hello
Just need to be aware changing stp costs is culumative throughout the entrire stp estate

now If you want to change how the local switch selects it root port, then you can the change its link stp port cost ,

int/x
spanning-tree vlan x cost xxx

If you want to affect how downstream switch elects its root port change the inks stp  port priority.
This is then only local significant between the two directly connected switches. 

int/x
spanning-tree vlan x port-priority xxx

In both instances a higher value is less preferred.


Please rate and mark as an accepted solution if you have found any of the information provided useful.
This then could assist others on these forums to find a valuable answer and broadens the community’s global network.

Kind Regards
Paul

Most of this discussion has focused on layer 2 solutions. I think it might be helpful to think about layer 3 solutions. In reading the initial part of the original post I thought that the issue was about how to select a path through the network when multiple paths/connections are present. There are 2 approaches to this:

1) configure static routes where you evaluate the possibilities and choose the path. The drawback to this is that it is manual and that if something in the network changes (a path becomes not available, or a new path becomes available) you may need to go in and change configurations.

2) configure a dynamic routing protocol. Each protocol has its own method of choosing which path is best but each will identify possible paths and choose the best one. And the dynamic routing protocol will recognize when there are changes in the network and will dynamically change the routing table.

But as I read further in the post the question seems to be if 2 paths are available and I do not want traffic to take a particular path how do I do that? It would be possible to avoid a particular path by configuring Policy Based Routing.

The original post starts with "if we have more than one path in a network" but in the diagram there is only a singe path from any source to some destination.

HTH

Rick

I am glad that our suggestions have been helpful. Thank you for marking this question as solved. This will help other participants in the community to identify discussions which have helpful information. This community is an excellent place to ask questions and to learn about networking. I hope to see you continue to be active in the community.

HTH

Rick

I must confess, I was surprised when @Richard Burts's post was selected for a solution.  Why?  Because even as Rick mentions, the other postings, before Rick's, were indeed focused on L2 solutions, because, at least for myself, cannot speak for the other posters, but as this question is in the "switching" forum, and OP just describes "switches", does seem to imply OP is positing a L2 only topology.

BTW, don't misunderstand, kudos to Rick for introducing L3 as a consideration, just again, surprised that such was the solution being sought by OP, with the information posted.

To further amplify Rick's information, firstly, of course, the "switches" in question cannot be pure L2 switches, they need L3 features, i.e. L3 switches (or they need to be routers).  (BTW, when using/referencing L3 switches, generally we use the L3 prefix, i.e. "L3 switches", to distinguish them from "switches", which generally implies L2 only capabilities.)

Rick describes the issues, with static routes, when there's a path failure (or better path), "you may need to go in and change configurations."  That's certainly true, but, at least in Cisco parlance, you might be able to configure "floating static routes" to at least "automatically" deal with a path failure.

Rick also describes using a dynamic routing protocol, which will chose what it considers its best path.  Also 100% correct, but with dynamic routing protocols you can control its metrics that whatever best best path is chosen is the path you want as best.  This without negating its capability to react to dynamic changes.

Lastly, Rick suggests using PBR if there's more than one path, and to prefer one path over another.  Again, fully accurate and possible, however, as just described, above, you can also do that using just static routing or a dynamic routing protocol.  That said, PBR lets you to do things like directing different source or kinds of traffic onto different paths; a real plus for PBR, if that's what you want to do.  Unfortunately, PBR is much more demanding of manual configuration, and dealing with path failures, using PBR, can be "interesting".

Joseph

I think it can sometimes be difficult to decide which community a question should be placed in (does it go in routing because it deals with deciding how to forward traffic, or does it go in switching because it is implemented on a switch). And I believe that there is quite a bit of overlap between the routing and switching communities. I have had the experience of reading a question and thinking "this really belongs in a different community, but it is here and I will go ahead and respond" and I suspect that you have also.

I observe that many questions in the communities are asked that do not have a level of specificity or sufficient details to allow us to be quite clear about what is involved. And this post is one of those. The original post asked " is there any method to decide whether LAN traffic should go from a specific path even if another path is connected and available". There is ambiguity here about whether this is oriented to layer 2 or to layer 3. When the post also asked " if i want a switch traffic goes from specific uplink and when that not available other should be use" it suggests to me that a layer 3 solution addresses this very well and should be considered.

Perhaps we can agree that there might possibly be multiple "correct" solutions to the question depending on how you interpret some aspects of the question.

HTH

Rick

Rick, regarding you comments about which community a question is posted in.  That's not critically important to me, beyond providing some additional clues about what the OP is trying to find out.

"I observe that many questions in the communities are asked that do not have a level of specificity or sufficient details to allow us to be quite clear about what is involved. And this post is one of those."

Rick indeed, possibly more in this case then many similar.   That's why I wrote about my surprise, because if just a little bit more detail was provided, I, and possibly MHM and/or Paul might have likewise offered some L3 information.  I.e. hopefully OP and other readers of these posts, will benefit from providing additional "hints" for what they are after.

Interesting how you considered OP's comment "is there any method to decide whether LAN traffic should go from a specific path even if another path is connected and available" ambiguous (agreed), yet also in OP "if i want a switch traffic goes from specific uplink and when that not available other should be use" as suggesting L3, because for me (and possibly MHM as he suggested Etherchannel), "uplinks" and alternative selection between them, continues to suggest L2.

However, as you also mention the diagram only having single paths, that diagram could be L2 or L3 or both.

So, again, kudos to you suggesting L3.

"Perhaps we can agree that there might possibly be multiple "correct" solutions to the question depending on how you interpret some aspects of the question."

I don't agree, laugh, because only the OP can really determine if the information provided is what they need.

BTW, to @BilalButt62333, what you "did" is not wrong, just some things to consider to assist you in getting the best suggestions and/or recommendations in any future postings.

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community:

Recognize Your Peers