Hello,
I am doing my first setup of Microtic router and being stuck with this problem for 3 days now. I want to setup 3 VLANs for my network - Main (10), Guest(20) and IoT(30).
Ports on my Microtic:
- eth1 - PC - VLAN 10
- eth2+3 ->bonding NAS - VLAN 10
- eth 4 - Unifi AP - all VLANs
- eth 7 - Zyxel Switch - all VLANs
- eth 8 - WAN
I was starting with default conf. And my PC is still getting IP adress from default conf (as well as Unify AP). VLANs are working properly on my Wifi network (from Unifi) and as well from my Zyxel Switch. My only trouble now is eth1 + bonding - NAS (and IP of Unifi AP)
Here is my config (def. DHCP is desibled here, but my PC is not getting any IP in this settings)
# 2024-01-01 12:50:47 by RouterOS 7.13
# software id = 7C6J-WVMS
#
# model = RB5009UG+S+
/interface bridge
add admin-mac=78:9A:18:77:7F:16 auto-mac=no comment=defconf name=bridge
/interface ethernet
set [ find default-name=ether1 ] name="ether1 - PC"
set [ find default-name=ether4 ] name="ether4 - unifi"
set [ find default-name=ether7 ] name="ether7 - switch"
set [ find default-name=ether8 ] name="ether8 - wan"
/interface veth
add address=10.42.0.100/24 gateway=10.42.0.1 gateway6="" name=adguard
add address=10.42.0.3/24 gateway=10.42.0.1 gateway6="" name=unifi
/interface vlan
add interface=bridge name=Guest vlan-id=20
add interface=bridge name=IoT vlan-id=30
add interface=bridge name=Main vlan-id=10
/interface bonding
add mode=802.3ad name="bonding - NAS" slaves=ether2,ether3
/container mounts
add dst=/unifi name=unifi-controller_config src=/usb1/containers/unifi
/disk
set usb1 type=hardware
set usb2 type=hardware
/interface list
add comment=defconf name=WAN
add comment=defconf name=LAN
/interface wireless security-profiles
set [ find default=yes ] supplicant-identity=MikroTik
/ip pool
add name="guest - pool" ranges=10.42.20.2-10.42.20.254
add name="IoT - pool" ranges=10.42.30.2-10.42.30.254
add name="Main - pool" ranges=10.42.10.2-10.42.10.254
/ip dhcp-server
add address-pool="guest - pool" interface=Guest name="Guest - DHCP"
add address-pool="IoT - pool" interface=IoT name="IoT - DHCP"
add address-pool="Main - pool" interface=Main name="Main - DHCP"
/container
add interface=adguard start-on-boot=yes workdir=/opt/adguardhome/work
add hostname=unifi interface=unifi logging=yes mounts=unifi-controller_config \
root-dir=usb1/containers/unifi-controller start-on-boot=yes workdir=\
/unifi
/container config
set ram-high=600.0MiB registry-url=https://registry.hub.docker.com/v2/ \
tmpdir=usb1/pull
/interface bridge port
add bridge=bridge comment=defconf frame-types=admit-only-vlan-tagged \
interface="ether4 - unify"
add bridge=bridge comment=defconf interface=ether5
add bridge=bridge comment=defconf interface=ether6
add bridge=bridge comment=defconf frame-types=admit-only-vlan-tagged \
interface="ether7 - switch"
add bridge=bridge comment=defconf frame-types=\
admit-only-untagged-and-priority-tagged interface="ether1 - PC" pvid=10 \
trusted=yes
add bridge=bridge comment=defconf interface=sfp-sfpplus1
add bridge=bridge frame-types=admit-only-untagged-and-priority-tagged \
interface="bonding - NAS" pvid=10
add bridge=bridge interface=adguard
add bridge=bridge interface=unifi
/ip neighbor discovery-settings
set discover-interface-list=LAN
/interface bridge vlan
add bridge=bridge tagged="ether7 - switch,ether4 - unify" vlan-ids=20
add bridge=bridge tagged="ether7 - switch,ether4 - unify" vlan-ids=30
add bridge=bridge tagged="ether4 - unify,ether7 - switch" untagged=\
"ether1 - PC,bonding - NAS" vlan-ids=10
/interface list member
add comment=defconf interface=bridge list=LAN
add comment=defconf interface="ether8 - wan" list=WAN
add interface=Main list=LAN
add interface=IoT list=LAN
add interface=Guest list=LAN
add interface=sfp-sfpplus1 list=WAN
/ip address
add address=10.42.0.1/24 comment=defconf disabled=yes interface=bridge \
network=10.42.0.0
add address=10.42.20.1/24 interface=Guest network=10.42.20.0
add address=10.42.30.1/24 interface=IoT network=10.42.30.0
add address=10.42.10.1/24 interface=Main network=10.42.10.0
/ip dhcp-client
add comment=defconf interface="ether8 - wan" use-peer-dns=no
/ip dhcp-server
add address-pool=*2 disabled=yes interface=bridge name="LAN - DHCP"
/ip dhcp-server network
add address=10.42.0.0/24 dns-server=10.42.0.100 gateway=10.42.0.1
add address=10.42.10.0/24 dns-server=10.42.0.100 gateway=10.42.10.1
add address=10.42.20.0/24 dns-server=10.42.0.100 gateway=10.42.20.1
add address=10.42.30.0/24 dns-server=10.42.0.100 gateway=10.42.30.1
/ip dns
set allow-remote-requests=yes servers=8.8.8.8
/ip dns static
add address=192.168.88.1 comment=defconf name=router.lan
/ip firewall filter
add action=accept chain=input comment=\
"defconf: accept established,related,untracked" connection-state=\
established,related,untracked
add action=drop chain=input comment="defconf: drop invalid" connection-state=\
invalid
add action=accept chain=input comment="defconf: accept ICMP" protocol=icmp
add action=accept chain=input comment=\
"defconf: accept to local loopback (for CAPsMAN)" dst-address=127.0.0.1
add action=drop chain=input comment="defconf: drop all not coming from LAN" \
in-interface-list=!LAN
add action=accept chain=forward comment="defconf: accept in ipsec policy" \
ipsec-policy=in,ipsec
add action=accept chain=forward comment="defconf: accept out ipsec policy" \
ipsec-policy=out,ipsec
add action=fasttrack-connection chain=forward comment="defconf: fasttrack" \
connection-state=established,related hw-offload=yes
add action=accept chain=forward comment=\
"defconf: accept established,related, untracked" connection-state=\
established,related,untracked
add action=drop chain=forward comment="defconf: drop invalid" \
connection-state=invalid
add action=drop chain=forward comment=\
"defconf: drop all from WAN not DSTNATed" connection-nat-state=!dstnat \
connection-state=new in-interface-list=WAN
/ip firewall nat
add action=masquerade chain=srcnat
add action=masquerade chain=srcnat comment="defconf: masquerade" \
ipsec-policy=out,none out-interface-list=WAN
add action=dst-nat chain=dstnat dst-port=443 in-interface-list=WAN protocol=\
tcp to-addresses=10.42.30.253 to-ports=443
add action=redirect chain=dstnat comment="Intercept DNS queries UDP" \
dst-port=53 protocol=udp src-address=!10.42.0.100 to-ports=53
add action=redirect chain=dstnat comment="Intercept DNS queries TCP" \
dst-port=53 protocol=tcp src-address=!10.42.0.100 to-ports=53
/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
/ipv6 firewall filter
add action=accept chain=input comment=\
"defconf: accept established,related,untracked" connection-state=\
established,related,untracked
add action=drop chain=input comment="defconf: drop invalid" connection-state=\
invalid
add action=accept chain=input comment="defconf: accept ICMPv6" protocol=\
icmpv6
add action=accept chain=input comment="defconf: accept UDP traceroute" port=\
33434-33534 protocol=udp
add action=accept chain=input comment=\
"defconf: accept DHCPv6-Client prefix delegation." dst-port=546 protocol=\
udp src-address=fe80::/10
add action=accept chain=input comment="defconf: accept IKE" dst-port=500,4500 \
protocol=udp
add action=accept chain=input comment="defconf: accept ipsec AH" protocol=\
ipsec-ah
add action=accept chain=input comment="defconf: accept ipsec ESP" protocol=\
ipsec-esp
add action=accept chain=input comment=\
"defconf: accept all that matches ipsec policy" ipsec-policy=in,ipsec
add action=drop chain=input comment=\
"defconf: drop everything else not coming from LAN" in-interface-list=\
!LAN
add action=accept chain=forward comment=\
"defconf: accept established,related,untracked" connection-state=\
established,related,untracked
add action=drop chain=forward comment="defconf: drop invalid" \
connection-state=invalid
add action=drop chain=forward comment=\
"defconf: drop packets with bad src ipv6" src-address-list=bad_ipv6
add action=drop chain=forward comment=\
"defconf: drop packets with bad dst ipv6" dst-address-list=bad_ipv6
add action=drop chain=forward comment="defconf: rfc4890 drop hop-limit=1" \
hop-limit=equal:1 protocol=icmpv6
add action=accept chain=forward comment="defconf: accept ICMPv6" protocol=\
icmpv6
add action=accept chain=forward comment="defconf: accept HIP" protocol=139
add action=accept chain=forward comment="defconf: accept IKE" dst-port=\
500,4500 protocol=udp
add action=accept chain=forward comment="defconf: accept ipsec AH" protocol=\
ipsec-ah
add action=accept chain=forward comment="defconf: accept ipsec ESP" protocol=\
ipsec-esp
add action=accept chain=forward comment=\
"defconf: accept all that matches ipsec policy" ipsec-policy=in,ipsec
add action=drop chain=forward comment=\
"defconf: drop everything else not coming from LAN" in-interface-list=\
!LAN
/system clock
set time-zone-name=Europe/Prague
/system note
set show-at-login=no
/tool mac-server
set allowed-interface-list=LAN
/tool mac-server mac-winbox
set allowed-interface-list=LAN
I didnt do anything with firewall settings yet. They are from default conf.
Thank you for your help!