HSRP with OSPF routing

My 2 cores Catalyst 3750 have hsrp configured to provide gateway redundancy for the access switches. I'd like to implement OSPF routing between the cores and the WAN router see pic). But I am not sure which subnet I should use between the cores and the WAN router. Also, I'd like to know if there are any sample config for HSRP with OSPF because I have never done it. Thanks

Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Henk van AchterbergSr. Technical ConsultantCommented:
you can choose any 2 /30 networks you like for the link between the router and the switches.

you just set up three ospf links, router-switch (2x) and switch-switch and it will failover.
Don JohnstonInstructorCommented:
But I am not sure which subnet I should use between the cores and the WAN router.
I think that you're over thinking this.  As Henk stated, use any (unused) network between the cores and WAN router.  HSRP and OSPF are irrelevant at this point. First, just get connectivity established.  Then configure OSPF.

Also, I'd like to know if there are any sample config for HSRP with OSPF because I have never done it.
Running OSPF with HSRP is a non-issue.  The two protocols are independent of each other. The OSPF config that you use on a switch that is not running HSRP is exactly the same config if the switch is running HSRP.
leblancAccountingAuthor Commented:
From the access switch to the core, it will just be layer 2 so there is no need for OSPF there. Not to reinvent the wheel, I am just wondering if you know any site with a sample config of HSRP and OSPF. Thanks
Big Business Goals? Which KPIs Will Help You

The most successful MSPs rely on metrics – known as key performance indicators (KPIs) – for making informed decisions that help their businesses thrive, rather than just survive. This eBook provides an overview of the most important KPIs used by top MSPs.

Don JohnstonInstructorCommented:
Layer 2 between the cores and the WAN router? What are the IP addresses of the WAN router interfaces?
leblancAccountingAuthor Commented:
Layer 3 between the cores and the WAN router.
Layer 2 between the cores and the access switch
Don JohnstonInstructorCommented:
once again, what are the IP addresses assigned to the WAN router interfaces?
leblancAccountingAuthor Commented:
That was one of my questions. I was thinking just a /30, like (f0/0) and (f1/0) on the router.
Don JohnstonInstructorCommented:
Okay. That will work. But I would go with (f0/0) and (f1/0). That way you preserve your VLAN-to-subnet scheme (VLAN 30 =, VLAN 40 =, etc).

Then just enable OSPF on the cores and WAN router like you normally would.
leblancAccountingAuthor Commented:
Great. Now I am a beginner when it comes to OSPF, so I have a quick question. When I enable ospf on f0/1 of core 1 and core 2, it will advertise & Correct? Or do I have to enable OSPF under vlan 10 and vlan20 as well?
What I am trying to understand is when you enable OSPF on an interface or use the command network (under ROUTER OSPF 1 on core1 for example), it will just allow the interface to send the hello packets. How does it advertise the subnets that it knows?
Don JohnstonInstructorCommented:
I don't know what switches you have, but on most Cisco platforms, you don't actively enable OSPF on an interface (unless you've got a Nexus switch).  The "network" command defines which interfaces are classified as OSPF interfaces. Which, in a way, enables OSPF on the interface (how's that for talking out both sides of my mouth?).

When an interface is classified as an OSPF interface, it will attempt to form adjacencies out that interface (send hellos, LSA, etc.) and the network connected to that interface will be advertised to any OSPF neighbors.

So on your core switch, if you use the OSPF network command "network area 0", the switch will send hellos out all interfaces with an IP address starting with 10. And any network that begins with 10 will be advertised.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
leblancAccountingAuthor Commented:
So what is the pros and cons to use the below instead of network area 0, other than extra typing?

router ospf 1
network area 0
network area 0
network area
Don JohnstonInstructorCommented:
Well, that's how I do it so obviously that's the best and correct way.  ;-)

Seriously, the primary benefit is it allows you to make small changes later. For example, if you want to change the network to area 5, all you have to is delete the statement and then re-enter it with the new area number.  

But if you had used a network statement with, now you've got to remove OSPF from all the interfaces and recreate it.  Much more disruptive.
leblancAccountingAuthor Commented:
Make sense Don. I will go ahead and implement this to see how it goes. Thx
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.