Showing posts with label priority. Show all posts
Showing posts with label priority. Show all posts

Thursday, December 25, 2008

Cisco CCNP / BCMSN Exam Tutorial: Changing Root Bridge Election Results

Your BCMSN and CCNP studies will include mastering the details of Spanning Tree Protocol (STP). While you learned some of these details in your CCNA studies, quite a bit of it may be new to you. Before going on to the intermediate and advanced STP features, let's review the root bridge election process and learn how to change these results.

Each switch will have a Bridge ID Priority value, more commonly referred to as a BID. This BID is a combination of a default priority value and the switch's MAC address, with the priority value listed first. For example, if a Cisco switch has the default priority value of 32,768 and a MAC address of 11-22-33-44-55-66, the BID would be 32768:11-22-33-44-55-66. Therefore, if the switch priority is left at the default, the MAC address is the deciding factor.

Switches are a lot like people - when they first arrive, they announce that they are the center of the universe! Unlike some people, the switches will soon get over it. BPDUs will be exchanged until one switch is elected Root Bridge, and it's the switch with the lowest BPDU that will end up being the Root Bridge.

If STP is left totally alone, a single switch is going to be the root bridge for every single VLAN in your network. Worse, that single switch is going to be selected because it has a lower MAC address than every other switch, which isn't exactly the criteria you want to use to select a single root bridge.

The time will definitely come when you want to determine a particular switch to be the root bridge for your VLANs, or when you will want to spread the root bridge workload. For instance, if you have 50 VLANs and five switches, you may want each switch to act as the root bridge for 10 VLANs each. You can make this happen with the spanning-tree vlan root command.

SW1(config)#spanning-tree vlan 1 ?

forward-time Set the forward delay for the spanning tree

hello-time Set the hello interval for the spanning tree

max-age Set the max age interval for the spanning tree

priority Set the bridge priority for the spanning tree

root Configure switch as root


In this example, we've got two switches, and SW1 has been elected the root bridge for VLANs 10, 20, and 30. We'll use the spanning-tree vlan root command on SW2 to make it the root bridge for VLANs 20 and 30.

SW2(config)#spanning-tree vlan 20 root primary

SW2(config)#spanning-tree vlan 30 root primary

SW2#show spanning vlan 20

VLAN0020

Spanning tree enabled protocol ieee

Root ID Priority 24596

Address 000f.90e2.1300

This bridge is the root

SW2#show spanning vlan 30

VLAN0030

Spanning tree enabled protocol ieee

Root ID Priority 24606

Address 000f.90e2.1300

This bridge is the root

SW 2 is now the root bridge for both VLAN 20 and 30. Notice that the priority value has changed from the default of 32768.

In the next CCNP / BCMSN tutorial, we'll take a look at more STP features.

Cisco CCNP / BCMSN Exam Tutorial: Changing The Active Router In HSRP

To pass the BCMSN exam and earn your CCNP certification, you've got to know HSRP inside and out. While the operation and basic commands of HSRP are pretty simple, there are some important details that are easily overlooked but are vital in getting HSRP to work the way you want it to. Let's take a look at using the priority command correctly on both the exam and in production networks.

A key value in the show standby command is the priority. The default is 100, and the router with the highest priority will be the primary HSRP router. We'll raise the default priority on R2 and see the results. R3 is currently the Active router and R2 the standby, so let's raise the priority on R2 and see what happens.

R2(config)#interface ethernet0

R2(config-if)#standby 5 priority 150


R2#show standby

Ethernet0 - Group 5

Local state is Standby, priority 150

Hellotime 4 sec, holdtime 12 sec

Next hello sent in 0.896

Virtual IP address is 172.12.23.10 configured

Active router is 172.12.23.3, priority 100 expires in 8.072

Standby router is local

1 state changes, last state change 00:14:24

