Options

Hsrp

arsalan921arsalan921 Member Posts: 56 ■■□□□□□□□□
Hello All,

want to ask one question regarding HSRP...

we know that we can do load balancing with hsrp, for load balancing atleast two grops needed...

now in ccnp book i have only seen example of 2 vlans... for 1 vlan Router R1 can be used and for 2nd vlan Router R2 can be used....

now in real if we have for example 10 vlans ... vlan 1,2,3,4,5...10 ...

and i want first 5 vlans ( vlan 1 to 5) to use R1 and other 5 vlans ( vlan 6 to 10) to use R2...
all 10 vlans have different subnets...
how many groups needed ? 2 or more ?
and what will be default gateway ? from which vlans ?

Comments

  • Options
    tndfrtndfr Member Posts: 110
    arsalan921 wrote: »
    Hello All,

    want to ask one question regarding HSRP...

    we know that we can do load balancing with hsrp, for load balancing atleast two grops needed...

    now in ccnp book i have only seen example of 2 vlans... for 1 vlan Router R1 can be used and for 2nd vlan Router R2 can be used....

    now in real if we have for example 10 vlans ... vlan 1,2,3,4,5...10 ...

    and i want first 5 vlans ( vlan 1 to 5) to use R1 and other 5 vlans ( vlan 6 to 10) to use R2...
    all 10 vlans have different subnets...
    how many groups needed ? 2 or more ?
    and what will be default gateway ? from which vlans ?




    HSRP is not designed for this kind of scenario and this would be a very complex exercise but here we go...:

    ** short answer, you need 20 groups
    **long answer:


    -before we start thinking about load balancing, 10 vlan = 10 group in hsrp, so you need to set up each vlan with its corresponding hsrp group on each redundant router (assuming they are both capable of routing between vlans):
    *vlan 20=192.168.20.0 hsrp 20 ip address 192.168.20.1
    *vlan 30=192.168.30.0 hsrp 30 ip address 192.168.30.1
    *vlan 40=192.168.40.0 hsrp 40 ip address 192.168.40.1
    etc .....

    -for load balancing you need to do the same for each vlan, assigning a higher priority for one half of your vlan say VLAN 1,2,3,4,5 router A becomes active for those, and VLAN 6,7,8,9,10 Router B becomes active for those


    then you have the painful manual configuration of each client to set the corresponding default gateway, say to load balance vlan 20 you set one half as 192.168.20.1 and the other half as 192.168.20.2

    hope this helps and i hope other members will have their input, i am sure i missed something
    Working on CCNP 642-813 and finishing off MCSA.
  • Options
    ConstantlyLearningConstantlyLearning Member Posts: 445
    tndfr wrote: »
    HSRP is not designed for this kind of scenario...

    Can you expand on this please?

    Cheers.
    "There are 3 types of people in this world, those who can count and those who can't"
  • Options
    arsalan921arsalan921 Member Posts: 56 ■■□□□□□□□□
    @tndfr... thank you so much for your reply man...

    from your reply it is clear that for load balancing using hsrp
    number of groups in hsrp = number of vlans

    to keep it simple. lets have 4 vlans (instead of 10)... 2 for R1 and 2 for R2

    R1 ==> Active router for vlans 1 and 2 and Standby Router for vlans 3 and 4

    R2 ==> Active router for vlans 3 and 4 and Standby Router for vlans 1 and 2

    vlan1=192.168.1.0/24
    vlan2=192.168.2.0/24
    vlan3=192.168.3.0/24
    vlan4=192.168.4.0/24


    now the network Diagram you can imagine in your mind like...

    R1(fa0/1) and R2(fa0/2) connected to Layer-2 Switch(fa0/1 to R1 and fa0/2 to R2).

    R1(serial0/0) and R2(serial0/0)are connected to R3(s0/0 to R1 and s0/1 to R2)

    On Switch there are 4 workstations in 4 different vlans. 1 in each Vlan.

    R3
    / \
    R1 R2
    \ /
    Switch
    | | | |
    1 2 3 4




    one question here, do we need to give ip address at the ethernet interfaces of R1 and R2 which are connected to layer 2 switch. i have seen some examples in which ip address is assigned to ethernet interfaces and some in which ip address is assigned to only vlan interfaces..

    ========================
    hsrp configuration on R1
    ========================

    interface vlan 1
    ip address 192.168.1.1 255.255.255.0
    standby 1 ip 192.168.1.10
    standby 1 priority 200
    standby 1 preempt

    interface vlan 2
    ip address 192.168.2.1 255.255.255.0
    standby 2 ip 192.168.2.10
    standby 2 priority 200
    standby 2 preempt

    interface vlan 3
    ip address 192.168.3.1 255.255.255.0
    standby 3 ip 192.168.3.10
    standby 3 priority 100
    standby 3 preempt

    interface vlan 4
    ip address 192.168.4.1 255.255.255.0
    standby 4 ip 192.168.4.10
    standby 4 priority 100
    standby 4 preempt

    ========================
    hsrp configuration on R2
    ========================

    interface vlan 1
    ip address 192.168.1.2 255.255.255.0
    standby 1 ip 192.168.1.10
    standby 1 priority 100
    standby 1 preempt

    interface vlan 2
    ip address 192.168.2.2 255.255.255.0
    standby 2 ip 192.168.2.10
    standby 2 priority 100
    standby 2 preempt

    interface vlan 3
    ip address 192.168.3.2 255.255.255.0
    standby 3 ip 192.168.3.10
    standby 3 priority 200
    standby 3 preempt

    interface vlan 4
    ip address 192.168.4.2 255.255.255.0
    standby 4 ip 192.168.4.10
    standby 4 priority 200
    standby 4 preempt



    is this configuration correct ?
  • Options
    tndfrtndfr Member Posts: 110
    Can you expand on this please?

    Cheers.

    from what i read and from my humble understanding, HSRP is indeed designed for redundancy, load balancing however is a different matter, there is manual intervention at each step of the load balancing process (assign duplicate groups, assign manual gateway on the client side.... etc).

    in a lab environment it doesnt seem much but in a real network it is an absolute nightmare to load balance with HSRP, thats why there is GLBP.
    Working on CCNP 642-813 and finishing off MCSA.
  • Options
    tndfrtndfr Member Posts: 110
    arsalan921 wrote: »
    @tndfr... thank you so much for your reply man...

    from your reply it is clear that for load balancing using hsrp
    number of groups in hsrp = number of vlans

    to keep it simple. lets have 4 vlans (instead of 10)... 2 for R1 and 2 for R2

    R1 ==> Active router for vlans 1 and 2 and Standby Router for vlans 3 and 4

    R2 ==> Active router for vlans 3 and 4 and Standby Router for vlans 1 and 2

    vlan1=192.168.1.0/24
    vlan2=192.168.2.0/24
    vlan3=192.168.3.0/24
    vlan4=192.168.4.0/24


    now the network Diagram you can imagine in your mind like...

    R1(fa0/1) and R2(fa0/2) connected to Layer-2 Switch(fa0/1 to R1 and fa0/2 to R2).

    R1(serial0/0) and R2(serial0/0)are connected to R3(s0/0 to R1 and s0/1 to R2)

    On Switch there are 4 workstations in 4 different vlans. 1 in each Vlan.

    R3
    / \
    R1 R2
    \ /
    Switch
    | | | |
    1 2 3 4




    one question here, do we need to give ip address at the ethernet interfaces of R1 and R2 which are connected to layer 2 switch. i have seen some examples in which ip address is assigned to ethernet interfaces and some in which ip address is assigned to only vlan interfaces..

    ========================
    hsrp configuration on R1
    ========================

    interface vlan 1
    ip address 192.168.1.1 255.255.255.0
    standby 1 ip 192.168.1.10
    standby 1 priority 200
    standby 1 preempt

    interface vlan 2
    ip address 192.168.2.1 255.255.255.0
    standby 2 ip 192.168.2.10
    standby 2 priority 200
    standby 2 preempt

    interface vlan 3
    ip address 192.168.3.1 255.255.255.0
    standby 3 ip 192.168.3.10
    standby 3 priority 100
    standby 3 preempt

    interface vlan 4
    ip address 192.168.4.1 255.255.255.0
    standby 4 ip 192.168.4.10
    standby 4 priority 100
    standby 4 preempt

    ========================
    hsrp configuration on R2
    ========================

    interface vlan 1
    ip address 192.168.1.2 255.255.255.0
    standby 1 ip 192.168.1.10
    standby 1 priority 100
    standby 1 preempt

    interface vlan 2
    ip address 192.168.2.2 255.255.255.0
    standby 2 ip 192.168.2.10
    standby 2 priority 100
    standby 2 preempt

    interface vlan 3
    ip address 192.168.3.2 255.255.255.0
    standby 3 ip 192.168.3.10
    standby 3 priority 200
    standby 3 preempt

    interface vlan 4
    ip address 192.168.4.2 255.255.255.0
    standby 4 ip 192.168.4.10
    standby 4 priority 200
    standby 4 preempt



    is this configuration correct ?


    what exam are you studying for 642-813 or 6426-902?

    lets say you have a 2950 switch that doesnt support layer 3 functionalities and you have assigned 4 vlans in that switch.

    R1 and R2 dont have that many physical interfaces so you cant assign an ip address for each vlan on each interface.

    This is where trunking, encapsulation and sub interfaces comes in. the ports that connect the two routers to the switch has to be in trunk mode (so all vlan pass through to the routers), the routers' interface has to also be trunking with the same encapsulation as the switch, you then define sub interface on the router itself for each vlan.

    an alternative is two have to layer 3 switches instead of two routers, in that case you can define the vlan interface (SVIs) (as shown in your configuration) on both switches.

    is this a real scenario?
    Working on CCNP 642-813 and finishing off MCSA.
  • Options
    deth1kdeth1k Member Posts: 312
    In your scenario you will want to split traffic of those 10 vlans between two routers making one of them primary for vlans 1 -5 and the second one primary for 6-10. You'll need an HSRP group for each vlan so that will come to 10.
    Its easy to load balance with HSRP as long as you tweak your IGP/BGP metric to avoid Asymetric routing.
  • Options
    arsalan921arsalan921 Member Posts: 56 ■■□□□□□□□□
    thank you deth1k for your reply... wud like to ask one thing what do u mean by tweak your IGP/BGP metric to avoid Asymetric routing.. didnt get this part. can u pls give one short example..

    @tndfr.. preparing for switch...and this is not a real scenario, just had an idea of it...thanks for your help
  • Options
    deth1kdeth1k Member Posts: 312
    Ok so, what i mean is:

    you will have two routers active/standby with each one responsible for forwarding traffic from 5 vlans assigned to each of them (10 in total). Those two routers will either peer with an ISP router or maybe your enterprise core. To avoid asymetric routing we will assign better metric for active routes on the router which is active on those subnets and vise versa. That way traffic will leave and come back the same way. This is importaint if you are running latency/jitter sensitive applications.

    To simplify this:

    say R1 is active for 192.168.1.0/24 so we will assign it cost/metric of 5, R2 on the other hand is a backup router for this subnet so we will give it a cost of 10.

    This way we will follow the same path and in case of failure of R1 lower cost route will be withdrawn from its neighbors routing tables and R2s route be prefered.

    HTH
Sign In or Register to comment.