OSPF Virtual Link Mikrotik Router Configuration








Fig:OSPF Virtual-Link Topology 

OSPF Virtual link configuration for mikrotik router video
R1 Configuration:
[admin@Microtik-R1] > ip address add address=10.10.10.10/32 interface=loopback0



[admin@ Microtik -R1] > ip address add address=192.168.20.1/30 interface=ether1

[admin@ Microtik -R1] > ip address add address=192.168.10.1/24 interface=ether2

[admin@ Microtik -R1] > routing ospf instance set router-id=10.10.10.10 name=default disabled=no numbers=0

[admin@ Microtik -R1] > routing ospf area set backbone disabled=no area-id=0.0.0.0

[admin@ Microtik -R1] > routing ospf network add network=192.168.20.0/30 area=backbone

[admin@ Microtik -R1] > routing ospf network add network=192.168.10.0/24 area=backbone




R2 Configuration:
[admin@Microtik-R2] > ip address add address=9.9.9.9/32 interface=loopback0

[admin@Microtik-R2] > ip address add address=192.168.20.2/30 interface=ether1

[admin@Microtik-R2] > ip address add address=192.168.50.2/30 interface=ether2

[[admin@Microtik-R2] > routing ospf instance set router-id=9.9.9.9 name=default disabled=no numbers=0

[admin@Microtik-R2] > routing ospf area set backbone disabled=no area-id=0.0.0.0

[admin@Microtik-R2] > routing ospf area add name=Area1 area-id=0.0.0.1 disabled=no

[admin@Microtik-R2] > routing ospf network add network=192.168.20.0/30 area=backbone

[admin@Microtik-R2] > routing ospf network add network=192.168.50.0/30 area=Area1

[admin@Microtik-R2] > routing ospf virtual-link add neighbor-id=7.7.7.7 transit-area=Area1 disabled=no


R3 Configuration:
 [admin@Microtik-R3] > ip address add address=7.7.7.7/32 interface=loopback0

[admin@Microtik-R3] > ip address add address=192.168.40.1/24 interface=ether2

[admin@Microtik-R3] > ip address add address=192.168.50.1/30 interface=ether1

[admin@Microtik-R3] > routing ospf instance set router-id=7.7.7.7 name=default disabled=no numbers=0

[admin@Microtik-R3] > routing ospf area set backbone disabled=no area-id=0.0.0.0

[admin@Microtik-R3] > routing ospf area add name=Area1 area-id=0.0.0.1 disabled=no

[admin@Microtik-R3] > routing ospf network add network=192.168.40.0/24 area=backbone

[admin@Microtik-R3] > routing ospf network add network=192.168.50.0/30 area=Area1

[admin@Microtik-R3] > routing ospf virtual-link add neighbor-id=9.9.9.9 transit-area=Area1 disabled=no



R1 Verification:
[admin@Mikrotik-R1] > routing ospf neighbor print
 0 instance=default router-id=9.9.9.9 address=192.168.20.2 interface=ether1
   priority=1 dr-address=192.168.20.1 backup-dr-address=192.168.20.2
   state="Full" state-changes=9 ls-retransmits=0 ls-requests=0 db-summaries=0
   adjacency=22m17s
[admin@Mikrotik-R1] > routing ospf lsa print
AREA             TYPE         ID             ORIGINATOR     SEQUENCE-NUMBER AGE      
backbone        router       7.7.7.7                   7.7.7.7                         0x8000000E       1364     
backbone        router       9.9.9.9                   9.9.9.9                          0x80000015       1358     
backbone        router       10.10.10.10           10.10.10.10                  0x8000000B      1368     
backbone        network    192.168.20.1         10.10.10.10                  0x80000001       1368     
backbone        summary-n... 192.168.50.0    7.7.7.7                           0x80000002      30       
backbone        summary-n... 192.168.50.0     9.9.9.9                        0x80000004        1362



[admin@Mikrotik-R1] > routing ospf route print
 # DST-ADDRESS        STATE          COST                GATEWAY         INTERFACE                    
 0 192.168.10.0/24    intra-area             10                           0.0.0.0                   ether2                    
 1 192.168.20.0/30    intra-area             10                           0.0.0.0                   ether1                       
 2 192.168.40.0/24    intra-area             30                           192.168.20.2         ether1                       
 3 192.168.50.0/30    inter-area             20                           192.168.20.2         ether1  


[admin@Mikrotik-R1] > 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 ADC  10.10.10.10/32     10.10.10.10               loopback0                0      
 1 ADC  192.168.10.0/24    192.168.10.1                 ether2                  0      
 2 ADC  192.168.20.0/30    192.168.20.1                 ether1                  0      
 3 ADo  192.168.40.0/24                                   192.168.20.2            110    
 4 ADo  192.168.50.0/30                                   192.168.20.2            110
 



R2 Verification:

[admin@Mikrotik-R2] > routing ospf neighbor print
 0 instance=default router-id=7.7.7.7 address=192.168.50.1
   interface=virtual-link priority=1 dr-address=0.0.0.0
   backup-dr-address=0.0.0.0 state="Full" state-changes=4 ls-retransmits=0
   ls-requests=0 db-summaries=0 adjacency=33m29s

 1 instance=default router-id=10.10.10.10 address=192.168.20.1 interface=ether1
   priority=1 dr-address=192.168.20.1 backup-dr-address=192.168.20.2
   state="Full" state-changes=6 ls-retransmits=0 ls-requests=0 db-summaries=0
   adjacency=33m36s

 2 instance=default router-id=7.7.7.7 address=192.168.50.1 interface=ether2
   priority=1 dr-address=192.168.50.1 backup-dr-address=192.168.50.2
   state="Full" state-changes=5 ls-retransmits=0 ls-requests=0 db-summaries=0
   adjacency=33m37s

[admin@Mikrotik-R2] > routing ospf lsa print    
AREA       TYPE         ID             ORIGINATOR     SEQUENCE-NU...        AGE
backbone   router       7.7.7.7               7.7.7.7                          0x8000000F             236
backbone   router       9.9.9.9                9.9.9.9                          0x80000016             230
backbone   router       10.10.10.10        10.10.10.10                  0x8000000C            248
backbone   network     192.168.20.1     10.10.10.10                  0x80000002             248
backbone   summary-n... 192.168.50.0      7.7.7.7                    0x80000002            706
backbone   summary-n... 192.168.50.0      9.9.9.9                     0x80000005           233
Area1      router       7.7.7.7                        7.7.7.7                      0x80000017           236
Area1      router       9.9.9.9        9.9.9.9                                      0x80000016           231
Area1      network      192.168.50.1            7.7.7.7                     0x80000002            243
Area1      summary-n... 192.168.10.0         9.9.9.9                     0x80000002            229
Area1      summary-n... 192.168.20.0          9.9.9.9                     0x80000002           244
Area1      summary-n... 192.168.40.0          7.7.7.7                     0x80000004           700


[admin@Mikrotik-R2] > routing ospf area-border-router print
 # AREA            ROUTERID        STATE      GATEWAY         COST            
 0 backbone        7.7.7.7               intra-area                                       10              
 1 backbone         9.9.9.9              intra-area                                         0               
 2 Area1              7.7.7.7               intra-area     192.168.50.1             10              
 3 Area1              9.9.9.9               intra-area                                         0   

 

[admin@Mikrotik-R2] > routing ospf route print            
 # DST-ADDRESS        STATE          COST                GATEWAY         INTERFACE                        
 0 192.168.10.0/24            intra-area     20                      192.168.20.1            ether1                           
 1 192.168.20.0/30            intra-area     10                           0.0.0.0                 ether1                           
 2 192.168.40.0/24            intra-area     20                      192.168.50.1            ether2                           
 3 192.168.50.0/30            intra-area     10                            0.0.0.0                ether2           



[admin@Mikrotik-R2] > 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 ADC  9.9.9.9/32                 9.9.9.9                loopback0                 0
 1 ADo  192.168.10.0/24                                 192.168.20.1            110
 2 ADC  192.168.20.0/30    192.168.20.2             ether1                    0
 3 ADo  192.168.40.0/24                                 192.168.50.1            110
 4 ADC  192.168.50.0/30    192.168.50.2             ether2                    0


R3 Verification :

[admin@MikroTik-3] > routing ospf neighbor print
 0 instance=default router-id=9.9.9.9 address=192.168.50.2
   interface=virtual-link priority=1 dr-address=0.0.0.0
   backup-dr-address=0.0.0.0 state="Full" state-changes=5 ls-retransmits=0
   ls-requests=0 db-summaries=0 adjacency=47m12s

 1 instance=default router-id=9.9.9.9 address=192.168.50.2 interface=ether1
   priority=1 dr-address=192.168.50.1 backup-dr-address=192.168.50.2
   state="Full" state-changes=11 ls-retransmits=0 ls-requests=0
   db-summaries=0 adjacency=47m19s

[admin@MikroTik-3] > routing ospf area-border-router print
 # AREA            ROUTERID        STATE      GATEWAY         COST            
 0 backbone        7.7.7.7         intra-area                                           0               
 1 backbone        9.9.9.9         intra-area                                           10              
 2 Area1              7.7.7.7         intra-area                                            0               
 3 Area1              9.9.9.9         intra-area               192.168.50.2       10
  

[admin@MikroTik-3] > routing ospf route print            
 # DST-ADDRESS        STATE          COST         GATEWAY         INTERFACE   
 0 192.168.10.0/24         intra-area          30           192.168.50.2              ether1      
 1 192.168.20.0/30         intra-area          20           192.168.50.2              ether1      
 2 192.168.40.0/24         intra-area          10           0.0.0.0                        ether2      
 3 192.168.50.0/30         intra-area          10           0.0.0.0                        ether1


[admin@MikroTik-3] > 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 ADC  7.7.7.7/32               7.7.7.7                  loopback0                  0
 1 ADo  192.168.10.0/24                                  192.168.50.2            110
 2 ADo  192.168.20.0/30                                  192.168.50.2            110
 3 ADC  192.168.40.0/24    192.168.40.1              ether2                    0
 4 ADC  192.168.50.0/30    192.168.50.1              ether1                    0

No comments:

Post a Comment