01-11-2020 03:13 PM
I'm very new to networking, so apologies in advance if I use incorrect terminology.
I'm looking to use Packet Tracer to simulate a "handoff" in data routing. I have a test case set up with 2 computers, 2 switches, and 2 data lines between the switches (image below). What I want to do is for PC0 to send data (simplex) to PC2 through the top channel between the switches. At some point, I would like all the data to stop being sent through the top channel and instead sent through the bottom channel between the switches, so essentially there is a "handoff" in paths for data to travel through. Specifically, I'm investigating what happens when the two data routes have different latencies.
Is this something that can be done in Packet Tracer, and if so, any pointers/advice/links are appreciated! Also please let me know if there is a more appropriate forum for this question.
Solved! Go to Solution.
01-12-2020 06:10 AM
Hello,
if you increase the spanning tree cost on the currently active (upper) link, this will generate a failover, and the other (lower) link will become active. So lets say your Switch0 is configured as below:
Switch0
interface FastEthernet0/0
description Link to PC0
!
interface FastEthernet0/1
description Link_1 to Switch1
!
interface FastEthernet0/2
description Link_2 to Switch1
Now if you go into interface configuration mode for FastEthernet0/1 and set the spanning tree cost to a high value:
Switch0#conf t
Switch0(config)#interface FastEthernet0/1
Switch0(config-if)#spanning-tree vlan 1 cost 20000
the link on FastEthernet0/2 will beome active.
01-11-2020 09:16 PM
Hi,
There are some multiple concerns this is switch design and both links are layer 2 P2P so there is no impact of latency on the path chosen by the switch between two switches. The switch path selection depends on the switch Port number, Port speed, and Spanning tree configuration (also switch port configuration).
As per your design, You can see that one port on the switch1 is having red lite means this port is in the blocking state. This is due to spanning tree protocol. Why are you using spanning here? Because this is a protocol to prevent layer 2/broadcast loops in the network. So this is a major protocol for switching especially flat or layer 2 networks.
How to switch (Layer 2) select a patch:
https://www.petri.com/stp-spanning-tree-protocol-path-selection
http://www.hackandtinker.net/2015/02/15/spanning-tree-protocol-path-selection/
01-12-2020 06:10 AM
Hello,
if you increase the spanning tree cost on the currently active (upper) link, this will generate a failover, and the other (lower) link will become active. So lets say your Switch0 is configured as below:
Switch0
interface FastEthernet0/0
description Link to PC0
!
interface FastEthernet0/1
description Link_1 to Switch1
!
interface FastEthernet0/2
description Link_2 to Switch1
Now if you go into interface configuration mode for FastEthernet0/1 and set the spanning tree cost to a high value:
Switch0#conf t
Switch0(config)#interface FastEthernet0/1
Switch0(config-if)#spanning-tree vlan 1 cost 20000
the link on FastEthernet0/2 will beome active.
01-13-2020 08:05 AM
01-12-2020 03:27 PM - edited 01-12-2020 03:30 PM
Hello
If you have a port channel why would you want to specify a primary port?. The physical ports become a single logical port thus a single stp instance so then equal load balancing is in effect so traffic can traverse both links at once through the aggregation,I am not so sure (not tested it) but stating stp port priority in a aggregated link would not work!
You could however in a dual port-channel or with dual physical interfaces use flex link to specify a primary and backup PC or interface which will negate spanning-tree all together but you would then have a specific primary port and backup path applied with no aggregation naturally when applied on physical interfaces
Flexlink < primary interface
Int x/1 or PC1
switchport
switchport mode trunk
backup interface int x/2 or PC2
int x/2 or PC2
switchport
switchport mode trunk
01-12-2020 07:26 PM
On a side note, Packet Tracer does not have the 'backup interface' command on switchports. Increasing the spanning tree cost will cause an immediate failover, so that is probably the best option given the limited commands available...
spanning-tree vlan 1 port-priority 128 would also work...
Switch(config-if)#?
cdp Global CDP configuration subcommands
channel-group Etherchannel/port bundling configuration
channel-protocol Select the channel protocol (LACP, PAgP)
description Interface specific description
duplex Configure duplex operation.
exit Exit from interface configuration mode
ip Interface Internet Protocol config commands
lldp LLDP interface subcommands
mdix Set Media Dependent Interface with Crossover
mls mls interface commands
no Negate a command or set its defaults
shutdown Shutdown the selected interface
spanning-tree Spanning Tree Subsystem
speed Configure speed operation.
storm-control storm configuration
switchport Set switching mode characteristics
tx-ring-limit Configure PA level transmit ring limit
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide