Hello all,
I am currently using an RB5009 and have ether5-8 configured with separate subnets for network segments in my home. All is working great. What I want to do, is keep the current port setup while also setting my sfp port to function as a “trunk” for all the subnets and go directly into my switch. This way, a device directly connected to the router will only get assigned an ip for the subnet to which the port is configured, and the sfp will be able to pass all traffic to the switch which is configured with access ports. I know I need a bridge to accomplish what I am trying to do but keep screwing it up. Can someone help illuminate me? I’m sure it’s crazy simple but the switch and VLAN part of MikroTik still boggles my brain. Please fell free to point out any other stupid things you see in my config.
Current config is as follows:
# dec/26/2021 14:45:29 by RouterOS 7.1.1
# software id = 7ZLE-935S
#
# model = RB5009UG+S+
# serial number =
/interface ethernet
set [ find default-name=ether1 ] name=ether1_WAN
set [ find default-name=ether5 ] name=ether5_LAN
set [ find default-name=ether6 ] name=ether6_KIDS
set [ find default-name=ether7 ] name=ether7_CAMERA
set [ find default-name=ether8 ] name=ether8_DMZ
/interface wireguard
add listen-port=30752 mtu=1420 name=Mullvad
add listen-port=51820 mtu=1420 name="Remote Access Wireguard"
add listen-port=51822 mtu=1420 name=Utah
/interface list
add name=WAN
add name=LAN
add name=VLANS
/interface wireless security-profiles
set [ find default=yes ] supplicant-identity=MikroTik
/ip pool
add name=LAN_POOL ranges=10.20.2.100-10.20.2.254
add name=KIDS_POOL ranges=10.20.20.100-10.20.20.254
add name=CAMERAS_POOL ranges=10.20.40.100-10.20.40.254
add name=DMZ_POOL ranges=10.20.80.100-10.20.80.254
/ip dhcp-server
add address-pool=LAN_POOL interface=ether5_LAN lease-time=8h name=LAN
add address-pool=KIDS_POOL interface=ether6_KIDS lease-time=8h name=KIDS
add address-pool=CAMERAS_POOL interface=ether7_CAMERA lease-time=8h name=\
Cameras
add address-pool=DMZ_POOL interface=ether8_DMZ lease-time=8h name=DMZ
/queue type
add kind=fq-codel name=fqcodel
/queue simple
add max-limit=40M/30M name=Mullvad_fqcodel queue=fqcodel/fqcodel target=\
Mullvad total-queue=fqcodel
add max-limit=30M/15M name=Utah_fqcodel queue=fqcodel/fqcodel target=Utah \
total-queue=fqcodel
add max-limit=60M/35M name=WAN_fqcodel queue=fqcodel/fqcodel target=\
ether1_WAN total-queue=fqcodel
/routing table
add disabled=no fib name=Utah
add disabled=no fib name=Mullvad
/ip neighbor discovery-settings
set discover-interface-list=!WAN
/ip settings
set max-neighbor-entries=8192
/ipv6 settings
set disable-ipv6=yes max-neighbor-entries=8192
/interface list member
add interface=ether5_LAN list=VLANS
add interface=ether1_WAN list=WAN
add interface=ether6_KIDS list=VLANS
add interface=ether7_CAMERA list=VLANS
add interface="Remote Access Wireguard" list=VLANS
add interface=Mullvad list=WAN
add interface=Utah list=VLANS
add interface=ether8_DMZ list=VLANS
/interface wireguard peers
add allowed-address=0.0.0.0/0 endpoint-address=136.36.56.240 endpoint-port=\
51822 interface=Utah persistent-keepalive=30s public-key=\
"UOKuHFY1WhC6b2beXIQGmivsFuXtqY9g8KNd6eC5qTc="
add allowed-address=0.0.0.0/0 endpoint-address=86.106.143.145 endpoint-port=\
51820 interface=Mullvad persistent-keepalive=30s public-key=\
"JQo2XN042FQbMrpvRMpEoA+CpqhRESeSWjkNB+k41Ds="
add allowed-address=10.103.103.2/32 interface="Remote Access Wireguard" \
public-key="S0v2v7bRuzOnzcuC35IOTqEoq7TFXZAeLuXMcqgneC0="
/ip address
add address=10.20.2.1/24 interface=ether5_LAN network=10.20.2.0
add address=10.20.20.1/24 interface=ether6_KIDS network=10.20.20.0
add address=10.20.40.1/24 interface=ether7_CAMERA network=10.20.40.0
add address=10.20.80.1/24 interface=ether8_DMZ network=10.20.80.0
add address=10.102.102.2 interface=Utah network=10.102.102.1
add address=10.64.111.167 interface=Mullvad network=10.64.111.167
add address=10.103.103.1/24 interface="Remote Access Wireguard" network=\
10.103.103.0
/ip cloud
set ddns-enabled=yes ddns-update-interval=5m update-time=no
/ip dhcp-client
add interface=ether1_WAN use-peer-dns=no
/ip dhcp-server lease
add address=10.20.2.54 mac-address=94:9F:3E:A0:10:D0 server=LAN
add address=10.20.20.30 mac-address=10:09:F9:17:CB:1C server=KIDS
add address=10.20.20.31 mac-address=74:E2:0C:75:AF:EB server=KIDS
add address=10.20.20.5 mac-address=74:40:BB:AA:46:51 server=KIDS
add address=10.20.20.21 mac-address=B8:63:4D:9D:54:D7 server=KIDS
add address=10.20.20.10 mac-address=8A:15:12:11:7C:89 server=KIDS
add address=10.20.20.11 mac-address=E6:9D:EF:E8:9C:FA server=KIDS
add address=10.20.20.20 mac-address=22:9F:07:C6:AA:B5 server=KIDS
add address=10.20.20.18 mac-address=68:5A:CF:00:22:4C server=KIDS
add address=10.20.20.23 mac-address=9C:DA:3E:AD:E1:84 server=KIDS
add address=10.20.20.15 mac-address=B8:63:4D:B7:FE:0F server=KIDS
add address=10.20.2.13 mac-address=F0:9F:C2:C3:16:DE server=LAN
add address=10.20.2.12 mac-address=80:2A:A8:DE:F4:4A server=LAN
add address=10.20.2.21 mac-address=80:2A:A8:96:41:CB server=LAN
add address=10.20.2.23 mac-address=74:AC:B9:B0:4C:4A server=LAN
add address=10.20.2.9 mac-address=F0:B3:EC:2A:09:C9 server=LAN
add address=10.20.2.10 mac-address=74:83:C2:79:9F:3D server=LAN
add address=10.20.2.55 mac-address=94:9F:3E:FE:BF:A8 server=LAN
add address=10.20.2.8 mac-address=1C:12:B0:66:D9:F3 server=LAN
add address=10.20.2.20 mac-address=80:2A:A8:53:77:89 server=LAN
add address=10.20.2.22 mac-address=74:AC:B9:B0:4B:EE server=LAN
add address=10.20.2.57 mac-address=94:9F:3E:FE:CF:D8 server=LAN
add address=10.20.2.51 mac-address=94:9F:3E:FE:CB:B0 server=LAN
add address=10.20.2.50 mac-address=94:9F:3E:FE:D1:EC server=LAN
add address=10.20.2.56 mac-address=94:9F:3E:FE:D3:B2 server=LAN
add address=10.20.2.52 mac-address=94:9F:3E:FE:C0:B2 server=LAN
add address=10.20.2.15 mac-address=CC:32:E5:73:FF:EE server=LAN
add address=10.20.2.11 mac-address=80:2A:A8:1D:A1:3F server=LAN
add address=10.20.2.3 mac-address=60:6D:3C:17:00:FD server=LAN
add address=10.20.2.5 mac-address=00:11:32:21:53:FD server=LAN
add address=10.20.2.6 mac-address=00:88:2A:E8:33:B7 server=LAN
add address=10.20.2.4 mac-address=44:09:B8:51:F4:E0 server=LAN
add address=10.20.2.53 mac-address=78:28:CA:53:1D:91 server=LAN
add address=10.20.20.22 mac-address=9C:DA:3E:AE:5D:9E server=KIDS
add address=10.20.80.5 client-id=1:bc:83:85:7e:a7:85 mac-address=\
BC:83:85:7E:A7:85 server=DMZ
add address=10.20.2.70 client-id=1:46:60:f1:80:43:be mac-address=\
46:60:F1:80:43:BE server=LAN
add address=10.20.2.71 client-id=1:b8:31:b5:92:69:d2 mac-address=\
B8:31:B5:92:69:D2 server=LAN
add address=10.20.2.72 client-id=1:54:8c:a0:df:b6:4b mac-address=\
54:8C:A0:DF:B6:4B server=LAN
add address=10.20.40.30 client-id=1:fc:ec:da:1f:5f:c8 mac-address=\
FC:EC:DA:1F:5F:C8 server=Cameras
add address=10.20.2.73 client-id=1:a0:78:17:a4:6f:55 mac-address=\
A0:78:17:A4:6F:55 server=LAN
/ip dhcp-server network
add address=10.20.2.0/24 dns-server=10.20.2.6 domain=mikrotik.overseas \
gateway=10.20.2.1
add address=10.20.20.0/24 dns-server=10.20.2.6 domain=mikrotik.overseas \
gateway=10.20.20.1
add address=10.20.40.0/24 dns-server=10.20.40.1 domain=mikrotik.overseas \
gateway=10.20.40.1
add address=10.20.80.0/24 dns-server=10.20.80.1 domain=mikrotik.overseas \
gateway=10.20.80.1
/ip dns
set allow-remote-requests=yes servers=8.8.8.8,8.8.4.4
/ip firewall address-list
add address=10.20.2.0/24 comment="Local Subnets" list="Local Subnets"
add address=10.10.1.0/24 comment="Utah Subnets" list="Utah Subnets"
add address=10.10.10.0/24 list="Utah Subnets"
add address=10.10.30.0/24 list="Utah Subnets"
add address=10.10.50.0/24 list="Utah Subnets"
add address=10.20.20.0/24 list="Local Subnets"
add address=10.20.80.0/24 list="Local Subnets"
add address=10.20.20.10 comment="Kids Devices" list=KidsDevices
add address=10.20.20.11 list=KidsDevices
add address=10.20.20.22 list=KidsDevices
add address=10.20.20.23 list=KidsDevices
add address=10.20.20.20 list=KidsDevices
add address=10.20.20.21 list=KidsDevices
add address=10.20.20.22 comment="Kids Laptops" list="Kids Laptops"
add address=10.20.20.23 list="Kids Laptops"
add address=10.20.2.50 comment=Sonos list=Sonos
add address=10.20.2.3 comment=Streaming list=Streaming
add address=192.168.88.0/24 list="Local Subnets"
add address=10.20.20.0/24 comment="Kids Network" list="Kids Network"
add address=10.20.2.0/24 comment="Local Trusted Subnet" list=\
"Local Trusted Network"
add address=10.20.2.4 list=Streaming
add address=10.20.2.8 list=Streaming
add address=10.20.2.9 list=Streaming
add address=10.20.2.51 list=Sonos
add address=10.20.2.52 list=Sonos
add address=10.20.2.53 list=Sonos
add address=10.20.2.54 list=Sonos
add address=10.20.2.55 list=Sonos
add address=10.20.2.56 list=Sonos
add address=10.20.2.57 list=Sonos
add address=10.102.102.0/24 comment="Utah Wireguard" list="Utah Wireguard"
add address=10.20.20.30 list=Streaming
add address=10.20.20.31 list=Streaming
add address=10.20.2.7 list=Streaming
add address=10.103.103.0/24 list="Local Subnets"
add address=10.20.2.70 comment="Management devices" list="Management Devices"
add address=10.20.2.71 list="Management Devices"
add address=10.20.2.72 list="Management Devices"
add address=10.20.2.73 list="Management Devices"
add address=10.20.80.0/24 comment="DMZ network" list=DMZ
add address=10.103.103.0/24 list="Management Devices"
add address=10.20.40.0/24 comment=Cameras list=Cameras
add address=10.20.40.0/24 list="Local Subnets"
/ip firewall filter
add action=accept chain=input comment="allow established and related" \
connection-state=established,related
add action=drop chain=input comment="drop invalid" connection-state=invalid
add action=accept chain=input comment="management devices to router" \
connection-state="" src-address-list="Management Devices"
add action=accept chain=input comment="allow ssh" dst-port=55512 protocol=tcp
add action=accept chain=input comment="allow ICMP" protocol=icmp
add action=accept chain=input comment="remote access wireguard" dst-port=\
51820 in-interface=ether1_WAN protocol=udp
add action=accept chain=input comment="utah wireguard" dst-port=51822 \
in-interface=ether1_WAN protocol=udp
add action=accept chain=input comment="DNS " dst-port=53 in-interface-list=\
VLANS protocol=tcp
add action=accept chain=input dst-port=53 in-interface-list=VLANS protocol=\
udp
add action=accept chain=input comment=NTP dst-port=123 in-interface-list=\
VLANS protocol=udp
add action=drop chain=input comment="drop everything else" log-prefix=\
"drop all"
add action=accept chain=forward comment="allow established and related" \
connection-state=established,related
add action=drop chain=forward comment="drop invalid" connection-state=invalid
add action=accept chain=forward comment="remote wireguard" in-interface=\
"Remote Access Wireguard"
add action=accept chain=forward comment="LAN firewall" dst-address-list=!DMZ \
in-interface=ether5_LAN
add action=accept chain=forward comment="kids firewall" dst-address=10.20.2.6 \
dst-port=53 in-interface=ether6_KIDS protocol=tcp
add action=accept chain=forward dst-address=10.20.2.6 dst-port=53 \
in-interface=ether6_KIDS protocol=udp
add action=accept chain=forward in-interface=ether6_KIDS out-interface=Utah \
src-address-list=Streaming
# inactive time
add action=accept chain=forward in-interface=ether6_KIDS out-interface=\
ether1_WAN time=5h-20h30m,sun,mon,tue,wed,thu,fri,sat
add action=accept chain=forward comment="cameras firewall" dst-address=\
10.20.2.10 in-interface=ether7_CAMERA
add action=accept chain=forward comment="DMZ firewall" in-interface=\
ether8_DMZ out-interface=ether1_WAN
add action=drop chain=forward comment="drop everything else" log-prefix=\
"drop all"
/ip firewall mangle
add action=mark-routing chain=prerouting dst-address-list="Local Subnets" \
new-routing-mark=main passthrough=no src-address=10.103.103.0/24
add action=mark-routing chain=prerouting dst-address-list="Utah Subnets" \
new-routing-mark=Utah passthrough=no src-address-list=\
"Local Trusted Network"
add action=mark-routing chain=prerouting new-routing-mark=Utah passthrough=no \
src-address-list=Streaming
add action=mark-routing chain=prerouting new-routing-mark=main passthrough=no \
src-address-list="Local Subnets"
/ip firewall nat
add action=masquerade chain=srcnat out-interface-list=WAN
/ip route
add disabled=no distance=1 dst-address=0.0.0.0/0 gateway=Mullvad pref-src="" \
routing-table=Mullvad scope=30 suppress-hw-offload=no target-scope=10
add disabled=no distance=1 dst-address=10.10.1.0/24 gateway=Utah pref-src="" \
routing-table=main scope=30 suppress-hw-offload=no target-scope=10
add disabled=no distance=1 dst-address=10.10.10.0/24 gateway=Utah pref-src="" \
routing-table=main scope=30 suppress-hw-offload=no target-scope=10
add disabled=no distance=1 dst-address=10.10.30.0/24 gateway=Utah pref-src="" \
routing-table=main scope=30 suppress-hw-offload=no target-scope=10
add disabled=no dst-address=10.10.50.0/24 gateway=Utah routing-table=main \
suppress-hw-offload=no
add disabled=no distance=1 dst-address=0.0.0.0/0 gateway=Utah routing-table=\
Utah scope=30 suppress-hw-offload=no target-scope=10
/ip service
set telnet disabled=yes
set ftp disabled=yes
set www disabled=yes
set ssh port=55512
set api disabled=yes
set winbox address=10.20.0.0/16,10.103.103.0/24
set api-ssl disabled=yes
/ip smb shares
add comment="default share" directory=/pub name=pub
/ip smb users
add name=guest
/ip ssh
set strong-crypto=yes
/ipv6 firewall address-list
add address=::/128 comment="defconf: unspecified address" list=bad_ipv6
add address=::1/128 comment="defconf: lo" list=bad_ipv6
add address=fec0::/10 comment="defconf: site-local" list=bad_ipv6
add address=::ffff:0.0.0.0/96 comment="defconf: ipv4-mapped" list=bad_ipv6
add address=::/96 comment="defconf: ipv4 compat" list=bad_ipv6
add address=100::/64 comment="defconf: discard only " list=bad_ipv6
add address=2001:db8::/32 comment="defconf: documentation" list=bad_ipv6
add address=2001:10::/28 comment="defconf: ORCHID" list=bad_ipv6
add address=3ffe::/16 comment="defconf: 6bone" list=bad_ipv6
/system clock
set time-zone-autodetect=no time-zone-name=Asia/Kuwait
/system identity
set name=RB5009overseas
/system ntp client
set enabled=yes
/system ntp server
set enabled=yes manycast=yes multicast=yes
/system ntp client servers
add address=1.pool.ntp.org
add address=2.pool.ntp.org
add address=3.pool.ntp.org
add address=0.pool.ntp.org
/tool bandwidth-server
set enabled=no
/tool mac-server
set allowed-interface-list=VLANS
/tool mac-server mac-winbox
set allowed-interface-list=LAN
/tool romon
set enabled=yes