VRF routing issue on 7.14

We have been observing that in some occasions, certain interfaces work and others do not within the same VRF. We have seen this behavior both on devices that were upgraded from v6 to v7, and on devices configured from scratch on v7.
Below is a basic configuration that does not work. It is worth noting that if we remove the VRF interface, the ping works correctly:

/ip vrf
add interfaces=IL_VRF_TEST name=VRF_TEST
...
/interface list
add name=IL_VRF_TEST
/interface list member
add interface=sfp.111 list=IL_VRF_TEST
...
/ip address
add address=10.1.1.9/30 interface=sfp.111 network=10.1.1.8

Below are the connectivity tests:

> ping 10.1.1.10 src-address=10.1.1.9 vrf=VRF_TEST count=1 
Columns: SEQ, HOST, STATUS
SEQ  HOST           STATUS 
  0  10.1.1.10  timeout

If we remove the interface from the VRF (removing it from the interface list), the connectivity is correct:

> ping 10.1.1.10 src-address=10.1.1.9  count=1            
Columns: SEQ, HOST, SIZE, TTL, TIME
SEQ  HOST           SIZE  TTL  TIME 
  0  10.1.1.10    56   64  414us

Do you get the same if you dont use an interface list but like manually add each and every interface to the VRF (lets start with just 2 of them or so)?

As a bonus question on similar topic - is it possible to (similar to how you can on Arista and VyOS) get to the bash mode when logged in to a Mikrotik?

Would be handy to see what happens in the “backend” of the Linux kernel and its settings when these errors occurs (I have for example one that the DNS service doesnt work with VRF’s which is also confirmed by others but still zero response from Mikrotik on that case).

The behavior is the same both when using interface lists and when explicitly declaring interfaces in the VRF configuration section.
As far as I know, it is not possible to access the underlying linux console in RouterOS (it would be great!).

@clambert

im doing this on 7.15.3

/interface list
add name=IL_VRF_TEST

/ip vrf
add interfaces=IL_VRF_TEST name=VRF_TEST

/interface list member
add interface=ether1 list=IL_VRF_TEST

/ip address
add address=10.10.10.1/30 interface=ether1 network=10.10.10.0



> ping 10.10.10.2 vrf=VRF_TEST   src-address=10.10.10.1 count=1
Columns: SEQ, HOST, SIZE, TTL, TIME
SEQ  HOST        SIZE  TTL  TIME    
  0  10.10.10.2    56   64  5ms506us

@Nichky, I’m also running 7.15.3. I removed the configuration and reconfigured it in the order you show, but it still doesn’t work.

can we get export file of both routers?

Exploring the configuration I found that by disabling the following queue the ping began to respond:

/queue simple
add max-limit=1500M/1500M name=QUEUE-TEST target=sfp.111

Below are the connectivity tests:

> ping 10.1.1.2 vrf=VRF_TEST src-address=10.1.1.1 count=1
Columns: SEQ, HOST, SIZE, TTL, TIME
SEQ  HOST           SIZE  TTL  TIME 
  0  10.1.1.2   56   64  232us

I cannot understand the relationship that may exist.

But it should be an “old” (evidently not resolved) issue:
http://forum.mikrotik.com/t/adding-queue-on-vrf-interface-cause-lost-of-communication/171578/1

I hadn’t found that post. Obviously it’s the same problem.

@clambert

i think that totally makes sense, since that interface is in the VRF.
At the QoS have you tried to use Targed=VRF_TEST instead?

The problem I find in using the VRF_TEST VRF interface as the target is that within the VRF there are several interfaces, which have different bandwidth control policies.

target=sfp.111@VRF_TEST ? :question:

@jaclaz

> queue/simple/set 0 target=sfp.111@VRF_TEST
invalid value for argument target:
    input does not match any value of target-interface
    invalid value for argument target-address:
        value of ip-address must contain '/'
        value of ipv6-address expects IPv6 prefix

The documentation talks about using mangle rules to mark traffic, but for it to work in simple queues, they can only be used in the prerouting chain. This means that I cannot apply marking to traffic going out the sfp.111 interface.

Well, at least we tried.
It would have been too d@mn simple to have the interface notation that is just fine in route/gateway also work in queues.

I was able to find a workaround to control outgoing traffic through the interface:

/ip firewall filter
add action=drop chain=output comment=QUEUE-TEST limit=!1500M,1500M:bit out-interface=sfp.111