Computer's Static Routes being overridden by Switch Gateway

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

Building 1

Building 2

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

Now Building 1, that same route does not work. We can ping all devices, even the address, however if I set the same static route to the 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 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?

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.

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 <-- 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.

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.