Two mikrotik One Vlan

I have 2 MK routers in two different floors connected as following with ethernet on a 24port switch
1st MK)
ether1 - Wan
ether2 - 192.168.0.1 —> to switch A local lan 192.168.0.0/24
vlan2 192.168.10.1

2nd MK)
ether1 - 192.168.0.2 -->to switch A
ether2 - 192.168.1.1 -->local floor lan 192.168.1.0/24
vlan2 192.168.10.2
default route 0.0.0.0 to 192.168.0.1 as GW
Following this wiki https://wiki.mikrotik.com/wiki/Manual:Interface/VLAN#Simple_VLAN_routing example (Layer3 VLAN examples Simple VLAN routing)

I added the vlan , and the static ip 192.168.10.1 and 192.168.10.2 on the secon .
But i cannot ping inside the mikrotik each other .

What’s the correct configuration?

I’m still kinda new to all this, but I’ll try to help, one step at a time.

Firstly, what are your VLANs bound to? Run the following and post the results.

/interface vlan export

MK one
Interfece ether1 is bound with vlan2 vlan-id=2
MK second
Interface ether2 is bound with vlan2 vlan-id=2

What is your reason for using a VLAN? (I haven’t come across a scenario where a port will have two addresses yet, so I’m curious)

Which IPs are you trying to ping?

Have you read the wiki url i posted?
There is everything explained

You got your VLANs on the wrong ports, you’ll need:
MK1 to have VLAN bound to ether2, and MK2 needs the VLAN on ether1 if what you’re trying to replicate is the scenario in the wiki. However, the wiki states a hub, not a switch, like in your setup. Is your switch a managed switch? I’m assuming you’ll need to set the VLAN on there as well.

i have vlan on eth2 for thr first mk
and vlan on eth1 on the second


my switch is managed , should i tag the port with the same vlad id??
Because on the eth2 are also local ips out without vlan.

Sorry I didn’t get a chance to check the forum yesterday. Did you come right?

I connected and setup the MK’s as you said , but …what i have to do now with the switch ?

If I’m not mistaken, the Mikrotiks are tagging the traffic on vlan 2, so you’ll probably want a trunk (usually trunks are for multiple VLANs, but 1 should be ok). That means you will have to tag the ports the Mikrotiks are plugged into for vlan 2, and make a PVID on both that is a unique VLAN id that is not used anywhere else.

Again, I’m still figuring this stuff out myself, so I may be off…

Personally, I would scrap the IPs on the physical ports, and set the default gw to the other devices VLAN IP… (it might require some trial and error)