Community discussions

MikroTik App
 
claiudio
newbie
Topic Author
Posts: 49
Joined: Wed Jan 25, 2012 8:04 pm

Routing filters not filtering summarized OSPF routes

Tue Apr 17, 2012 7:36 pm

I'm trying to summarize routes from a nssa area to the backbone, through an ABR.
Area1 (nssa) has only network 172.16.2.0/24 and subnets are assigned from different routers
My problem is that I don't know why the ABR (Router 1) isn't announcing just 172.16.2.0/24, but also some two routes, as 172.16.2.64/27 and 172.16.2.0/26 (correctly summarized by Router 4, using /routing filter).

Am I wrong because all routers must have the same LSDB (link state database) ? But this is only for routers in the same area, or not ?

This is the network diagram:
summarize_route-ospf_nssa.png
And these are the configurations:
Router 4:
/ip address
add address=172.16.2.236/29 disabled=no interface=bridge network=172.16.2.232

/ip route
add disabled=no distance=1 dst-address=172.16.2.0/26 type=blackhole
add disabled=no distance=1 dst-address=172.16.2.0/28 gateway=172.16.2.234 scope=30 target-scope=10
add disabled=no distance=1 dst-address=172.16.2.16/28 gateway=172.16.2.235 scope=30 target-scope=10
add disabled=no distance=1 dst-address=172.16.2.32/27 gateway=172.16.2.234 scope=30 target-scope=10

/ip route print 
 #      DST-ADDRESS        PREF-SRC        GATEWAY            DISTANCE
 0 ADo  0.0.0.0/0                          172.16.2.233            110
 1 ADo  172.16.0.224/28                    172.16.2.233            110
 2 A SB 172.16.2.0/26                                                1
 3 A S  172.16.2.0/28                      172.16.2.234              1
 4 A S  172.16.2.16/28                     172.16.2.235              1
 5 A S  172.16.2.32/27                     172.16.2.234              1
 6 ADo  172.16.2.64/27                     172.16.2.233            110
 7 ADo  172.16.2.128/28                    172.16.2.233            110
 8 ADo  172.16.2.224/29                    172.16.2.233            110
 9 ADC  172.16.2.232/29    172.16.2.236    bridge                    0
10 ADo  172.16.2.244/30                    172.16.2.233            110
11 ADo  172.16.2.248/30                    172.16.2.233            110
12 ADo  192.168.0.0/16                   172.16.2.233            110

/routing ospf instance
set [ find default=yes ] disabled=no distribute-default=if-installed-as-type-1 in-filter=ospf-in metric-bgp=auto \
    metric-connected=20 metric-default=1 metric-other-ospf=auto metric-rip=20 metric-static=20 name=default out-filter=\
    ospf-out redistribute-bgp=no redistribute-connected=as-type-1 redistribute-other-ospf=no redistribute-rip=no \
    redistribute-static=as-type-1 router-id=0.0.0.0
/routing ospf area
set [ find default=yes ] area-id=0.0.0.0 disabled=no instance=default name=backbone type=default
add area-id=172.16.2.0 default-cost=1 disabled=no inject-summary-lsas=yes instance=default name=area_1 translator-role=\
    translate-candidate type=nssa
/routing ospf network
add area=area_1 disabled=no network=172.16.2.232/29

/routing filter
add action=accept chain=ospf-out disabled=no invert-match=no prefix=172.16.2.0/26 set-bgp-prepend-path=""
add action=discard chain=ospf-out disabled=no invert-match=no set-bgp-prepend-path=""
Router 2:
/ip address
add address=172.16.2.225/29 disabled=no interface=ether1 network=172.16.2.224
add address=172.16.2.246/30 disabled=no interface=wlan1 network=172.16.2.244
add address=172.16.2.249/30 disabled=no interface=vlan1 network=172.16.2.248

/ip route print 
 #      DST-ADDRESS        PREF-SRC        GATEWAY            DISTANCE
 0 ADo  0.0.0.0/0                          172.16.2.245            110
 1 ADo  172.16.0.224/28                    172.16.2.245            110
 2 ADo  172.16.2.0/26                      172.16.2.250            110
 3 A S  172.16.2.64/27                     172.16.2.226              1
 4 A S  172.16.2.128/28                    172.16.2.226              1
 5 ADC  172.16.2.224/29    172.16.2.225    ether1                    0
 6 ADo  172.16.2.232/29                    172.16.2.250            110
 7 ADC  172.16.2.244/30    172.16.2.246    wlan1                     0
 8 ADC  172.16.2.248/30    172.16.2.249    vlan1                     0
 9 ADo  192.168.0.0/16                   172.16.2.245            110

/routing ospf instance
set [ find default=yes ] disabled=no distribute-default=if-installed-as-type-1 in-filter=ospf-in metric-bgp=auto \
    metric-connected=20 metric-default=1 metric-other-ospf=auto metric-rip=20 metric-static=20 name=default out-filter=\
    ospf-out redistribute-bgp=no redistribute-connected=as-type-1 redistribute-other-ospf=no redistribute-rip=no \
    redistribute-static=as-type-1 router-id=172.16.2.249
/routing ospf area
set [ find default=yes ] area-id=0.0.0.0 disabled=no instance=default name=backbone type=default
add area-id=172.16.2.0 default-cost=1 disabled=no inject-summary-lsas=yes instance=default name=area_1 translator-role=\
    translate-candidate type=nssa
