Setting the Port Priority
Setting the Port Priority Another option you can use to help the switch determine the path selection that STP uses in your network is to set the port priorities. Remember, this only influences STP; it doesn’t demand that STP do anything. However, between setting the port cost and priority, STP should always make your path selection. The port priority and port cost configurations work similarly. The port with the lowest port priority will forward frames for all VLANs. The command to set a port priority is set spantree portpri: Terry_4000> (enable) set spantree portpri ? Usage: set spantree portpri <mod_num/port_num> <priority> set spantree portpri <trcrf> <trcrf_priority> (priority = 0..63, trcrf_priority = 0..7) Terry_4000> (enable) The possible port priority range is from 0 to 63, and the default is 32. If all ports have the same priority, then the port with the lowest port number will forward frames. For example, 2/1 is lower than 2/2. In the following example, the 4000 switch priority for port 1/1 is set to 20: Terry_4000> (enable) set spantree portpri 1/1 20 Bridge port 1/1 port priority set to 20. Terry_4000> (enable) After you change your port priority, you can verify the configuration with the show spantree 1/1 command: Terry_4000> (enable) show spantree 1/1 Port Vlan Port-State Cost Priority Fast-Start --------- ---- ------------- ----- -------- ---------- 1/1 1 forwarding 10 20 disabled 1/1 2 forwarding 10 20 disabled 1/1 3 forwarding 10 20 disabled 1/1 4 forwarding 10 20 disabled 1/1 1003 not-connected 10 20 disabled
1/1 1005 not-connected 10 4 disabled Terry_4000> (enable) Notice that because port 1/1 is a trunked port, all VLAN priorities were changed on that port. Also notice in the following output that the priority is 20 for 1/1, but the default of 32 is set for 1/2: Terry_4000> (enable)show spantree [output cut] Port Vlan Port-State Cost Priority Fast-Start --------- ---- ------------- ----- -------- ---------- 1/1 1 forwarding 10 20 disabled 1/2 1 forwarding 19 32 disabled You can go one step further and set the port priority on a per-VLAN basis. The port with the lowest priority will forward frames for the VLAN for which you’ve set the priority. Again, if all the ports have the same priority, the lowest port number wins and begins forwarding frames. There is an advantage to setting the port priority per VLAN. If you have a network with parallel paths, STP stops at least one link from forwarding frames so a network loop will not occur. All traffic would then have to travel over only the one link. However, by changing the port priority for a specific group of VLANs, you can distribute the VLANs across the two links. This isn’t quite as good as load sharing, but at least you get to use both links as opposed to having one sit idle. To change the priority of STP for a certain VLAN or group of VLANs, use the set spantree portvlanpri command: Terry_4000> (enable) set spantree portvlanpri ? Usage: set spantree portvlanpri <mod_num/port_num> <priority> [vlans] (priority = 0..63) Terry_4000> (enable) The priority can be set for each VLAN from 0 to 63. In the following example, we’ll set port 1/1 to forward only VLANs 1 and 2 and set port 1/2 to forward VLANs 3 and 4. Figure 16.1 shows the physical topology involved.
291 times read
|
|
|
Did you enjoy this article?
(total 0 votes)
|