cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1807
Views
0
Helpful
7
Replies

HSRP mac address allocation

kamlesh_s1181
Level 1
Level 1

Hi all,

I have a confusion about HSRP mac address My scenerio is:--

I have one access layer switch connected to two distribusion layer switch.for Vlan 2,3,4,5 i am using HSRP now for vlan 2 & 3 dist-sw1 is active and for vlan 4 & 5 dist-sw2 is active.

hostname dist-sw1

int vlan 2

ip add 10.2.2.2 255.255.255.0

standby 1 ip 10.2.2.1

standby 1 priority 105

int vlan 3

ip add 10.3.3.2 255.255.255.0

standby 1 ip 10.3.3.1

standby 1 priority 105

int vlan 4

ip add 10.4.4.2 255.255.255.0

standby 2 10.4.4.1

int vlan 5

ip add 10.5.5.2

standby 2 ip 10.5.5.1

hostname dist-sw2

int vlan 2

ip add 10.2.2.3 255.255.255.0

standby 1 ip 10.2.2.1

int vlan 3

ip add 10.3.3.3 255.255.255.0

standby 1 ip 10.3.3.1

int vlan 4

ip add 10.4.4.3 255.255.255.0

standby 2 10.4.4.1

standby 2 priority 105

int vlan 5

ip add 10.5.5.3 255.255.255.0

standby 2 ip 10.5.5.1

standby 2 priority 105

MAC addresses used by HSRP 0000.0c07.ac** (** - HSRP grp #) so for mac address 0000.0c07.ac01 traffic will go to dist-sw1. but now suppose vlan 2 goes down in dist-sw1 and for vlan 2 switch dist-sw2 will become active it will register the virtual ip and mac for it port.

now my question is how acc-sw1 will diffrenciate that traffic for mac add 0000.0c07.ac01 will go dist-sw1 or dist-sw2 because both will use the same mac address

thanks in advance

Kamlesh Sharma

7 Replies 7

Hello Kamlesh,

the virtual MAC address (and IP address) are shared amoung the group of routers running HSRP. It is always the active router that receives and routes packets destined for that MAC address.

You might want to check this link, it explains the principle in somewhat more detail:

Configuring the Hot Standby Router Protocol

http://www.cisco.com/univercd/cc/td/doc/product/software/ios122/122cgcr/fipr_c/ipcprt1/1cfip.htm#wp1001531

Does that make sense ?

Regards,

GP

Hi gpauwen,

Question is something different.on access layer switch mac-address table mac add 0000.0c07.ac01 for standby group 1 will be register by dis-sw1 and dist-sw2 both. now if the packet come to access switch how it differentiate where it has to send for vlan 2 ,3 ,4 .5 i can't understand this.

Thanks in advance

Kamlesh Sharma

HI kamlesh

As per u r question see it entirely depends upon the configuaration of u r default gateway but before that u r access switch is in which vlan and what gateway u have configured on u r switch and morever u r switch is like a normal host on a network it has nothing to do with routing.The packets from u r hosts will go to the dis-switch through uplinks which are connected to u r dis-switch there the routing dicisions r make not at the access-layer.As u r hosts will configured with hot standby ip as a gateway address which is common on two switches for a particular SVI ok.

hope this hepls

Mahmood

Hi mahmoodmkl,

I am confused about switching of the packet based on mac address bcos mac add 0000.0c07.ac01 for standby group 1 will be pointing to both the dis-sw1 and dist-sw2 uplink right. suppose dist-sw1 and dis-sw2 are connected to fa0/1 and fa0/2 accordingly now if the packet destination for the packet is 0000.0c07.ac01 than where the packet will go to fa0/1 or fa0/2 or to both the link.

I think now it's very clear

Thanks in advance

Kamlesh Sharma

HI kamlesh

As u have said that the mac address will be pointing towards the uplinks i did not get u .btw the mac address does not points to any links it points to the hot stadby ip address which is configured on u r clients as the default gateway address.this has nothing to do with u r uplinks.suppose if one of u r dsw goes down the hot stadny ip address and mac address will be switched to the other dws ok.so automatically all u r traffic will to the active router.And can u gives tell us where r u r fa0/1 and fa0/2 r connected r they connected to any switch or router.

give us a diagram so that we may be helpful to u .

Thanks

Mahmood

Hi

This is mac address table of switch.

1- Normal

you can see that mac 0000.0c07.ac01 is pinting to fastethernet0/1 connected to dist-sw1 and 0000.0c07.ac02 pointing to fastethernet0/2 connected to dist-sw2 in normal condition

DestAddress AddType VLAN Destination Port

------------------- ------------ ---- ---------------

0000.0c07.ac01 Dynamic 2 FastEthernet0/1

0000.0c07.ac01 Dynamic 3 FastEthernet0/1

0000.0c07.ac02 Dynamic 4 FastEthernet0/2

0000.0c07.ac02 Dynamic 5 FastEthernet0/2

2- once Vlan 3 goes down in dist-sw1 and dist-sw2 become active then mac address table

DestAddress AddType VLAN Destination Port

------------------- ------------ ---- ---------------

0000.0c07.ac01 Dynamic 2 FastEthernet0/1

0000.0c07.ac01 Dynamic 3 FastEthernet0/2

0000.0c07.ac02 Dynamic 4 FastEthernet0/2

0000.0c07.ac02 Dynamic 5 FastEthernet0/2

Now according to this output same mac address are pointing to different port. OK

Now my question is if destination of a packet is 0000.0c07.ac01 then by which port packet will be forwarded from fastethernet0/1 or fastethernet0/2.

Thanks in advance

Kamlesh Sharma

Hi Kamlesh,

You cannot have the same Mac on 2 diffrent ports on the switch. Now to clear your doubt, it is the Active router which provides the HSRP MAC-address to your clients when they generate an ARP request. As the router is the defualt gateway for your cleints so it will provide the required MAC-address just as a proxy does. Now your clients know how to get to the gateway and also the MAC is on the port which is connecting the router. When a frame comes your access switch see that MAC and forwards it to active router.

When your Active router goes down the same work is being done by the router which is active now.It will again provide the MAC-addrress to the clients for which it is acting as a gateway.

Hope that clears that out .

regards,

-amit singh