Showing posts with label standby. Show all posts
Showing posts with label standby. Show all posts

Thursday, December 25, 2008

Cisco CCNP Certification / BCMSN Exam Tutorial: The HSRP MAC Address

To pass the BCMSN exam and earn your CCNP, you've got to know HSRP inside and out! Part of that is knowing how the MAC address of the virtual router is derived, and another part is knowing how to change this address. We'll look at both features in this tutorial.

We've got two routers on a segment running HSRP, so first we need to find out what the MAC address of the HSRP virtual router is. The show command for HSRP is show standby, and it's the first command you should run while configuring and troubleshooting HSRP. Let's run it on both routers and compare results.

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 statically assigned to the virtual router, 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.

On rare occasions, you may have to change the MAC address assigned to the virtual router. This is done with the standby mac-address command. Just make sure you're not duplicating a MAC address that's already on your network!

R2(config-if)#standby 5 mac-address 0000.1111.2222


1d12h: %STANDBY-6-STATECHANGE: Ethernet0 Group 5 state Active -> Learn


R2#show standby

Ethernet0 - Group 5

Local state is Active, priority 150, may preempt

Hellotime 4 sec, holdtime 12 sec

Next hello sent in 3.476

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.1111.2222 configured

4 state changes, last state change 00:00:00


1d12h: %STANDBY-6-STATECHANGE: Ethernet0 Group 5 state Listen -> Active

The MAC address will take a few seconds to change, and the HSRP routers will go into Learn state for that time period.

A real-world HSRP troubleshooting note: If you see constant state changes with your HSRP configuration, do what you should always do when troubleshooting - check the physical layer first. Best of luck on your BCMSN exam!

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: Getting Started With HSRP

Defined in RFC 2281, HSRP is a Cisco-proprietary protocol in which routers are put into an HSRP router group. Along with dynamic routing protocols and STP, HSRP is considered a high-availability network service, since all three have an almost immediate cutover to a secondary path when the primary path is unavailable.

One of the routers will be selected as the primary ("Active", in HSRP terminology), and that primary will handle the routing while the other routers are in standby, ready to handle the load if the primary router becomes unavailable. In this fashion, HSRP ensures a high network uptime, since it routes IP traffic without relying on a single router.

The hosts using HSRP as a gateway don't know the actual IP or MAC addresses of the routers in the group. They're communicating with a pseudorouter, a "virtual router" created by the HSRP configuration. This virtual router will have a virtual MAC and IP adddress as well.

The standby routers aren't just going to be sitting there, though! By configuring multiple HSRP groups on a single interface, HSRP load balancing can be achieved.

Before we get to the more advanced HSRP configuration, we better get a basic one started! We'll be using a two-router topology here, and keep in mind that one or both of these routers could be multilayer switches as well. For ease of reading, I'm going to refer to them only as routers.

R2 and R3 will both be configured to be in standby group 5. The virtual router will have an IP address of 172.12.23.10 /24. All hosts in VLAN 100 should use this address as their default gateway.

R2(config)#interface ethernet0

R2(config-if)#standby 5 ip 172.12.23.10

R3(config)#interface ethernet0

R3(config-if)#standby 5 ip 172.12.23.10

The show command for HSRP is show standby, and it's the first command you should run while configuring and troubleshooting HSRP. Let's run it on both routers and compare results.

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

We can see that R3 has been selected as the Active router ("local state is Active"), the virtual router's IP is 172.12.23.10, and R2 is the standby router.

There are some HSRP values that you'll need to change from time to time. What if we want R2 to be the Active router instead? Can we change the MAC address of the virtual router? I'll answer those questions in the next part of this HSRP tutorial!