Sharing Ilmu

Sharing for useful things

Routing OSPF DR & BDR on Mikrotik

On the routing ospf configuration, every router which running ospf routing protocol will try to do adjacency with the neighbor routers. Of course it will be a problem when there are many routers in one network that running routing protocol ospf as the following topologi :

as the shown in the topologi above, routing protocol ospf will drain a lot of resource (CPU,RAM) and it will drain bandwidth too because the network is flooded with adjacency ospf packets.

However that things can be solved on the routing protocol ospf will do selection DR (Designated Router) and BDR (Backup Designated Router). The router that running ospf routing protocol will only do adjacency to DR Router and BDR router. DR Router is a router that works for manage of the running ospf routing protocol while BDR Router is a router that will be DR Router when the DR router before is down.

For selection DR and BDR is done based on priority where the router with highest priority will be DR router and router with the second highest priority will be BDR router. However default priority on mikrotik is 1. If the priority is same then router will doing selection DR and BDR based on RouterID, where router with highest routerID will be DR router and router with second highest routerID will be BDR router.

Selection DR and BDR with highest priority : 

 

Here’s the following configuration example for ospf selection DR and BDR with highest priority. for the configuration i’m using ROSv6.x :

R1 Config :

[admin@MikroTik] > system identity set name=R1
[admin@R1] > ip address add address=192.168.1.1/24 interface=ether1
[admin@R1] > routing ospf instance set 0 router-id=1.1.1.1
[admin@R1] > routing ospf network add network=192.168.1.0/24 area: backbone
[admin@R1] > routing ospf interface add interface=ether1 priority=5
[admin@R1] > routing ospf interface print
Flags: X – disabled, I – inactive, D – dynamic, P – passive
# INTERFACE    COST    PRI    NETWORK-TYPE AUT… AUTHENTICATIO…
0   ether1                 10            5            default                             none
[admin@R1] >

 

R2 Config :

[admin@MikroTik] > system identity set name=R2
[admin@R2] > ip address add address=192.168.1.2/24 interface=ether1
[admin@R2] > routing ospf instance set 0 router-id=2.2.2.2
[admin@R2] > routing ospf network add network=192.168.1.0/24 area=backbone
[admin@R2] > routing ospf interface add interface=ether1 priority=4
[admin@R2] > routing ospf interface print
Flags: X – disabled, I – inactive, D – dynamic, P – passive
# INTERFACE COST    PRI    NETWORK-TYPE AUT… AUTHENTICATIO…
0   ether1                10        4            default       none
[admin@R2] >

 

R3 Config :

[admin@MikroTik] > system identity set name=R3
[admin@R3] > ip address add address=192.168.1.3/24 interface=ether1
[admin@R3] > routing ospf instance set 0 router-id=3.3.3.3
[admin@R3] > routing ospf network add network=192.168.1.0/24 area: backbone
[admin@R3] >

R4 Config :

[admin@MikroTik] > system identity set name=R4
[admin@R4] > ip address add address=192.168.1.4/24 interface=ether1
[admin@R4] > routing ospf instance set 0 router-id=4.4.4.4
[admin@R4] > routing ospf network add network=192.168.1.0/24 area: backbone

 

Check Routing neighbors :

[admin@R4] > routing ospf neighbor print
0 instance=default router-id=3.3.3.3 address=192.168.1.3 interface=ether1
priority=1 dr-address=192.168.1.1 backup-dr-address=192.168.1.2
state=”2-Way” state-changes=2 ls-retransmits=0 ls-requests=0
db-summaries=0

1 instance=default router-id=2.2.2.2 address=192.168.1.2 interface=ether1
priority=4 dr-address=192.168.1.1 backup-dr-address=192.168.1.2
state=”Full” state-changes=5 ls-retransmits=0 ls-requests=0 db-summaries=0
adjacency=2m55s

2 instance=default router-id=1.1.1.1 address=192.168.1.1 interface=ether1
priority=5 dr-address=192.168.1.1 backup-dr-address=192.168.1.2
state=”Full” state-changes=5 ls-retransmits=0 ls-requests=0 db-summaries=0
adjacency=2m55s
[admin@R4] >

As the shown above, you can see DR router is R1 and BDR router is R2 with selection by highest priority.

 

Selection DR and BDR with highest routerID :

Here’s the following configuration for ospf DR and BDR from highest routerID. Konfiguration same like before, but not configuring interface priority (default priority).

[admin@R1] > routing ospf neighbor print
0 instance=default router-id=4.4.4.4 address=192.168.1.4 interface=ether1
priority=1 dr-address=192.168.1.4 backup-dr-address=192.168.1.3
state=”Full” state-changes=6 ls-retransmits=0 ls-requests=0 db-summaries=0
adjacency=3m54s

1 instance=default router-id=2.2.2.2 address=192.168.1.2 interface=ether1
priority=1 dr-address=192.168.1.4 backup-dr-address=192.168.1.3
state=”2-Way” state-changes=8 ls-retransmits=0 ls-requests=0
db-summaries=0

2 instance=default router-id=3.3.3.3 address=192.168.1.3 interface=ether1
priority=1 dr-address=192.168.1.4 backup-dr-address=192.168.1.3
state=”Full” state-changes=6 ls-retransmits=0 ls-requests=0 db-summaries=0
adjacency=3m44s

As the shown above you can see that DR is R4 (Highest routerID) and BDR is R3 (Second highest routerID).

Leave a Reply

Your email address will not be published. Required fields are marked *.

*
*
You may use these <abbr title="HyperText Markup Language">HTML</abbr> tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>