OSPF default-information originate

Unanswered Question
Oct 30th, 2009

Hi.

A router has two static default routes to internet pointing to two different gateways.

I wish to have OSPF redistributing a default-route only to one default gateway: if the interface pointing to it goes down, no default-route has to be redistributed.

I've configured the router in a similar way:

ip route 0.0.0.0 0.0.0.0 1.1.1.1

ip route 0.0.0.0 0.0.0.0 2.2.2.2

router ospf 1

default-information originate route-map DEFAULT-ROUTE

route-map DEFAULT-ROUTE

match ip next-hop Default-Route

ip access-list standard Default-Route

permit 1.1.1.1

However the default-route doesn't show up in the neighbor's routing table.

Does anybody can give me some advice?

Thank you

  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 0 (0 ratings)
Loading.
marikakis Fri, 10/30/2009 - 03:45

If I understand correctly what you are trying to do, then I think there is a problem with your route-map. I am not sure what the meaning of "match ip next-hop" is in the context of the "default-information originate" command. I think you need to use "match ip address" instead to specify the route whose existence causes the default to be originated (i.e. if 1.1.1.1/prefix_length exists in routing table, originate default).

Please have a look at the following example:

http://packetlife.net/blog/2008/dec/12/ospf-conditional-default-route-injection/

If I understand correctly, you are trying to do something similar with the only difference being the contents of the prefix-list or access-list.

Carlo Zaina Fri, 10/30/2009 - 05:31

I've implemented with match ip address, however still no results. However, once implemented with a prefix list, i've achieved the result.

Thank you

marikakis Fri, 10/30/2009 - 06:13

It's good to hear you made this work and thank you for your feedback. I am still interested on why the standard ACL did not work. What prefix-length did you use for the prefix list entry? I think the standard ACL was looking for a match on the specific route 1.1.1.1/32.

Carlo Zaina Fri, 10/30/2009 - 06:37

The router has a configuration like this:

ip address 1.1.1.2/28 and the default route points to the 1.1.1.1 (the ISP router)

I started with this idea: since the next hop must be 1.1.1.1, use the match ip next hop in the route-map, and then in the standard access list i will state which default gateway use.

In EIGRP environment my configuration was working: redistribute static route-map DEFAULT-ROUTE causes the router to advertize only one route, flagged as EX.

In OSPF i see the things work differently, at least for the route-map.

I've then configured a ip prefix list like this:

ip prefix list 1.1.1.0/28

and then applied the route-map DEFAULT-ROUTE with a match ip address statement, like described in the page.

Anyway i will try to investigate a bit more working on the actual configuration: changing the statement in the route-map (match ip next hop and match ip address) and also using a standard access list rather than a prefix list. I am really curious to realize where is the trick

marikakis Fri, 10/30/2009 - 08:08

You could try a "permit 1.1.1.0 0.0.0.15" in the standard ACL. I think the trick has to do with the route mask. However, have in mind that the existence of the /28 route in the routing table does not necessarily mean that the gateway 1.1.1.1 is up and running. If for example the default originator connects to the gateway via an ethernet switch, the interface 1.1.1.1 of the gateway could go down, but default originator's interface in 1.1.1.0/28 is up and has connected route in its routing table. In such a case, you could try to use a route that would more accurately signal to the default originator that 1.1.1.1 is down, some route that would only be known if the path to the gateway is up.

Carlo Zaina Fri, 10/30/2009 - 08:29

I agree on the fact that a "permit host 1.1.1.1" in the std ACL would have been better, and this maybe can be the mistake.

About the reachability of the default gateway, the router is directly linked to the other side, so if it goes down, the interface (ethernet) goes down, and then the route is removed from the routing table.

Said this, in a different scenario it can happen the ISP router is up but not forwarding traffic, so my router advertize a valid network and the traffic, once reaches ISP is dropped.

This is however the problem when dealing with static routes..

Actions

This Discussion