Computer's Static Routes being overridden by Switch Gateway

I have two buildings connected with fiber L3 switched using different subnets.

Building 1
192.168.0.0/24

Building 2
192.168.1.0/24

I have a 3rd party router at Building 2 that I need to tunnel out through a specific LAN IP its using, 192.168.1.150. So I set a static route on individual PCs at Building 2 so that when they try to go to 10.10.10.10 (example IP) it routes them to 192.168.1.150, everything is working good there.

Now Building 1, that same route does not work. We can ping all devices, even the 192.168.1.150 address, however if I set the same static route to the 192.168.1.150 address it doesn't reach its destination. A Tracert shows it hitting my Building 1 core-switch, then being forwarded to our Firewall, then out to the internet looking for the 10.10.10.10 address. So basically it knows it should be going across the fiber but once it gets to my switch the switch thinks it should be going out to the internet.

I can solve the problem by adding the same routing on the switches but ideally I want this route only to be in place for individuals we've added the Route for.

Does anyone have any suggestions?

Is there some way to program in multi-level static routes to guide it through each hop across the switches?

Thanks!
MikeC7Asked:
Who is Participating?
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.

JustInCaseCommented:
So basically it knows it should be going across the fiber but once it gets to my switch the switch thinks it should be going out to the internet.
Basically, routing works this way:
- find most specific rule (route) for this packet on this router (route on PC is ignored if not directly connected)
- if there is no more specific route than default route - use default route (if there is one)
- each L3 device process packets according to its own routing table

Since switch use default route to send frames - you should add more specific route to that switch.
ip route 10.10.0.0 255.255.0.0 192.168.1.151 <-- whatever IP address on the other side of your tunnel is - that should be your next hop address (if this device is tunnel device - if it is not than need to point to next router (L3 switch) on path to get to tunnel)

You can't use route .150 on both sides, next hop address should not point to sending router.
Check your routing table(s), if just one router along path does not have more specific route than default route, packet will be forwarded using default route on that L3 device.

Also for packet to return - other side needs to know where is sender located, otherwise default route will also be used.

As you already said, maybe you should use routing protocol, when network grows and gets more complex using (changing) static routes is time consuming and it does not give you any flexibility.
0

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
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
Switches / Hubs

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.