cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
6576
Views
10
Helpful
7
Replies

ospf default information originate

Kashish_Patel
Level 2
Level 2

Could somebody explain me how is "default information originate" command different from creating a default route using "ip route 0.0.0.0 0.0.0.0 <next hop>" and further redistributing in ospf using "redistribute static" command? What are the advantages of just using "default information originate"? Does using default command point the router id as the default gateway to downstream routers?

3 Accepted Solutions

Accepted Solutions

Peter Paluch
Cisco Employee
Cisco Employee

Hi Kashish,

You've got such great questions on OSPF! I hope you don't mind me answering again but please say so if I am becoming too intrusive.

With OSPF, you can not redistribute the default route using the redistribute command. It is not a limitation of OSPF protocol itself, rather, it is a failsafe constraint built into Cisco IOS. It is done to prevent an inadvertent redistribution of the default route into OSPF from another routing protocol or from static routes. The only way to inject default route into OSPF (apart from the automatic injection at Area Border Routers for special types of areas) is to use the default-information originate command.

I have always liked the default-information originate command, anyway. It allows you to inject the default route very precisely. Doing the redistribute static is normally going to redistribute all static routes, and you need to configure route-maps to perform filtering so that only appropriate routes get redistributed. While there's no problem in doing that, at the same time, it is kind of inconvenient. Also, the default route, although it's just another route in the routing table, has a specific meaning to the routing: it represents the way out of your routing domain to all other networks. So it is not "just another route", rather, it's the "remaining world all around". Being a route with such a vast influence, it deserves to be tightly controlled - and ideally, it deserves a specific command, just like here in OSPF (and in IS-IS as well).

Best regards,

Peter

View solution in original post

Hi Kashish,

You are welcome.

Does using default command point the router id as the default gateway to downstream routers?

No, it does not. The Router ID is a 4-byte number that resembles an IP address but is never used as an IP address. It may be initialized using an IP address but that is where all similarity to an IP addres ends. A routing table must always contain the IP address of the next hop, and because the Router ID is not guaranteed to be an IP address at all, it can never enter the routing table. Even after using the default-information originate command, routing tables will always contain the IP addresses of next hops towards the router that injects the default route into OSPF.

The OSPF uses Router IDs as unique identifiers of routers when modeling them in the link-state database and describing their mutual interconnections. However, the Router ID is used only internally by OSPF, and as I indicated before, it is not an IP address and is never used as an IP address (source or destination or next hop).

Best regards,

Peter

View solution in original post

Joseph W. Doherty
Hall of Fame
Hall of Fame

Disclaimer


The Author of this posting offers the information contained within this posting without consideration and with the reader's understanding that there's no implied or expressed suitability or fitness for any purpose. Information provided is for informational purposes only and should not be construed as rendering professional advice of any kind. Usage of this posting's information is solely at reader's own risk.

Liability Disclaimer

In no event shall Author be liable for any damages whatsoever (including, without limitation, damages for loss of use, data or profit) arising out of the use or inability to use the posting's information even if Author has been advised of the possibility of such damage.

Posting

What are the advantages of just using "default information originate"?

