cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
2047
Views
0
Helpful
6
Replies

OSPF routes update manipulation

Hi collegues,

I am trying to set the metric of an OSPF route using a route-map with a set metric command I used the commands as follows

router ospf 100

distribute-list route-map set_metric in

route-map set_metric permit 10

match ip next-hop X.X.X.X

set metric 47

access-list 1 permit ip X.X.X.X

I get matches on the acl but the metric is never cahnged, can you please help me out.

Regards,

Mmasry

6 Replies 6

Harold Ritter
Cisco Employee
Cisco Employee

Mohamed,

the distribute-list allows you to permit or deny routes from the LSDB to the routing table. It doesn't allow to set the metric or any other route attributes.

What is it that you are you trying to achieve?

Regards,

Harold Ritter
Sr Technical Leader
CCIE 4168 (R&S, SP)
harold@cisco.com
México móvil: +52 1 55 8312 4915
Cisco México
Paseo de la Reforma 222
Piso 19
Cuauhtémoc, Juárez
Ciudad de México, 06600
México

Hi,

I am trying to load balance on two unequal cost paths advertised within the OSPF, I know that the EIGRP can do that but I want to acheive the same result on an OSPF cloud.

The Scenario I have is 2 redundant routers (primary & secondary) with HSRP on LAN, each gets OSPF updates from the peer router in the main site, the primary router gets the route with cost 48 over an E1 link and the same route is advertised from the Secondary router with cost 49, I want to force the cost of the route advertised by secondary router to 48 to be installed in the routing table and acheive load balancing.

Any ideas how can I acheive this?

Regards,

mmasry

Hi Mohamed,

You know that OSPF uses the BW command under the interface to calculate the cost, try manipulating the BW command under your interfaces or using the "ip ospf cost" command in order for OSPF to calculate equal cost on both links and accordingly load balances over them.

P.S: I recommend using the "ip ospf cost" rather than the BW, as if you changed the BW, this might affect other Cisco IOS features like QoS.

HTH, please do rate all helpful replies,

Mohammed Mahmoud.

Hi Mohamed,

I did try using the ospf cost command for the secondry interface and it did acheive load balancing over the two paths for ouging traffic, but by doing this on the Secondary interfaces of all the sites it caused an unpredictable routing behaviour over the OSPF cloud, for example, any flow going over the secondary link (due to load balance) and is directed to a destination site other than the hub site it prefers to go along the secondry path all through the network, as the reduction of cost accumulates making the secondry path more preferred, i.e: load balancing was acheived for outgoing traffic only.

Hi Mohamed,

This is logical, as you need to manipulated the cost on both sides to control both the incoming and the outgoing traffic, you can never have it done only from one side, manipulating the OSPF cost needs a good visualization of the network and caution when doing the changes in order not to introduce any instability to the OSPF cloud.

HTH, please do rate all helpful replies,

Mohammed Mahmoud.

minumathur
Level 1
Level 1

Hi

May be below command will help you.

redistribute static metric 47 metric-type 1 subnets route-map static-filter.

There are two metric type extenal type 1) E1 2) E2

-minu

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: