Hi, I am trying to create two separate subnets on the same bridge that can communicate with each other directly. The reason for doing this is to manually separate some devices logically from others but there is no need to isolate them security-wise. Since I need to be able to add any random device on the network to this separate subnet I don’t believe I can do something like a VLAN for certain ethernet ports.
The addresses are defined as follows:
[admin@MikroTik] > ip address print
Flags: D - DYNAMIC
Columns: ADDRESS, NETWORK, INTERFACE
# ADDRESS NETWORK INTERFACE
;;; defconf
0 10.0.0.1/24 10.0.0.0 bridge
1 D x.x.x.x/22 x.x.x.x ether1
2 10.10.0.1/24 10.10.0.0 bridge
The issue I had initially was that packets could reach IPs on separate subnets but would almost immediately be dropped by the router because of the “drop invalid packets” rule in the FORWARD firewall chain.
[admin@MikroTik] > ip firewall filter print
Flags: X - disabled, I - invalid; D - dynamic
0 D ;;; special dummy rule to show fasttrack counters
chain=forward action=passthrough
1 ;;; defconf: accept established,related,untracked
chain=input action=accept connection-state=established,related,untracked
2 ;;; defconf: drop invalid
chain=input action=drop connection-state=invalid
3 ;;; defconf: accept ICMP
chain=input action=accept protocol=icmp
4 ;;; defconf: accept to local loopback (for CAPsMAN)
chain=input action=accept dst-address=127.0.0.1
5 ;;; defconf: drop all not coming from LAN
chain=input action=drop in-interface-list=!LAN
6 ;;; defconf: accept in ipsec policy
chain=forward action=accept ipsec-policy=in,ipsec
7 ;;; defconf: accept out ipsec policy
chain=forward action=accept ipsec-policy=out,ipsec
8 ;;; defconf: fasttrack
chain=forward action=fasttrack-connection hw-offload=yes connection-state=established,related
9 ;;; defconf: accept established,related, untracked
chain=forward action=accept connection-state=established,related,untracked
10 ;;; defconf: drop invalid
chain=forward action=drop connection-state=invalid log=no log-prefix=""
11 ;;; defconf: drop all from WAN not DSTNATed
Disabling rule 10 resolved this issue and seemed to allow the devices to communicate. If anyone has any insight into why the router isn’t properly tracking these connections I would appreciate it, since I’m not sure why disabling the rule was necessary at all.
However, now devices on the 10.10.0.0/24 subnet can access services hosted (e.g. a website) on the 10.0.0.0/24 subnet fine, but devices on the 10.0.0.0/24 subnet cannot access services hosted on the 10.10.0.0/24 subnet. The packets are no longer being dropped as invalid, however, anything more complicated than ICMP seems to not work at all.
Additionally, ICMP from 10.10.0.0/24 → 10.0.0.0/24 results in no redirects, but ICMP from 10.0.0.0/24 → 10.10.0.0/24 results in continuous ICMP redirects from the router, though I’m not sure if that’s relevant.
ping 10.10.0.10
PING 10.10.0.10 (10.10.0.10): 56 data bytes
64 bytes from 10.10.0.10: icmp_seq=0 ttl=64 time=6.361 ms
92 bytes from 10.0.0.1: Redirect Host(New addr: 10.10.0.10)
Vr HL TOS Len ID Flg off TTL Pro cks Src Dst
4 5 00 0054 98b1 0 0000 3f 01 cdff 10.0.0.229 10.10.0.10
64 bytes from 10.10.0.10: icmp_seq=1 ttl=64 time=7.069 ms
92 bytes from 10.0.0.1: Redirect Host(New addr: 10.10.0.10)
Vr HL TOS Len ID Flg off TTL Pro cks Src Dst
4 5 00 0054 dcf9 0 0000 3f 01 89b7 10.0.0.229 10.10.0.10
64 bytes from 10.10.0.10: icmp_seq=2 ttl=64 time=6.923 ms
92 bytes from 10.0.0.1: Redirect Host(New addr: 10.10.0.10)
Vr HL TOS Len ID Flg off TTL Pro cks Src Dst
4 5 00 0054 e14f 0 0000 3f 01 8561 10.0.0.229 10.10.0.10
64 bytes from 10.10.0.10: icmp_seq=3 ttl=64 time=11.011 ms
92 bytes from 10.0.0.1: Redirect Host(New addr: 10.10.0.10)
Vr HL TOS Len ID Flg off TTL Pro cks Src Dst
4 5 00 0054 663e 0 0000 3f 01 0073 10.0.0.229 10.10.0.10
Besides the changes made to the IP assignment and the firewall everything else is from the default config. Here is the routing table as well:
[admin@MikroTik] > ip route print detail
Flags: D - dynamic; X - disabled, I - inactive, A - active; c - connect, s - static, r - rip, b - bgp, o - ospf, i - is-is, d - dhcp, v - vpn, m - modem, y - bgp-mpls-vpn; H - hw-offloaded; + - ecmp
DAd dst-address=0.0.0.0/0 routing-table=main pref-src="" gateway=x.x.x.x immediate-gw=x.x.x.x%ether1 distance=1 scope=30 target-scope=10 vrf-interface=ether1 suppress-hw-offload=no
DAc dst-address=10.0.0.0/24 routing-table=main gateway=bridge immediate-gw=bridge distance=0 scope=10 suppress-hw-offload=no local-address=10.0.0.1%bridge
DAc dst-address=10.10.0.0/24 routing-table=main gateway=bridge immediate-gw=bridge distance=0 scope=10 suppress-hw-offload=no local-address=10.10.0.1%bridge
DAc dst-address=x.x.x.x/22 routing-table=main gateway=ether1 immediate-gw=ether1 distance=0 scope=10 suppress-hw-offload=no local-address=x.x.x.x%ether1
Any help is appreciated!