12-20-2016 07:26 AM - edited 03-08-2019 08:39 AM
Hi guys. I was doing lab to test hsrp with ospf in packet tracer and noticed weird thing if i shutdown active hsrp node router connected to hsrp l3 switches doesnt update r.table automatically with new path trough new active hsrp node (l3switch). Only after I reset ospf process on router C then new path had installed .
l3switches with hsrp A &B , router C on bottom connected to those A & B , ospf on all of them .
As I remember when hsrp node get active it send arp broadcast with virtual mac address to all neighbor switches . As I understand ospf doens't know anything about hsrp .
How ospf chose , get informed which path to select if both path are equal ? as I see it always chose path trough active hsrp node.
12-20-2016 08:24 AM
You're not using HSRP IPs for OSPF neighbor IPs, are you?
12-20-2016 08:39 AM
I am using them too.
12-20-2016 09:26 AM
Not quite sure what you mean by "too". However, with OSPF, you don't want to use HSRP addresses with it, use physical interface IPs.
HSRP is principally for clients, providing a virtual GW IP.
You can use both, but don't mix them.
12-20-2016 10:34 AM
too means that subnet is advertised in ospf . Do you mean I should not advertise that network ? i dont follow you ... that network is where my servers are connected and should be reachable from other sites, so I need to include it in ospf with network statement.
But the question is not about that, I was trying to figure it out: as I see ospf on router C always chose path trough active hsrp node, how it's possible , mechanism? As I know hsrp when node is active he sends arp broadcast to neighbors to inform who is active but its on layer 2 , OSPF is on layer 3 ... not clear
12-20-2016 11:04 AM
Yes, I too am confused how you're using OSPF and HSRP. OSPF and HSRP should be configured such that they are totally independent.
e.g.
Interface X
ip address 192.168.1.2 255.255.255.0
standby ip 192.168.1.1
router ospf 10
network 192.168.1.2 0.0.0.0 area 0
If you doing like the above, you should be okay, but Packet Tracer doesn't always work as real routers would.
12-20-2016 11:57 AM
as i remember by doing this u just telling router on which interface you want to enable routing/which interf. u want to advertise, nothing more :
router ospf 10
network 192.168.1.2 0.0.0.0 area 0
so u still advertising whole network 192.168.1.0/24 .
Regards ospf and hsrp I saw that they are independent and not intercommunicate in one of the discussions today , so its true....and thing that ospf chose path over active hsrp node was just coincidence ...
12-20-2016 12:47 PM
as i remember by doing this u just telling router on which interface you want to enable routing/which interf. u want to advertise, nothing more :
router ospf 10
network 192.168.1.2 0.0.0.0 area 0so u still advertising whole network 192.168.1.0/24 .
Correct.
However if you tried:
network 192.168.1.2 0.0.0.0 area 0
It should skip pulling the /24 into OSPF.
If you tried:
network 192.168.1.0 0.0.0.3 area zero
If should also advertise 192.168.1.0/24
I just wanted to make sure you weren't trying to use HSRP IP as OSPF IPs.
Again, I would be a bit suspect of the correct operation of packet tracer.
12-21-2016 08:48 AM
..
12-21-2016 08:48 AM
yeeah, it was pulling l whole /24 subnet, even by default "ip classless" is enabled looks like its bug on packet tracer.
but the main thing we clarified that HSRP and OSPF are independent.
I repeated my lab in gns3: ospf shows both path in routing table (through active and standby hsrp node)and tracert sends packet to one then to second hsrp nodes till it hit destination. Which is not good , so HSRP with ospf is bad idea.
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide