Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Assuming I have a fairly small network internally, but I have 4 routers each connected out to a different network. The routers are all sat next to each other connected via a switch. Each router uses BGP to speak to the outside networks. There is an iBGP mesh for each router to exchange the routes internally it knows about from each external network.

The usual setup is to use OSPF to distribute the connected routes, as the routes via iBGP will still have the next hop set to their original value.

What is the advantage of using OSPF in this scenario versus simply using 'set nexthop self' on the routes?

share|improve this question
I am curious if you ever ended up going with a pure iBGP setup or other? I am in the exact same predicament at the moment and have this working with a policy to set received eBGP routes to next-hop self for iBGP neighbors. I am curious of the pitfalls. – Andy Shinn Jan 19 '13 at 5:15

OSPF is way faster reacting to topology changes than BGP, so it's a basis for loop/blackhole avoidance.

share|improve this answer

For maximum scalability, virtually all large networks use an IGP (OSPF or IS-IS or other) to distribute the loopbacks of all their routers, as well as all the routed links between them. Then all of the "customer" or "external" routes are sent from one router to another via BGP. This keeps the IGP routing table small, which means it converges quickly.

Your question doesn't really make sense the way it's written though - set nexthop self has a particular way it's supposed to be used, and your example isn't it.

share|improve this answer

Advantage of OSPF is the fact that adding new routers is relatively simple; you don't have to take the steps of configuring a new iBGP peer on every single routers in the AS each time (since you must run in a full mesh) - obviously this can be negated using a confederation or route-reflector server and if you wish to go down this route, fine. next-hop-self is generally mandatory unless you happen to have multiple routers that are on-link for a single peer (e.g. two of your routers sit in a /29 with a BGP neighbour)

Another point of note however is the fail times; by default, OSPF is faster at reacting to topology changes than BGP. However, tuning of BGP timers can afford you very similar failover times as well.

In essence; if you wish to keep your IGP simple in terms of both administrative overhead and configuration, use OSPF.

If on the other hand you anticipate needing/wanting to do exotic/complex routing configurations, use BGP.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.