Community discussions

MikroTik App
 
raymonvdm
Member Candidate
Member Candidate
Topic Author
Posts: 161
Joined: Mon Jan 31, 2005 7:47 pm

OSPF routes not in route table

Tue May 29, 2018 12:29 pm

I have setup a network of Mikrotiks running OSPF between multiple sites. Some sites have a single internet connection and one MT. Others have multiple

On one of the double router locations i lost one of the MT`s. The lost of the MT should not be an issue but i found out that my setup is not working as it should.

The router which is left as last men standing is recieving the routes by OSPF but the don`t end up in the routing table. Therefore it is not working. When i add the missing routes as static to the routing table it is working fine.

SNIP

admin@crs1.kmp1.domain.net /ip route> print 
Flags: X - disabled, A - active, D - dynamic, C - connect, S - static, r - rip, b - bgp, o - ospf, m - mme, B - blackhole, U - unreachable, P - prohibit 
 #      DST-ADDRESS        PREF-SRC        GATEWAY            DISTANCE
 0 ADS  0.0.0.0/0                          84.28.96.1                0
 1 ADC  84.28.96.0/23      84.28.96.xx    eth1 - WAN                0
 2 ADC  172.30.92.199/32   172.30.92.251   l2tp-out-crs1.d...        0
 3  DC  172.30.137.0/30    172.30.137.1    eth2 -  crs1 to...      255
 4 X S  192.168.8.0/24                     192.168.110.71            1
 5 ADC  192.168.110.0/24   192.168.110.251 vlan110                   0
 6 ADC  192.168.110.250/32 192.168.110.250 vrrp110                   0
 7 ADC  192.168.111.0/24   192.168.111.251 vlan111                   0
 8 ADC  192.168.111.250/32 192.168.111.250 vrrp111                   0
 9 ADC  192.168.112.0/24   192.168.112.251 vlan112                   0
10 ADC  192.168.112.250/32 192.168.112.250 vrrp112                   0
11 ADC  192.168.113.0/24   192.168.113.251 vlan113                   0
12 ADC  192.168.116.0/24   192.168.116.251 vlan116                   0
13 ADC  192.168.116.250/32 192.168.116.250 vrrp116                   0
14 X S  ;;; uit
        192.168.120.0/24                   172.30.82.220             2
15  DC  192.168.126.0/24   192.168.126.250 eth3 - Atlas Pr...      255
16 ADC  192.168.130.0/24   192.168.130.251 HotSpot_Bridge            0
17 ADC  192.168.140.0/24   192.168.140.251 vlan140                   0
18 ADC  192.168.140.250/32 192.168.140.250 vrrp140                   0
19 ADC  192.168.151.0/24   192.168.151.251 vlan151                   0
20 ADC  192.168.151.250/32 192.168.151.250 vrrp151                   0
21 A S  192.168.230.0/24                   l2tp-out-crs1.d...        1

SNIP

ip route> export 

add disabled=yes distance=1 dst-address=192.168.8.0/24 gateway=192.168.110.71
add comment=uit disabled=yes distance=2 dst-address=192.168.120.0/24 gateway=172.30.82.220 scope=255
add distance=1 dst-address=192.168.230.0/24 gateway=l2tp-out-crs1.dro2.domain.net

SNIP

/routing ospf route> print 
 # DST-ADDRESS        STATE          COST                                                            GATEWAY         INTERFACE                                                       
 0 172.30.7.220/32    intra-area     40                                                              172.30.92.199   l2tp-out-crs1.dro2                                    
 1 172.30.7.251/32    intra-area     30                                                              172.30.92.199   l2tp-out-crs1.dro2                                   
 2 172.30.13.0/30     intra-area     20                                                              172.30.92.199   l2tp-out-crs1.dro2                                    
 3 172.30.81.220/32   intra-area     40                                                              172.30.92.199   l2tp-out-crs1.dro2                                    
 4 172.30.81.250/32   intra-area     30                                                              172.30.92.199   l2tp-out-crs1.dro2                                    
 5 172.30.92.199/32   intra-area     10                                                              0.0.0.0         l2tp-out-crs1.dro2                                  
 6 172.30.92.251/32   intra-area     20                                                              172.30.92.199   l2tp-out-crs1.dro2                                    
 7 192.168.8.0/24     ext-2          20                                                              192.168.110.71  vlan110                                                         
 8 192.168.100.0/24   intra-area     40                                                              172.30.92.199   l2tp-out-crs1.dro2                                    
 9 192.168.110.0/24   intra-area     10                                                              0.0.0.0         vlan110                                                         
