Community discussions

MikroTik App
 
User avatar
witwolf
just joined
Topic Author
Posts: 13
Joined: Thu Jun 04, 2009 12:11 am

Best wayt to setup OSPF

Wed Jan 15, 2014 10:50 am

I am struggling with finding the best way to setup OSPF on a wireless network. I have two issues. First I don't really want to advertise all static routes. The reason is that everytime a client connects to a high site or disconnect OSPF will have to update other high sites if that route is available or not.
/routing ospf instance
set default comment="" disabled=no distribute-default=never 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=no redistribute-other-ospf=no \
    redistribute-rip=no redistribute-static=as-type-1 router-id=172.30.5.254
/routing ospf area
set backbone area-id=0.0.0.0 comment="" disabled=no instance=default name=\
    backbone type=default
/routing ospf area range
add advertise=yes area=backbone comment="" cost=calculated disabled=no range=\
    172.30.5.0/24
add advertise=yes area=backbone comment="" cost=calculated disabled=no range=\
    172.30.31.20/30
/routing ospf interface
add authentication=none authentication-key="" authentication-key-id=1 \
    comment="" cost=10 dead-interval=40s disabled=no hello-interval=10s \
    instance-id=0 interface=wlan1 network-type=broadcast passive=no priority=\
    1 retransmit-interval=5s transmit-delay=1s use-bfd=no
add authentication=none authentication-key="" authentication-key-id=1 \
    comment="" cost=10 dead-interval=40s disabled=no hello-interval=10s \
    instance-id=0 interface=ether1 network-type=broadcast passive=yes \
    priority=1 retransmit-interval=5s transmit-delay=1s use-bfd=no
add authentication=none authentication-key="" authentication-key-id=1 \
    comment="" cost=10 dead-interval=40s disabled=no hello-interval=10s \
    instance-id=0 interface=loopback network-type=broadcast passive=yes \
    priority=1 retransmit-interval=5s transmit-delay=1s use-bfd=no
/routing ospf network
add area=backbone comment="" disabled=no network=0.0.0.0/0
/ip route> print where !ospf
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
23 A S  ;;; Swaelfontein
        172.30.5.32/28                     172.30.5.172       1       
24 ADC  172.30.5.160/28    172.30.5.174    ether1             0       
25 ADC  172.30.5.254/32    172.30.5.254    loopback           0       
32 ADC  172.30.31.20/30    172.30.31.22    wlan1              0  
Is there a way that I can tell OSPF to advertise the sites assigned subnet of 172.30.5.0/24 which will be advertised regardless a client with a range of 172.30.5.32/28 is connected or not?

At the moment that neighbour router has the following routes.
/ip route> print where !disabled
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 ADo  0.0.0.0/0                          172.30.31.5             110
 2 ADo  10.0.5.0/24                        172.30.31.5             110
 3 ADo  172.30.0.0/24                      172.30.31.5             110
 4 ADo  172.30.0.254/32                    172.30.31.5             110
 5 ADo  172.30.1.0/24                      172.30.31.5             110
 6 ADo  172.30.1.252/30                    172.30.31.5             110
 7 ADo  172.30.1.254/32                    172.30.31.5             110
 8 A SB 172.30.2.0/24                                               10
 9 A S   172.30.2.0/28                      172.30.2.249              1
10   S   172.30.2.16/28                     172.30.2.30               1
11 ADC  172.30.2.30/32     172.30.2.254    wlan2-Dennegeur           0
12 A S    172.30.2.48/28                     172.30.2.251              1
13 ADC  172.30.2.80/28     172.30.2.94     ether1                    0
15 ADC  172.30.2.240/28    172.30.2.254    ether1                    0
16 ADC  172.30.2.254/32    172.30.2.254    loopback                  0
17 A S  172.30.3.0/24                      172.30.31.10              1
18 ADo  172.30.3.0/28                      172.30.31.10            110
19 ADo  172.30.3.14/32                     172.30.31.10            110
20 ADo  172.30.3.254/32                    172.30.31.10            110
21 A S  172.30.4.0/24                      172.30.31.10              1
22 ADo  172.30.4.0/28                      172.30.31.10            110
23 ADo  172.30.4.14/32                     172.30.31.10            110
24 ADo  172.30.4.32/28                     172.30.31.10            110
25 ADo  172.30.4.248/30                    172.30.31.10            110
26 ADo  172.30.4.254/32                    172.30.31.10            110
27 ADo  172.30.5.32/28                     172.30.31.22            110
28 ADo  172.30.5.160/28                    172.30.31.22            110
29 ADo  172.30.5.254/32                    172.30.31.22            110
30 A S   172.30.16.0/24                     172.30.2.249              1
31 ADo  172.30.31.0/30                     172.30.31.5             110
32 ADC  172.30.31.4/30     172.30.31.6     vlan2                     0
33 ADC  172.30.31.8/30     172.30.31.9     wlan1-Zeekoegat           0
34 A S  172.30.31.12/30                    172.30.31.10              1
35  Do  172.30.31.12/30                    172.30.31.10            110
36 A S   172.30.31.16/30                    172.30.2.249              1
37 ADC  172.30.31.20/30    172.30.31.21    wlan3-FMToring            0
38 ADo  172.30.31.32/28                    172.30.31.10            110
I have some other routes as well which does not fall in the the networks 172.30.0.0/19 range. I do not want to advertise those routes, but when I enable redistribute static routes it will also advertise the 10.0.5.0/24 route.

What would be the better way to set this up?
 
n21roadie
Forum Guru
Forum Guru
Posts: 1949
Joined: Fri Aug 07, 2009 10:36 pm
Location: Limerick,Ireland

Re: Best wayt to setup OSPF

Wed Jan 15, 2014 11:55 am

For AP's I use PPPoE,
ospf/area include Type=stub,
ospf/area range =pppoe
ospf/network /30 of AP ether interface = backbone
/24 of pppoe ip address=pppoe


/ip route> print where ospf from AP has 77 routes listed
/ip route> print where ospf from CPE has 0 routes listed

Who is online

Users browsing this forum: No registered users and 4 guests