Hi Andy,
RIP is working but it wold be better to have OSPF VRF working
The topology is very simple:
10.20.64.0/23--Connected-to---Mikrotik-1 (10.20.94.1) <<<----OSPF-VRF---->>>Mikrotik-2 (10.20.94.2)----Connected-to-192.168.70.x
There is also a static route in Mikrotik 1 pointing to network 192.168.64.0/30 via the 10.20.64.0/23 net.
To make the topology even simpler i have removed the MAIN OSPF instance and the problem of not redistributing either connected or static continues.
Both routers run on area 0.0.0.0 and the network between them is 10.20.94.0 (MTK 1 is 10.20.94.1 and MTK-2 is 10.20.94.2)
Loopback interfaces are 10.20.95.1 for MTK-2 and 10.20.95.1 for MTK-2
Config of MTK 1
/routing ospf instance
add 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=ospf-vrf out-filter=ospf-out \
redistribute-bgp=no redistribute-connected=as-type-1 \
redistribute-other-ospf=no redistribute-rip=no redistribute-static=\
as-type-2 router-id=10.20.95.2 routing-table=vrf
[admin@Mikrotik-1] >
[admin@Mikrotik-1] >
[admin@Mikrotik-1] > /routing ospf area export
# jan/02/1970 00:43:19 by RouterOS 4.12
# software id = ZYYS-TIN6
#
/routing ospf area
add area-id=0.0.0.0 comment="" disabled=no instance=ospf-vrf name=area-vrf \
type=default
[admin@Mikrotik-1] > /routing ospf network export
# jan/02/1970 00:43:32 by RouterOS 4.12
# software id = ZYYS-TIN6
#
/routing ospf network
add area=area-vrf comment="" disabled=no network=10.20.94.0/30
[admin@Mikrotik-1] >
[admin@Mikrotik-1] > /ip route vrf export
# jan/02/1970 00:43:47 by RouterOS 4.12
# software id = ZYYS-TIN6
#
/ip route vrf
add comment="" disabled=no interfaces=\
vlan-vrf,vlan-vrf-to-client,loopback0-vrf route-distinguisher=1:1 \
routing-mark=vrf
[admin@Mikrotik-1] > /ip address export
# jan/02/1970 00:52:55 by RouterOS 4.12
# software id = ZYYS-TIN6
#
/ip address
add address=10.20.64.1/23 broadcast=10.20.65.255 comment="" disabled=no \
interface=vlan-vrf-to-client network=10.20.64.0
add address=10.20.94.1/30 broadcast=10.20.94.3 comment="" disabled=no \
interface=vlan-vrf network=10.20.94.0
add address=10.20.95.2/32 broadcast=10.20.95.2 comment="" disabled=no \
interface=loopback0-vrf network=10.20.95.2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
AND for MTK-2
[admin@Mikrotik-2] > /routing ospf instance export
# jan/02/1970 00:53:52 by RouterOS 4.12
# software id = NY53-VHHJ
#
/routing ospf instance
add 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=ospf-vrf out-filter=ospf-out \
redistribute-bgp=no redistribute-connected=as-type-1 \
redistribute-other-ospf=no redistribute-rip=no redistribute-static=\
as-type-2 router-id=10.20.95.1 routing-table=vrf
[admin@Mikrotik-2] > /routing ospf area export
# jan/02/1970 00:54:15 by RouterOS 4.12
# software id = NY53-VHHJ
#
/routing ospf area
add area-id=0.0.0.0 comment="" disabled=no instance=ospf-vrf name=area-vrf \
type=default
[admin@Mikrotik-2] > /routing ospf network export
# jan/02/1970 00:54:47 by RouterOS 4.12
# software id = NY53-VHHJ
#
/routing ospf network
add area=area-vrf comment="" disabled=no network=10.20.94.0/30
[admin@Mikrotik-2] > /ip route vrf export
# jan/02/1970 00:55:19 by RouterOS 4.12
# software id = NY53-VHHJ
#
/ip route vrf
add comment="" disabled=no interfaces=vlan-vrf,loopback0-vrf,ether3 \
route-distinguisher=1:1 routing-mark=vrf
[admin@Mikrotik-2] > ip address export
# jan/02/1970 00:56:09 by RouterOS 4.12
# software id = NY53-VHHJ
#
/ip address
add address=192.168.70.226/27 broadcast=192.168.70.255 comment="" disabled=no \
interface=ether3 network=192.168.70.224
add address=10.20.95.1/32 broadcast=10.20.95.1 comment="" disabled=no \
interface=loopback0-vrf network=10.20.95.1
add address=10.20.94.2/30 broadcast=10.20.94.3 comment="" disabled=no \
interface=vlan-vrf network=10.20.94.0
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
As you can see from the following
[admin@Mikrotik-1] > /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.20.64.0/23 10.20.64.1 vlan-vrf-to-client 0
1 ADC 10.20.94.0/30 10.20.94.1 vlan-vrf 0
2 ADC 10.20.95.2/32 10.20.95.2 loopback0-vrf 0
3 A S 192.168.64.0/30 10.20.64.2 1
MTK-1 has not learned routes from MTK-2 (if everything worked correclty then MKT-1 should know 192.168.70.224)
But LSAs do exist :
admin@Mikrotik-1] > routing ospf lsa print
AREA TYPE ID ORIGINATOR SEQUENCE-NU... AGE
area-vrf router 10.20.95.1 10.20.95.1 0x80000004 798
area-vrf router 10.20.95.2 10.20.95.2 0x80000004 800
area-vrf network 10.20.94.1 10.20.95.2 0x80000002 800
external as-external 10.20.64.0 10.20.95.2 0x80000002 839
external as-external 10.20.95.1 10.20.95.1 0x80000002 850 <---FROM MTK-2
external as-external 10.20.95.2 10.20.95.2 0x80000002 839
external as-external 192.168.64.0 10.20.95.2 0x80000002 839
external as-external 192.168.70.224 10.20.95.1 0x80000002 850 <-----LSA FROM MTK-2
Finally from the routing table of MTK-2 :
admin@Mikrotik-2] > 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.20.94.0/30 10.20.94.2 vlan-vrf 0
1 ADC 10.20.95.1/32 10.20.95.1 loopback0-vrf 0
2 ADC 192.168.70.224/27 192.168.70.226 ether3 0
No routes from MKT-1 are learned to MTK-2 (192.168.64.0/30 and 10.20.64.0/23) although the LSAs are there:
[admin@Mikrotik-2] > routing ospf lsa print
AREA TYPE ID ORIGINATOR SEQUENCE-NU... AGE
area-vrf router 10.20.95.1 10.20.95.1 0x80000004 652
area-vrf router 10.20.95.2 10.20.95.2 0x80000004 655
area-vrf network 10.20.94.1 10.20.95.2 0x80000002 655
external as-external 10.20.64.0 10.20.95.2 0x80000002 694 <-------- FROM MTK-1
external as-external 10.20.95.1 10.20.95.1 0x80000002 704
external as-external 10.20.95.2 10.20.95.2 0x80000002 694 <--- FROM MTK-1
external as-external 192.168.64.0 10.20.95.2 0x80000002 694 <------ FROM MTK-1
external as-external 192.168.70.224 10.20.95.1 0x80000002 704
If i switch to MAIN OSPF or RIP-VRF everything works correctly.
Once again thank you for your help,
Kolpano