04-14-2021 12:00 PM
Hello
I have 4 devices connected as shown in the diagram.
RTRA runs OSPF processes 1+2 for each domain.
I am testing redistribution static routes between domain 2->1, I added a static route in RTRB 9.9.9.9 and added "redistribution static subnets" to ospf process 2.
This works and RTRC can see the route.
However if I add a static route on RTRA and add the same for OSPF process 2 (example 8.8.8.8), the route is not redistributed to OSPF process 1 and RTRC cannot see it.
In order for this to work I need to add "redistribute static subnets" to OSPF process 1.
Is there a reason why this does not work, i.e. a restriction or some documentation/best practice about it?
Thanks in advance.
Relevant configs:
RTRC#show run | se route
router ospf 1
network 192.168.10.0 0.0.0.255 area 0
RTRA#show run | se route
router ospf 1
redistribute ospf 2 subnets
network 192.168.10.0 0.0.0.255 area 0
router ospf 2
redistribute static subnets
network 192.168.20.0 0.0.0.255 area 0
ip route 8.8.8.8 255.255.255.255 192.168.20.2
RTRB#show run | se route
router ospf 2
redistribute static subnets
network 192.168.20.0 0.0.0.255 area 0
network 192.168.30.0 0.0.0.255 area 0
ip route 9.9.9.9 255.255.255.255 192.168.30.2
As seen 8.8.8.8 is missing from the process 1 (external route) on RTRA, only if I add redistribute static subnets to OSPF 1 this works:
RTRA#show ip ospf database
OSPF Router with ID (192.168.10.1) (Process ID 1)
Router Link States (Area 0)
Link ID ADV Router Age Seq# Checksum Link count
192.168.10.1 192.168.10.1 1054 0x80000006 0x001F3A 1
192.168.10.2 192.168.10.2 986 0x80000004 0x001B3F 1
Net Link States (Area 0)
Link ID ADV Router Age Seq# Checksum
192.168.10.2 192.168.10.2 986 0x80000002 0x00C49F
Type-5 AS External Link States
Link ID ADV Router Age Seq# Checksum Tag
9.9.9.9 192.168.10.1 309 0x80000002 0x00ED19 0
Solved! Go to Solution.
04-14-2021 01:10 PM
Hi Chris,
This is the correct behavior. The static route is redistributed in process 2, but cannot be redistributed in process 1 via process 2, as it is not installed in the RIB as an ospf route. Using "redistribute static subnets" under ospf 1 is the right way to do it.
Regards,
04-14-2021 02:18 PM - edited 04-14-2021 02:19 PM
Hello Chris,
Harold is right when using redistribution between routing protocols, including two different OSPF processes, only prefixes that are installed in the IP routing table are actually redistributed ( with just an exemption for connected subnets).
So in this case prefix 8.8.8.8./32 is installed in IP routing table as S [1/0] via 192.168.20.2.
OSPF process 2 using redistribute static subnets is able to import the route and to create an LSA type 5 for 8.8.8.8
OSPF process 1 using redsitribute ospf 2 subnets cannot do the same as prefix 8.8.8.8 is present in OSPF process 2 database as an LSA type 5 but it is not installed in IP routing table.
When you add redistribute static subnets under router ospf 1 it is able to create an LSA type 5 from the static route.
This is correct behaviour and expected.
Hope to help
Giuseppe
04-14-2021 01:10 PM
Hi Chris,
This is the correct behavior. The static route is redistributed in process 2, but cannot be redistributed in process 1 via process 2, as it is not installed in the RIB as an ospf route. Using "redistribute static subnets" under ospf 1 is the right way to do it.
Regards,
04-14-2021 01:33 PM
R-B have only one Process which is OSPF 1
R-A have only one process which is OSPF 2
R-C have two process which is OSPF 1 & 2 ?
Now your Q. is if the R-B have static route then it will forward to other process BUT same not happened in R-C??
04-14-2021 02:18 PM - edited 04-14-2021 02:19 PM
Hello Chris,
Harold is right when using redistribution between routing protocols, including two different OSPF processes, only prefixes that are installed in the IP routing table are actually redistributed ( with just an exemption for connected subnets).
So in this case prefix 8.8.8.8./32 is installed in IP routing table as S [1/0] via 192.168.20.2.
OSPF process 2 using redistribute static subnets is able to import the route and to create an LSA type 5 for 8.8.8.8
OSPF process 1 using redsitribute ospf 2 subnets cannot do the same as prefix 8.8.8.8 is present in OSPF process 2 database as an LSA type 5 but it is not installed in IP routing table.
When you add redistribute static subnets under router ospf 1 it is able to create an LSA type 5 from the static route.
This is correct behaviour and expected.
Hope to help
Giuseppe
04-16-2021 09:17 AM
Hi Friend I know you mention that this issue solve BUT
I don't get how? if we config static route then we don't benefit from redistribute, and we need static route for all route behind process 2.
So I think and try and config LAB and finally I get the solution.
in order to not suboptimal redistribute from the two process I think Cisco Router give a feature that we
CAN NOT REDISTRIBUTE FROM ONE PROCESS TO OTHER AND THEN RE-REDISTRIBUTE.
the solution is simply by
redistribute ospf 1 subnet match internal.
try my solution and I wait your reply.
04-16-2021 11:58 AM
Hi Mahmood,
The original question was more around, why static route 8.8.8.8/32 that has been redistributed in ospf 2 is not automatically redistributed into ospf 1, since there is a "redistribute ospf 2 subnets" under router ospf 1.
The answer is that 8.8.8.8/32 is not going to be redistributed from ospf 2 to ospf 1, even though it is in ospf 2 lsdb, because it is not installed in the local RIB as an ospf route, but rather as a static route.
The solution in this specific case is to use the "redistribute static subnets" under "router ospf 1" as well.
Regards,
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