One advantage, "default information originate" only advertises the default if that router has a default route itself.  This feature is commonly used in conjunction with receiving a default route from another dynamic routing protocol.  If the default route is withdrawn from the other routing protocol then it will stop being advertised into OSPF from that router.  (Note: there's an always option that enables the default route advertisement [I'm sure you'll guess] "always".)

View solution in original post

7 Replies 7

Peter Paluch
Cisco Employee
Cisco Employee

Hi Kashish,

You've got such great questions on OSPF! I hope you don't mind me answering again but please say so if I am becoming too intrusive.

With OSPF, you can not redistribute the default route using the redistribute command. It is not a limitation of OSPF protocol itself, rather, it is a failsafe constraint built into Cisco IOS. It is done to prevent an inadvertent redistribution of the default route into OSPF from another routing protocol or from static routes. The only way to inject default route into OSPF (apart from the automatic injection at Area Border Routers for special types of areas) is to use the default-information originate command.

I have always liked the default-information originate command, anyway. It allows you to inject the default route very precisely. Doing the redistribute static is normally going to redistribute all static routes, and you need to configure route-maps to perform filtering so that only appropriate routes get redistributed. While there's no problem in doing that, at the same time, it is kind of inconvenient. Also, the default route, although it's just another route in the routing table, has a specific meaning to the routing: it represents the way out of your routing domain to all other networks. So it is not "just another route", rather, it's the "remaining world all around". Being a route with such a vast influence, it deserves to be tightly controlled - and ideally, it deserves a specific command, just like here in OSPF (and in IS-IS as well).

Best regards,

Peter

Hi Peter,

Thank you so much for being so helpful.

Could you also answer this part for me:

Does using default command point the router id as the default gateway to downstream routers?

Thanks,

Kashish

Hi Kashish,

You are welcome.

Does using default command point the router id as the default gateway to downstream routers?

No, it does not. The Router ID is a 4-byte number that resembles an IP address but is never used as an IP address. It may be initialized using an IP address but that is where all similarity to an IP addres ends. A routing table must always contain the IP address of the next hop, and because the Router ID is not guaranteed to be an IP address at all, it can never enter the routing table. Even after using the default-information originate command, routing tables will always contain the IP addresses of next hops towards the router that injects the default route into OSPF.

The OSPF uses Router IDs as unique identifiers of routers when modeling them in the link-state database and describing their mutual interconnections. However, the Router ID is used only internally by OSPF, and as I indicated before, it is not an IP address and is never used as an IP address (source or destination or next hop).

Best regards,

Peter

Thanks for explaining, Peter!

Disclaimer


The Author of this posting offers the information contained within this posting without consideration and with the reader's understanding that there's no implied or expressed suitability or fitness for any purpose. Information provided is for informational purposes only and should not be construed as rendering professional advice of any kind. Usage of this posting's information is solely at reader's own risk.

Liability Disclaimer

In no event shall Author be liable for any damages whatsoever (including, without limitation, damages for loss of use, data or profit) arising out of the use or inability to use the posting's information even if Author has been advised of the possibility of such damage.

Posting

I just wanted to clarify a little more when Peter notes a "However, the Router ID is used only internally by OSPF, and as I  indicated before, it is not an IP address and is never used as an IP  address (source or destination or next hop)." he means this in context as a router ID because very often the Router ID ". . . may be initialized using an IP address . . ." and even if it's not (i.e. initialized by a Router ID statement) it may be a routable address (even the next hop IP); and in my experience, often is (except as next hop, as often a loopback interface IP is used rather than a physical interface IP).  I.e., you may see the Router ID, as an IP address, in the route table but this isn't to be confused with the Router ID, itself.  They're often intentionally set the same, and the value is made a routable IP address to easily correspond a Router ID with L3 reachability for the same 32 bit value.

Joseph W. Doherty
Hall of Fame
Hall of Fame

Disclaimer


The Author of this posting offers the information contained within this posting without consideration and with the reader's understanding that there's no implied or expressed suitability or fitness for any purpose. Information provided is for informational purposes only and should not be construed as rendering professional advice of any kind. Usage of this posting's information is solely at reader's own risk.

Liability Disclaimer

In no event shall Author be liable for any damages whatsoever (including, without limitation, damages for loss of use, data or profit) arising out of the use or inability to use the posting's information even if Author has been advised of the possibility of such damage.

Posting

What are the advantages of just using "default information originate"?

One advantage, "default information originate" only advertises the default if that router has a default route itself.  This feature is commonly used in conjunction with receiving a default route from another dynamic routing protocol.  If the default route is withdrawn from the other routing protocol then it will stop being advertised into OSPF from that router.  (Note: there's an always option that enables the default route advertisement [I'm sure you'll guess] "always".)

Thanks Joseph. That helps. Rated as 5.

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community:

Review Cisco Networking products for a $25 gift card