INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Jobs

General Configuration

How to setup two OSPF Default Routes with one being preferred by baddos
Posted: 10 Nov 03

You might want to have two routers on your network be default gateways, but with one being preferred. You can do this quite easily with ospf.

Example

Let's say we have three routers. Router A is a router connecting to ISP1, Router B is connecting to ISP2, and Router C connects your local networks together. Both Router A and B have static default routes to their neighbor (ISP's) router. If their links go down, the static route will be temporary removed from their routing (forwarding) tables.

You have redundant ISPs with redundant hardware and need to find a way for Router C to failover to another router if one goes down. We can do this with ospf metrics.

We setup OSPF to run on Router A (We prefer this ISP).
Router A Configuration
configure terminal
router ospf 100
! Setup the router to run ospf in process 100
 log-adjacency-changes
 network xxx.xxx.xxx.xxx xxx.xxx.xxx.xxx area 0
! Tell the router to run with your local ethernet interface's IP netblock
 default-information originate metric 100
! Announce to other OSPF routers a default route using a metric of 100

Router B Configuration
configure terminal
router ospf 100
! Setup the router to run ospf in process 100
 log-adjacency-changes
 network xxx.xxx.xxx.xxx xxx.xxx.xxx.xxx area 0
! Tell the router to run with your local ethernet interface's IP netblock
 default-information originate metric 110
! Announce to other OSPF routers a default route using a metric of 110
!(110 > 100 so this router has a less desirable default route).

Router C Configuration
configure terminal
router ospf 100
! Setup the router to run ospf in process 100
 log-adjacency-changes
 network xxx.xxx.xxx.xxx xxx.xxx.xxx.xxx area 0
! Tell the router to run with your local ethernet interface's IP netblock

Now we can check out the routing table for Router C. It should only show one default route, and it is using Router A. If you were to turn off Router A, Router B will take over.

Back to Cisco: Routers FAQ Index
Back to Cisco: Routers Forum

My Archive

Resources

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close