Hey there,Can any one explain me how to inflence vlan path, for example if one vilan from one switch have couple of destination possibilities to reach another vlan device on other switch , what do we cahnge on the interface ?
If you have a network of multiple switches, and you have two devices each connected to a different switch on such a network, how does the network decide what path should be taken if there are multiple paths. If I understand correctly, that’s the question you’re asking right?
Well, this depends upon several things. If the two devices are on the same VLAN, then we are talking about Layer 2 connectivity. In such a case, there is only a single path that can be taken. This path is determined by the Spanning Tree Protocol or STP. STP is designed to automatically block certain paths, and unblock others on a network of switches such that there is only one path. This is done to eliminate the possibility of layer 2 loops. You can however adjust various parameters so that the path chosen is different than it would be by default. You can find out more about STP at this introductory lesson, and in many subsequent lessons about the protocol:
Now if the two devices are not on the same VLAN, then we must get routing involved, which is at layer 3. Routing is the process by which layer 3 devices (such as routers and layer 3 switches) decide on how to forward particular packets that arrive at their interfaces, based on the destination IP address in the header of the IP packet. Routing can be statically or dynamically configured, and how you would do this can be seen in detail in the series of lessons pertaining to routing, found in the CCNA 200-301 course below:
I hope this has been helpful!
Thank you for the reply actually this is the scenario , i want to understand , this PC in SWITCHA is in VLAN 10 , and another PC on switcich B is in vlan 10, in this case PC in switch-A can reach PC in switch-B in two ways, in can teach it through a direct link which is connected from SWITCH-A to Switch-B, or FROM switch-A to SWITCH-C and then to SWITCH be, so suppose SWITCH-A is usind Direct link path from SWICH-A to SWICHT-B , What if i want the path to be SWITCH-A to SCWITCH-C and then reach SWITCH-B ? both switches have vlan 10 and ports are also trunk.
Your topology involves the first scenario described in my post. In this case, the path that traffic will take is determined by STP.
By default, STP will designate one of the switches as the root bridge for each VLAN configured on the topology. The root bridge acts as a reference point within the network. Based on this reference point, one of the ports in the loop between SW0, SW1, and SWC will be blocked in order to eliminate any loops. Once that is done, traffic can only take one path, the path that is unblocked.
If you choose to change this behaviour, you can do so by modifying some STP parameters. STP is a whole course in and of itself, so there is no way I could explain to you in detail all of the options involved in this. However, you can go over several lessons found with the STP course here:
In particular, take a look at the “How Spanning-tree solves loops” section of this lesson, to see a topology similar to yours, and see how ports are blocked to eliminate loops.
Also take a look at this lesson which describes the cost of each link, which determines which ports will be blocked and which will not:
By adjusting the cost, you can also adjust the path that traffic will take.
Going through these lessons will give you a better understanding of how STP functions and how the path at layer 2 is determined between switches.
I hope this has been helpful!