cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
566
Views
15
Helpful
4
Replies

Route-map weirdness

cisconoobie
Level 2
Level 2

Can someone take a look at my route-map, Its not forcing the "default-information originate" route out of e0 and it seems like the default route is advertised through both e0 and s0.

Core1

interface Ethernet0

ip address 10.100.10.17 255.255.255.248

ip ospf network point-to-point

!

interface Serial0

ip address 10.100.10.2 255.255.255.248

ip ospf cost 10

clock rate 4000000

!

router ospf 1

router-id 1.1.10.1

log-adjacency-changes

passive-interface default

no passive-interface Ethernet0

no passive-interface Serial0

network 10.100.10.2 0.0.0.0 area 0

network 10.100.10.17 0.0.0.0 area 0

default-information originate route-map DEFAULT

!

!

access-list 10 permit 10.100.10.16 0.0.0.7 log

!

route-map DEFAULT permit 10

match ip address 10

match interface Ethernet0

set metric 1

set metric-type type-1

set interface Ethernet0

Core2

interface Ethernet0

ip address 10.100.10.25 255.255.255.248

!

interface Serial0

ip address 10.100.10.3 255.255.255.248

ip ospf cost 10

!

interface Serial1

ip address 10.100.10.33 255.255.255.248

clock rate 4000000

!

router ospf 1

router-id 1.1.10.2

log-adjacency-changes

passive-interface default

no passive-interface Ethernet0

no passive-interface Serial0

no passive-interface Serial1

network 10.100.10.3 0.0.0.0 area 0

network 10.100.10.25 0.0.0.0 area 0

network 10.100.10.33 0.0.0.0 area 0

!

QA_1 - show ip route

10.0.0.0/8 is variably subnetted, 11 subnets, 3 masks

C 10.40.40.0/24 is directly connected, Loopback4

O E1 10.30.0.0/16 [110/94] via 10.100.10.33, 00:25:26, Serial1

O 10.40.0.0/16 is a summary, 03:39:32, Null0

C 10.40.10.0/24 is directly connected, Loopback1

O E1 10.60.0.0/16 [110/94] via 10.100.10.33, 00:25:26, Serial1

C 10.40.20.0/24 is directly connected, Loopback2

C 10.40.30.0/24 is directly connected, Loopback3

C 10.100.10.32/29 is directly connected, Serial1

O 10.100.10.0/29 [110/74] via 10.100.10.33, 00:25:27, Serial1

O 10.100.10.16/29 [110/84] via 10.100.10.33, 00:25:27, Serial1

O 10.100.10.24/29 [110/74] via 10.100.10.33, 00:25:27, Serial1

O*E1 0.0.0.0/0 [110/75] via 10.100.10.33, 00:25:27, Serial1

Looking at QA_1, default route should be advertised as 85 not 75, meaning if it goes through core1(e0)->finance_1(e0/1)->finance_1(e0/0-> Core2(s1) then it should be 85 but it seems like the route-map isn't working on Core1 and the default route is being advertised over the Core1(s0), cost of Core2(s1) is 64.

Anyone?

4 Replies 4

mheusing
Cisco Employee
Cisco Employee

Hi,

the "default-information originate route-map" command will insert a default route into the OSPF database based on some criteria. The external LSA containing the 0.0.0.0/0 is then flooded throughout the area and each router will calculate the best path based on all link metrics. You cannot force a default route "out through" an interface in OSPF. The only way to get a different path installed is to change some link metrics. But be aware, this will affect all routes and without further information I do not know, which effects this has in your network.

Basically, by using "ip ospf cost 10" on Serial0 you make both, S0 and E0 equal cost pathes despite they are of different bandwidth. Removing the "ip ospf cost 10" and placing a "bandwidth X" command under Serial0, where X reflects the real bandwidth, might solve the issue. Please only do so with due care and consideration of all routes affected.

Hope this helps! Please use the rating system.

Regards, Martin

Thanks for the response, I'm trying to understand the exact logic that is happening here.

Originating a default-route using this method, is there anyway I can advertise the metric of 1 out of interface e0 and metric of 5 out of serial1? Is there anyway to tweak this in the route-map?

I'm trying to do something like this...

According to the diagram, If connected route between Core1(e0) and Finance_1(e0/1) exists then advertise metric of 1 to Finance_1 and advertise metric of 5 to everyone else.

Is this possible?

Hello,

as Martin has clearly explained you are dealing with OSPF ,a Link State IGP and you wish it to behave like a Distance Vector Protocol (like offset-list in RIP) and this is not possible.

The route-map can be used to define under what conditions a type 5 LSA for net 0.0.0.0/0 should be created and sent out in the OSPF domain (that is LSA flooding). By using type 1 external metric every router will calculate the cost to the default route :

E1 metric inside the LSA itself + OSPF cost to reach the LSA originator (=ASBR) node.

If there are two ASBRs injecting an E1 default and given the ospf links in the topology (native costs or modified) each ASBR will have its own region of influence, where the other OSPF nodes will choice to send packets matching the default route to one of them. For some topologies and costs you can have some nodes to install two default routes one to every ASBR if the total costs are equal from their point of view.

This is how OSPF works for its link state nature. You can only play on ospf link costs with the ip ospf cost or the bandwidth command in order to influence the choice that every node makes. An LSA is a data structure that is sent unchanged out of all interfaces inside OSPF packets. This is a requirement because all nodes within an area must have the same database (LS DB).

Best Regards

Giuseppe

I figured out a way to make it work. What I am doing is originating a default route and tagging(for ex. with tag 1) it in a route map. Then on the other router, I apply a filter on incomming tagged routes (match tag 1) and then I set a low metric. So Router 1 tags 1 and Router 2 tags 5.

The preferred router utlizes what ever default route it wants.

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