R2 now has a higher priority, but R3 is still the active router. R2 will not take over as the HSRP primary until R3 goes down - OR the preempt option is configured on R2.

R2(config-if)#standby 5 priority 150 preempt


1d11h: %STANDBY-6-STATECHANGE: Ethernet0 Group 5 state Standby -> Active


R2#show standby

Ethernet0 - Group 5

Local state is Active, priority 150, may preempt

Hellotime 4 sec, holdtime 12 sec

Next hello sent in 1.844

Virtual IP address is 172.12.23.10 configured

Active router is local

Standby router is 172.12.23.3 expires in 10.204

Virtual mac address is 0000.0c07.ac05

2 state changes, last state change 00:00:13

In just a few seconds, a message appears that the local state has changed from standby to active. Show standby confirms that R2, the local router, is now the active router - the primary. R3 is now the standby. So if anyone tells you that you have to take a router down to change the Active router, they're wrong - you just have to use the preempt option on the standby priority command.

Another vital part of HSRP configurations is knowing how to change the MAC address of the virtual router, as well as interface tracking. We'll look at those features in the next part of my HSRP tutorial!

Monday, December 22, 2008

CCNP Certification / BCMSN Exam Tutorial: HSRP MAC Addresses And Timers

To earn your CCNP certification and pass the BCMSN exam, you've got to know what HSRP does and the many configurable options. While the operation of HSRP is quite simple (and covered in a previous tutorial), you also need to know how HSRP arrives at the MAC address for the virtual router - as well as how to configure a new MAC for this virtual router. This puts us in the unusual position of creating a physical address for a router that doesn't exist!

The output of show standby for a two-router HSRP configuration is shown below.

R2#show standby

Ethernet0 - Group 5

Local state is Standby, priority 100

Hellotime 3 sec, holdtime 10 sec

Next hello sent in 0.776

Virtual IP address is 172.12.23.10 configured

Active router is 172.12.23.3, priority 100 expires in 9.568

Standby router is local

1 state changes, last state change 00:00:22

R3#show standby

Ethernet0 - Group 5

Local state is Active, priority 100

Hellotime 3 sec, holdtime 10 sec

Next hello sent in 2.592

Virtual IP address is 172.12.23.10 configured

Active router is local

Standby router is 172.12.23.2 expires in 8.020

Virtual mac address is 0000.0c07.ac05

2 state changes, last state change 00:02:08

R3 is in Active state, while R2 is in Standby. The hosts are using the 172.12.123.10 address as their gateway, but R3 is actually handling the workload. R2 will take over if R3 becomes unavailable.

An IP address was assigned to the virtual router during the HSRP configuration process, but not a MAC address. However, there is a MAC address under the show standby output on R3, the active router. How did the HSRP process arrive at a MAC of 00-00-0c-07-ac-05?

Well, most of the work is already done before the configuration is even begun. The MAC address 00-00-0c-07-ac-xx is reserved for HSRP, and xx is the group number in hexadecimal. That's a good skill to have for the exam, so make sure you're comfortable with hex conversions. The group number is 5, which is expressed as 05 with a two-bit hex character. If the group number had been 17, we'd see 11 at the end of the MAC address - one unit of 16, one unit of 1.

The output of the show standby command also tells us that the HSRP speakers are sending Hellos every 3 seconds, with a 10-second holdtime. These values can be changed with the standby command, but HSRP speakers in the same group should have the same timers. You can even tie down the hello time to the millisecond, but it's doubtful you'll ever need to do that.

R3(config-if)#standby 5 timers ?

<1-254> Hello interval in seconds

msec Specify hello interval in milliseconds

R3(config-if)#standby 5 timers 4 ?

<5-255> Hold time in seconds

R3(config-if)#standby 5 timers 4 12

Another important HSRP skill is knowing how to change the Active router assignment. I'll show you how to do that, and how to configure HSRP interface tracking, in the next part of my CCNP / BCMSN exam tutorial!