We currently have an OSPF network between our main Cisco switch and several EdgeRouters. We are trying to add a Mikrotik router to the mix but so far are unable to get it to see the rest of the OSPF network. Configs are pasted below.
Cisco
interface Vlan205
mtu 1526
ip address 192.168.205.1 255.255.255.0
ip ospf network point-to-multipoint
ip ospf cost 65
ip ospf priority 255
ip ospf retransmit-interval 1
!
router ospf 100
router-id 192.168.205.1
log-adjacency-changes
network 192.168.205.0 0.0.0.255 area 0.0.0.0
EdgeRouter
set interfaces ethernet eth0 vif 205 address '192.168.205.22/24'
set interfaces ethernet eth0 vif 205 ip ospf dead-interval 40
set interfaces ethernet eth0 vif 205 ip ospf hello-interval 10
set interfaces ethernet eth0 vif 205 ip ospf network point-to-multipoint
set interfaces ethernet eth0 vif 205 ip ospf priority 1
set interfaces ethernet eth0 vif 205 ip ospf retransmit-interval 5
set interfaces ethernet eth0 vif 205 ip ospf transmit-delay 1
set interfaces ethernet eth0 mtu 1526
set interfaces ethernet eth0 vif 205 mtu 1526
set protocols ospf area 0.0.0.0 network 192.168.205.0/24
set protocols ospf parameters abr-type cisco
set protocols ospf parameters router-id 192.168.205.22
Mikrotik
/interface ethernet
set [ find default-name=combo1 ] mtu=1526
/interface vlan
add interface=ether1 name="vlan101 - BLD1" vlan-id=101
add interface=combo1 mtu=1526 name="vlan205 - WAN" vlan-id=205
/ip pool
add name=dhcp_pool1 ranges=100.1.1.20-100.1.1.254
/ip dhcp-server
add address-pool=dhcp_pool1 disabled=no interface="vlan101 - BLD1" name=dhcp1
/routing ospf instance
set [ find default=yes ] router-id=192.168.205.31
/ip address
add address=192.168.205.31/24 interface="vlan205 - WAN" network=192.168.205.0
add address=100.1.1.1/24 interface="vlan101 - BLD1" network=100.1.1.0
/ip dhcp-server network
add address=100.1.1.0/24 dns-server=64.22.253.138,4.2.2.3 gateway=100.1.1.1
/ip firewall nat
add action=src-nat chain=srcnat out-interface="vlan205 - WAN" src-address=100.1.1.
/ip route
add distance=1 gateway=192.168.205.1
/routing ospf network
add area=backbone network=192.168.205.0/24
/system routerboard settings
set boot-device=flash-boot
you need to add vlan205 - WAN as an OSPF interface and set type to “point-to-multipoint”
By default, your Mikrotik uses the standard broadcast type OSPF interface, so the adjacency will not form because the neighbors are using network type p2mp
I didn’t think of that since in the GUI it added one dynamically. I added it but still don’t see any neighbors.
/interface ethernet
set [ find default-name=combo1 ] mtu=1526
/interface vlan
add interface=ether1 name="vlan101 - BLD1" vlan-id=101
add interface=combo1 mtu=1526 name="vlan205 - WAN" vlan-id=205
/ip pool
add name=dhcp_pool1 ranges=100.1.1.20-100.1.1.254
/ip dhcp-server
add address-pool=dhcp_pool1 disabled=no interface="vlan101 - BLD1" name=dhcp1
/routing ospf instance
set [ find default=yes ] router-id=192.168.205.31
/ip address
add address=192.168.205.31/24 interface="vlan205 - WAN" network=192.168.205.0
add address=100.1.1.1/24 interface="vlan101 - BLD1" network=100.1.1.0
/ip dhcp-server network
add address=100.1.1.0/24 dns-server=64.22.253.138,4.2.2.3 gateway=100.1.1.1
/ip firewall nat
add action=src-nat chain=srcnat out-interface="vlan205 - WAN" src-address=100.1.1.
/ip route
add distance=1 gateway=192.168.205.1
/routing ospf interface
add interface="vlan205 - WAN" network-type=ptmp
/routing ospf network
add area=backbone network=192.168.205.0/24
/system routerboard settings
set boot-device=flash-boot
[admin@MikroTik] > 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 A S 0.0.0.0/0 192.168.205.1 1
1 ADC 100.1.1.0/24 100.1.1.1 vlan101 - BLD1 0
2 ADC 192.168.205.0/24 192.168.205.31 vlan205 - WAN 0
This is what worked on the Mikrotik
/interface ethernet
set [ find default-name=combo1 ] mtu=1526
/interface vlan
add interface=combo1 mtu=1526 name=vlan205 vlan-id=205
/routing ospf instance
set [ find default=yes ] router-id=192.168.205.31
/ip address
add address=192.168.205.31/24 interface=vlan205 network=192.168.205.0
add address=192.168.88.1/24 interface=ether1 network=192.168.88.0
/ip route
add distance=1 gateway=192.168.205.1
/routing ospf interface
add dead-interval=2m hello-interval=30s interface=vlan205 network-type=ptmp
/routing ospf network
add area=backbone network=192.168.205.0/24
I didn’t notice that you had non-default intervals as well. OSPF won’t form an adjacency until all interface parameters match those of the neighbors.