Consider Figure 12.3, which shows a routing environment with static routes being redistributed into OSPF. Routers B2, B3, and B4 are a part of the OSPF routing domain. Static routing is configured between routers B1 and B2. Redistribution is configured in router B1.
Figure 12.3: Redistribution scenario with static routing between B1 and B2.
Router | Relevant Part of Configuration |
---|---|
B1 | interface Serial0 |
ip address 10.10.1.1 255.255.255.252 | |
! | |
interface Ethernet1 | |
ip address 192.168.1.65 255.255.255.224 | |
! | |
interface Ethernet2 | |
ip address 192.168.1.1 255.255.255.224 | |
! | |
B2 | interface Serial0 |
ip address 10.10.1.2 255.255.255.252 | |
! | |
interface Ethernet1 | |
ip address 192.168.2.1 255.255.255.0 | |
! | |
ip route 192.168.1.0 255.255.255.224 10.10.1.1 | |
ip route 192.168.1.64 255.255.255.224 10.10.1.1 | |
! | |
router ospf 1 | |
network 10.10.1.0 0.0.0.255 area 0 | |
network 192.168.2.0 0.0.0.255 area 0 | |
redistribute static metric 100 | |
! | |
B3 | interface Serial1 |
ip address 10.10.2.1 255.255.255.252 | |
! | |
interface Ethernet0 | |
ip address 192.168.2.2 255.255.255.0 | |
! | |
interface Ethernet2 | |
ip address 192.168.3.1 255.255.255.0 | |
! | |
router ospf 1 | |
network 192.168.2.0 0.0.0.255 area 0 | |
network 192.168.3.0 0.0.0.255 area 0 | |
network 10.10.2.0 0.0.0.255 area 0 | |
! | |
B4 | interface Serial1 |
ip address 10.10.2.2 255.255.255.252 | |
! | |
interface Ethernet0 | |
ip address 192.168.4.1 255.255.255.0 | |
! | |
router ospf 1 | |
network 192.168.4.0 0.0.0.255 area 0 | |
network 10.10.2.0 0.0.0.255 area 0 | |
! |
In Figure 12.3, subnet 192.168.1.65/27 is inaccessible from network 192.168.3.0/24, as shown in the command:
B3#show ip route 192.168.1.66 % Network not in table
To isolate and resolve this problem:
Check availability of the route in B2 where redistribution is happening. The command and output to check this are shown in Listing 12.12.
Listing 12.12 Output of the show ip route 192.168.1.66 Command
B2#show ip route 192.168.1.66 Routing entry for 192.168.1.64/27 Known via "static", distance 1, metric 0 Redistributing via ospf 1 Advertised by ospf 1 metric 100 Routing Descriptor Blocks: *10.10.1.1 Route metric is 0, traffic share count is 1
Listing 12.12 shows that a static route pointing to B1 is available.
Check for filtering or a route map applied to redistribution from static to OSPF. No such filtering is present. This is confirmed by checking the configuration of the router by issuing the show running-config command.
Check the redistribution configuration to ensure that the subnets have been allowed in redistribution. The relevant part of the configuration is shown in Listing 12.13.
Listing 12.13 Configuration to Allow Subnets in Redistribution
router ospf 1 network 10.10.1.0 0.0.0.255 area 0 network 192.168.2.0 0.0.0.255 area 0 redistribute static metric 100 !
Here, the keyword subnets is missing. For that, perform the configuration:
B2(config)#router ospf 1 B2(config)# redistribute static metric 100 subnets