Cisco 3750 Stack and default static route (ip route

Hi Guys,
This morning I had to change the default route in my Cisco Stack so I ran the command:
# ip route x.x.x.x

to my surprise this didn't replace the default route just added the new route so I ended up with 2 default routes
When realized this I removed the old default route, so I ran the command:
# no ip route y.y.y.y

My Question:
What would happen if I leave the 2 default routes configured at the same time?
Would one be the backup of the other?

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.

Firstly, is routing enabled? If yes, then this command would take precedence, otherwise the "ip default-gateway" command would take charge.

Second, if you have 2 ip route statements, then the network segments defined in each will take the gateway defined.

So, if you have

ip route ser0/0/0
ip route fa0/0

Then, traffic destined for the 192 segment would go out the fa0/0 interface and the rest would go out the other.
If you use multiple ip route commands to configure a default route, traffic is load-balanced over the multiple routes.
AkinsdNetwork AdministratorCommented:
You can set different distance metrics for both routes.
The lower metric would take precedence

Router(config)#ip route ?
  <1-255>  Distance metric for this route

The default metric is 1 if nothing is specified
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.

cargexAuthor Commented:
Hi Akinsd,
What you are saying is exactly what I need.

I would like to have a backup Internet access in case the main one goes down.

The main Internet access is Fiber and the backup is Coax, so obviously I want the Fiber to be the preferred link unless it goes down.

So, if I already have a default route configured and I run the following command to add a new route

(config)# ip route 50

That would add the new default route with a metric of 50, and as far as the traffic goes, it will be sent through the original default route unless it is down bacause the original default route has precedence of "1" by default?
cargexAuthor Commented:
Hi Guys, are my assumptions correct?
Yes, that's correct.
Don JohnstonInstructorCommented:
Hi Guys, are my assumptions correct?
Well, there's just one catch...
In order for the route that has the higher administrative distance to be used, the link that the route with the lower AD uses has to be detected as down.

So if the link that the preferred path uses isn't seen as down, the switch will continue to (attempt)  to use it.

This is where object tracking comes in handy.

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
DJ is correct, your "50" is adjusting administrative distance, not metric. This is always the issue with static routes unless object tracking is used: Unless the link is seen as down by the router, it has no way of knowing whether the next hop is actually reachable. And since the stack is connected to ethernet, it's almost certainly going to appear to be "up" unless you have a point-to-point link with no other equipment in between.
cargexAuthor Commented:
That object tracking seems to be what I'm looking for.

What is this "object tracking" you are talking about.
What are the pros and cons of using object tracking?
cargexAuthor Commented:
Is this object tracking possible to configure in Cisco 3750 switch?
Or do I need a Cisco router?
Don JohnstonInstructorCommented:
Basically, you specify an "object" IP address that gets pinged periodically and is associated with a route. If the object doesn't respond, that route gets removed.

On a phone now, but if you Google "cisco static route object tracking" you will find a couple white papers with sample configs.
whether you can do it on a 3750 may depend on the version but also which train you have (standard LAN vs. enterprise). Here's an example. If you can put in the first line, you're probably good:
track 1 ip sla 1 reachability
ip sla 1
 timeout 800
 threshold 1200
 frequency 1
ip sla schedule 1 life forever start-time now
ip route track 1
cargexAuthor Commented:
Thank you very much guys, your help is greatly appreciated!
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.