/routing ospf network
add area=area_1 disabled=no network=172.16.2.244/30
add area=area_1 disabled=no network=172.16.2.248/30
add area=area_1 disabled=yes network=172.16.2.224/29
Router 1:
/ip address
add address=172.16.0.229/28 disabled=no interface=ether1 network=172.16.0.224
add address=172.16.2.245/30 disabled=no interface=wlan1 network=172.16.2.244

/ip route print
 #      DST-ADDRESS        PREF-SRC        GATEWAY            DISTANCE
 0 ADo  0.0.0.0/0                          172.16.0.227            110
 1 ADC  172.16.0.224/28    172.16.0.229    ether1                    0
 2 ADoU 172.16.2.0/24                                              109
 3 ADo  172.16.2.0/26                      172.16.2.246            110
 4 ADo  172.16.2.64/27                     172.16.2.246            110
 5 ADo  172.16.2.128/28                    172.16.2.246            110
 6 ADo  172.16.2.224/29                    172.16.2.246            110
 7 ADo  172.16.2.232/29                    172.16.2.246            110
 8 ADC  172.16.2.244/30    172.16.2.245    wlan1                     0
 9 ADo  172.16.2.248/30                    172.16.2.246            110
10 ADo  192.168.0.0/16                   172.16.0.227            110

/routing ospf instance
set [ find default=yes ] disabled=no distribute-default=if-installed-as-type-1 in-filter=ospf-in metric-bgp=auto \
    metric-connected=20 metric-default=1 metric-other-ospf=auto metric-rip=20 metric-static=20 name=default out-filter=\
    ospf-out redistribute-bgp=no redistribute-connected=as-type-1 redistribute-other-ospf=as-type-1 redistribute-rip=no \
    redistribute-static=as-type-1 router-id=172.16.2.245
/routing ospf area
set [ find default=yes ] area-id=0.0.0.0 disabled=no instance=default name=backbone type=default
add area-id=172.16.2.0 default-cost=1 disabled=no inject-summary-lsas=yes instance=default name=area_1 translator-role=\
    translate-candidate type=nssa
/routing ospf area range
add advertise=yes area=area_1 cost=calculated disabled=no range=172.16.2.0/24
/routing ospf network
add area=area_1 disabled=no network=172.16.2.244/30
add area=backbone disabled=no network=172.16.0.224/28

/routing filter
add action=accept chain=ospf-out disabled=no invert-match=no prefix=172.16.2.0/24 set-bgp-prepend-path=""
add action=discard chain=ospf-out disabled=no invert-match=no set-bgp-prepend-path=""
Gateway:
/ip address
add address=172.16.0.227/28 disabled=no interface=ether1 network=172.16.0.224
add address=192.168.0.2/16 disabled=no interface=wan network=192.168.0.0

/ip route print
 #      DST-ADDRESS        PREF-SRC        GATEWAY            DISTANCE
 0 ADo  0.0.0.0/0                          192.168.0.1           110
 1 ADC  172.16.0.224/28    172.16.0.227    ether1                    0
 2 ADo  172.16.2.0/24                      172.16.0.229            110
 3 ADo  172.16.2.0/26                      172.16.0.229            110
 4 ADo  172.16.2.64/27                     172.16.0.229            110
 5 ADo  172.16.2.128/28                    172.16.0.229            110
 6 ADo  172.16.2.224/29                    172.16.0.229            110
 7 ADC  192.168.0.0/16   192.168.0.2   wan                     0

/routing ospf network
add area=backbone disabled=no network=172.16.0.224/28
You do not have the required permissions to view the files attached to this post.
 
User avatar
mrz
MikroTik Support
MikroTik Support
Posts: 7056
Joined: Wed Feb 07, 2007 12:45 pm
Location: Latvia
Contact:

Re: Routing filters not filtering summarized OSPF routes

Wed Apr 18, 2012 3:59 pm

routing filters can filter only external routes, otherwie it will break OSPF database.
 
claiudio
newbie
Topic Author
Posts: 49
Joined: Wed Jan 25, 2012 8:04 pm

Re: Routing filters not filtering summarized OSPF routes

Wed Apr 18, 2012 11:21 pm

routing filters can filter only external routes, otherwie it will break OSPF database.
Ok.
But, why are /30 and 172.16.2.232/29 summarized ? Aren't they internal routes ? Even 172.16.2.224/29 isn't propagated, if Router 2 has this net enabled in /routing ospf network
 
User avatar
mrz
MikroTik Support
MikroTik Support
Posts: 7056
Joined: Wed Feb 07, 2007 12:45 pm
Location: Latvia
Contact:

Re: Routing filters not filtering summarized OSPF routes

Fri Apr 20, 2012 12:43 pm

Everything is correct:
172.16.2.232/29
172.16.2.244/30
172.16.2.248/30

are added to OSPF networks, so those routes are summarized by area range.

other routes 172.16.2.xx/xx are external and are accepted by routing filter on router1 so they will be wisible on gateway router.
 
claiudio
newbie
Topic Author
Posts: 49
Joined: Wed Jan 25, 2012 8:04 pm

Re: Routing filters not filtering summarized OSPF routes

Sat Apr 21, 2012 3:31 pm

other routes 172.16.2.xx/xx are external and are accepted by routing filter on router1 so they will be wisible on gateway router.
I think I understand.
routing filter does its job only on external routes matching chain "ospf-out", is it right ?
So, is adding server 2 & 3 to the ospf area the only way to summarize their routes ?

Who is online

Users browsing this forum: Amazon [Bot] and 51 guests