cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
6299
Views
20
Helpful
9
Replies

OSPF metric

sqambera
Level 1
Level 1

Hello,

Is there a way that I could achieve functionality in OSPF like "offset-list" that is available in eigrp. I actually want to influence the metric for a subnet that is being advertised from two spokes to a hub over same dmvpn tunnel.

 

Thanks,

Qamber

9 Replies 9

Hi sqambera, 

 

You can't do it. This is a what be called a limitation of link-state protocols. It's the same with ISIS. The routes are derived from ospf database not advertised by the peer to other. 

Spooster IT Services Team

Hi

You could use metric or metric-type with route-maps, a lowest metric is preferred but you can also use metry-type metric type 1 will preferred over metric type 2. Could you please provide more details?

 




>> Marcar como útil o contestado, si la respuesta resolvió la duda, esto ayuda a futuras consultas de otros miembros de la comunidad. <<

Hi,

Thanks for your time. There is actually a DMVPN hub router that connects to two separate spokes over single DMVPN tunnel. Both spokes have same subnet LAN behind them. OSPF is configured between hub and spokes. The hub is receiving route to LAN subnet from both spokes over same tunnel interface. I am looking to configure something on the hub router that could cause it to use spoke 1 as preferred next hop. It can't be through the cost becuase again its single tunnel being used for both spokes.

 

Thanks,

Qamber

Hi

 You could use Administrative to manipulate the next hop, for exampel:

Imagine R2 and R3 are advertising the network 23.23.23.0/24 and they have the following routers ID:

 

R2 - RID 2.2.2.2

R3 - RID 3.3.3.3

 

R1 is receiving the same network through R2 and R3, but you prefer the path through R3, so you can make the following:

 

Router 1

access-list 23 permit 23.23.23.0 0.0.0.255

 

router ospf 1

distance 111 2.2.2.2 0.0.0.0 23

 

Administrative distance for OSPF is 110, a lowest AD is always preferred so we are going to apply the AD 111 for all the networks or hosts into the ACL 23 matching the source with router ID 2.2.2.2 (Router 2). It will be applied for the networks into the ACL 23 only.  If Router 3 is down, Router 1 will prefer the network through Router 2

 

Hope it is useful

:-)

 




>> Marcar como útil o contestado, si la respuesta resolvió la duda, esto ayuda a futuras consultas de otros miembros de la comunidad. <<

Hey,

 

Thank you again and I am glad you understood my requirement exactly. I just checked the solution you suggested in router's command line:

 

router(config-router)#distance 111 ?
A.B.C.D IP Source address
<cr>

 

Apparently seems like that it considers the source address for altering administrative distance not the RID. Your thoughts?

 

Thanks,

Qamber

Predrag Jovic
Level 3
Level 3

There are two ways to influence cost in OSPF - change of bandwidth or to manually assign OSPF cost to interface. Changing bandwidth is not recommended since it can influence QoS if configured (or will be configured at some point), so recommended way would be to change cost on interface, but there is nothing like "offset-list" for OSPF. All neighbors must agree how topology looks like (have the same view on topology from different perspective), so manipulation like "offset-list" generally can't be applied in the case of OSPF.

Hello

PBR could be usefull if i undersand your query - but im not sure I do understnd?. You wish your hub router to prefer one spoke over the other regards a specific subnet - correct?

res

Paul


Please rate and mark as an accepted solution if you have found any of the information provided useful.
This then could assist others on these forums to find a valuable answer and broadens the community’s global network.

Kind Regards
Paul

PaulP
Level 1
Level 1

 Depending on your design you could try the following:

1. increase the interface cost with "ip ospf cost xxx" command on the least preferred spoke towards the subnet.

2. if the network behind the spokes is not part of the OSPF domain then redistribute with higher cost on the least preferred spoke.

 

ABR and ASBR are places where tweaks in the routing can be performed with care.

 

OSPF is link state within the area but works like a distance vector ourside an area/domain.

 

Hope it helps,

 

Paul

I guess the best place to tweek is at spoke side instead of hub side.

> If you are advertising from spoke, increase the ospf cost of the directly attached interface which has the destination network with value more than the preferred spoke interface cost.

> If you are redistributing, then use "metric type / metric value" to tune.

 

Regards,

Godwin. S

Review Cisco Networking for a $25 gift card