Options

hsrp and secondary IP

marcusaureliusbrutusmarcusaureliusbrutus Member Posts: 73 ■■□□□□□□□□
Hi,

Can anyone explain to me the difference between HSRP and secondary IPs. Given the config below, will it function like hsrp?

int f0/0
ip address 10.1.1.1 255.255.255.0
ip address 10.1.1.2 255.255.255.0 secondary

Thanks in advance.

Comments

  • Options
    ColbyGColbyG Member Posts: 1,264
    HSRP is redundancy between two devices. All you have there is two IPs on the same subnet, which doesn't accomplish anything. If the device is down, so are both IPs. Secondary IP addresses are used to have more than one subnet on a broadcast domain, which is needed sometimes.

    If you were using HSRP here you would have two devices answering to a single IP, instead of one device answering to two IPs. If one of the devices in an HSRP group goes down, the standby device starts replying to the shared IP.
  • Options
    marcusaureliusbrutusmarcusaureliusbrutus Member Posts: 73 ■■□□□□□□□□
    Hi,

    Thanks for your reply. If i am going to implement the secondary IP scheme with hsrp, is the below format correct?

    R1
    int f0/0
    ip address 10.1.1.1 255.255.255.0
    standby 1 ip 10.1.1.2
    standby 1 priority 120
    standby 1 preempt
    ip address 10.1.2.1 255.255.255.0 secondary
    standby 2 ip 10.1.2.2
    standby 2 priority 110
    standby 2 preempt

    R2
    int f0/0
    ip address 10.1.1.3 255.255.255.0
    standby 1 ip 10.1.1.2
    standby 1 priority 110
    standby 1 preempt
    ip address 10.1.2.3 255.255.255.0
    standby 2 ip 10.1.2.2
    standby 2 priority 120
    standby 2 preempt

    So if R1 fails for example, R2 will be active for subnets 10.1.1.0 and 10.1.2.0.


    The thing is, i have two 3800 routers. Each router is connected to 2 different ISPs. If i wish to have redundancy and load balancing, is bgp and hsrp the way to go and do away with the secondary IP option altogether?

    Thanks again.
  • Options
    CyanicCyanic Member Posts: 289
    I don't know your network configuration, but it looks like you will have 2 subnets on the same vlan/broadcast domain. Are you sure you want to split the subnets on secondarys instead of sub interfaces?
  • Options
    marcusaureliusbrutusmarcusaureliusbrutus Member Posts: 73 ■■□□□□□□□□
    Hi,

    Yah, i think subinterfaces would be a better way to go. So is the below config correct?

    R1
    int f0/0.1
    ip address 10.1.1.1 255.255.255.0
    standby 1 ip 10.1.1.3
    standby 1 priority 120
    standby 1 preempt

    int f0/0.2
    ip address 10.1.2.1 255.255.255.0
    standby 2 ip 10.1.2.3
    standby 2 priority 110
    standby 2 preempt

    R2
    int f0/0.1
    ip address 10.1.1.2 255.255.255.0
    standby 1 ip 10.1.1.3
    standby 1 priority 110
    standby preempt

    int f0/0.2
    ip address 10.1.2.2 255.255.255.0
    standby 2 ip 10.1.2.3
    standby 2 priority 120
    standby 2 preempt


    And should i go with this redundancy option, will bgp only advertise the active hsrp group?

    Thanks.
Sign In or Register to comment.