10 192.168.110.250/32 intra-area     10                                                              0.0.0.0         vrrp110                                                         
11 192.168.111.0/24   intra-area     10                                                              0.0.0.0         vlan111                                                         
12 192.168.111.250/32 intra-area     10                                                              0.0.0.0         vrrp111                                                         
13 192.168.112.0/24   intra-area     10                                                              0.0.0.0         vlan112                                                         
14 192.168.112.250/32 intra-area     10                                                              0.0.0.0         vrrp112                                                         
15 192.168.113.0/24   intra-area     10                                                              0.0.0.0         vlan113                                                         
16 192.168.116.0/24   intra-area     10                                                              0.0.0.0         vlan116                                                         
17 192.168.116.250/32 intra-area     10                                                              0.0.0.0         vrrp116                                                         
18 192.168.120.0/24   intra-area     30                                                              172.30.92.199   l2tp-out-crs1.dro2                                   
19 192.168.120.250/32 intra-area     30                                                              172.30.92.199   l2tp-out-crs1.dro2                                    
20 192.168.121.0/24   intra-area     30                                                              172.30.92.199   l2tp-out-crs1.dro2                                   
21 192.168.123.0/24   intra-area     30                                                              172.30.92.199   l2tp-out-crs1.dro2t                                    
22 192.168.123.1/32   intra-area     30                                                              172.30.92.199   l2tp-out-crs1.dro2                                    
23 192.168.126.0/24   intra-area     30                                                              172.30.92.199   l2tp-out-crs1.dro2                                    
24 192.168.126.250/32 intra-area     30                                                              172.30.92.199   l2tp-out-crs1.dro2                                    
25 192.168.130.0/24   intra-area     10                                                              0.0.0.0         HotSpot_Bridge                                                  
26 192.168.140.0/24   intra-area     10                                                              0.0.0.0         vlan140                                                         
27 192.168.140.250/32 intra-area     10                                                              0.0.0.0         vrrp140                                                         
28 192.168.150.0/24   intra-area     40                                                              172.30.92.199   l2tp-out-crs1.dro2                                    
29 192.168.151.0/24   intra-area     10                                                              0.0.0.0         vlan151                                                         
30 192.168.151.250/32 intra-area     10                                                              0.0.0.0         vrrp151                                                         
31 192.168.170.0/24   intra-area     40                                                              172.30.92.199   l2tp-out-crs1.dro2                                    
32 192.168.230.0/24   intra-area     30                                                              172.30.92.199   l2tp-out-crs1.dro2                                   
33 192.168.230.50/32  intra-area     30                                                              172.30.92.199   l2tp-out-crs1.dro2                                    

SNIP


/routing filter> export 

add action=accept chain=OSPF-IPv4-Route-Filters distance=200 prefix=192.168.0.0/16 prefix-length=16-24
add action=discard chain=OSPF-IPv4-Route-Filters
[admin@crs1.kmp1.domain.net] /routing filter> 

SNIP

/routing ospf instance> export 

set [ find default=yes ] in-filter=OSPF-IPv4-Route-Filters metric-bgp=20 metric-other-ospf=20 out-filter=OSPF-IPv4-Route-Filters redistribute-connected=as-type-1 \
    redistribute-static=as-type-1 router-id=192.168.110.251
[admin@crs1.kmp1domain.net] /routing ospf instance> 

 
sri2007
Member Candidate
Member Candidate
Posts: 206
Joined: Wed May 20, 2015 10:14 pm
Location: Lake Grove, NY

Re: OSPF routes not in route table  [SOLVED]

Tue May 29, 2018 4:11 pm

Hi, I think that your problem is related to the OSPF filter that you're applying.
/routing filter> export

add action=accept chain=OSPF-IPv4-Route-Filters distance=200 prefix=192.168.0.0/16 prefix-length=16-24
add action=discard chain=OSPF-IPv4-Route-Filters
[admin@crs1.kmp1.domain.net] /routing filter>
That's telling to the router to accept only prefixes within the subnet 192.168.0.0/16 with a prefix-length from 16 to 24, but it's matching the distance with 200, and the second rule is discarding everything, what I'll do is just disable the first rule and test, if you have the routes at /ip routing ospf lsa & /ip routing ospf routes then the OSPF process is working fine, but the rules are discarding everything.
 
raymonvdm
Member Candidate
Member Candidate
Topic Author
Posts: 161
Joined: Mon Jan 31, 2005 7:47 pm

Re: OSPF routes not in route table

Tue May 29, 2018 4:58 pm

The distance=200 was set to kick the OSPF process and seems to be left behind, and was indeed causing issues after the router was rebooted. Before that it didn`t change a thing. I use the filters to prevent accidentally redistributing a static route which is not for 192.168.x.x

Who is online

Users browsing this forum: No registered users and 18 guests