02-19-2021 08:59 AM
Hi all,
First time poster here. Hoping to benefit from your insight.
I have a test environment with a hub and spoke architecture using OSPF as the routing protocol. Each spoke and the hub connect to each other over two simulated service provider WANs with the traffic being load balanced over the two.
What I want to be able to do is to set the cost of routes being learned by the hub from only one location over a specific interface to a higher cost without changing/ impacting the routing from the hub standpoint to other locations. The config below is how I have sought to do this. However, the routes are still being installed on the hub router with the default costs. I'm testing this in GNS3 using the C7200 image.
What am I missing?
R2#show run | sec route-map
route-map INCREASE permit 10
match ip address prefix-list MYNET
match interface GigabitEthernet2/0
set metric 100
route-map INCREASE permit 20
R2#show ip prefix-list
ip prefix-list MYNET: 1 entries
seq 5 permit 21.21.21.21/32
R2#show run | sec router
router ospf 10
network 192.168.11.0 0.0.0.255 area 0
network 192.168.12.0 0.0.0.255 area 0
network 192.168.100.0 0.0.0.255 area 0
distribute-list route-map INCREASE in
R2#show ip route
Codes: L - local, C - connected, S - static, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2
i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
ia - IS-IS inter area, * - candidate default, U - per-user static route
o - ODR, P - periodic downloaded static route, H - NHRP, l - LISP
+ - replicated route, % - next hop override
Gateway of last resort is not set
C 192.168.11.0/24 is directly connected, GigabitEthernet2/0
L 192.168.11.4/32 is directly connected, GigabitEthernet2/0
C 192.168.12.0/24 is directly connected, GigabitEthernet1/0
L 192.168.12.4/32 is directly connected, GigabitEthernet1/0
O 21.21.21.21 [110/2] via 192.168.12.3, 00:00:02, GigabitEthernet1/0
[110/2] via 192.168.11.3, 01:01:31, GigabitEthernet2/0<---- the route I want to modifiy
192.168.100.0/24 is variably subnetted, 2 subnets, 2 masks
C 192.168.100.0/24 is directly connected, GigabitEthernet3/0
L 192.168.100.2/32 is directly connected, GigabitEthernet3/0
Solved! Go to Solution.
02-20-2021 12:27 PM
Hello ,
PBR you can use the following to check the availibility of next/hop if next hop is not reachable standard destination routing is used
set ip next-hop address
set ip next-hop verify-availability
Hope to help
Giuseppe
02-19-2021 11:14 AM
Can you draw the topology
02-19-2021 12:08 PM
02-19-2021 03:59 PM
I was able to increase the cost of the route in my test lab using all the same configurations you used. It is also strange that the routing table on R2 shows the network 21.21.21.21 without the CIDR. Can you please provide the output from the following command on R2?
show ip ospf rib
02-19-2021 04:13 PM
Hi
I try and also same result couldn't change Cost for specific prefix,
I use GNS3 use image 7200.
which image you use ?
02-19-2021 09:35 PM
I used the same image as you did, 7200.
02-19-2021 09:33 PM
Interesting,
Could it be a bug within GNS 3?
Here's the output of the command requested below.
Base Topology (MTID 0)
OSPF local RIB
Codes: * - Best, > - Installed in global RIB
* 192.168.11.0/24, Intra, cost 1, area 0, Connected
via 192.168.11.4, GigabitEthernet2/0
* 192.168.12.0/24, Intra, cost 1, area 0, Connected
via 192.168.12.4, GigabitEthernet1/0
*> 21.21.21.21/32, Intra, cost 2, area 0
via 192.168.12.3, GigabitEthernet1/0
via 192.168.11.3, GigabitEthernet2/0
* 192.168.100.0/24, Intra, cost 1, area 0, Connected
via 192.168.100.2, GigabitEthernet3/0
02-19-2021 05:06 PM
Hello,
try the following:
clear ip ospf proc
However, OSPF is a link state protocol so the changes are not effective on the LSA and they are local to the node where the distribution list is configured
Hope to help
Giuseppe
02-19-2021 09:43 PM
Hi Guiseppe,
I tried clearing the ospf process before but unfortunately it didn't work. I am also aware that the change will not propagate to neighbouring routers. Thanks for the reminder.
02-20-2021 02:10 AM
Hello @vaughanreese_jones ,
in a real world network I would use PBR to achieve the desired result instead of attempting to tweak OSPF that is not so easy for its link state nature.
Hope to help
Giuseppe
02-20-2021 08:16 AM
I thought about that. My issue though is that if the link goes down there wouldn't be a dynamic which over to the available link.
This is why I want to adjust the cost so that in the even of failure it will dynamically use the next available route.
02-20-2021 12:27 PM
Hello ,
PBR you can use the following to check the availibility of next/hop if next hop is not reachable standard destination routing is used
set ip next-hop address
set ip next-hop verify-availability
Hope to help
Giuseppe
04-06-2021 03:53 PM
Thanks. i'll Try this
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide