I've created following basic configuration - it is enough or I should add something more? I'm pretty sure I need to set something under /interface ethernet switch port but I'm not sure what exactly should I put there Of course i will prepare corresponding firewall rules later.
Code: Select all
/interface vlan
add comment=wifi-iot interface=bridge name=vlan2 vlan-id=2
add comment=proxmox-prod interface=bridge name=vlan5 vlan-id=5
add comment=proxmox-test interface=bridge name=vlan6 vlan-id=6
/ip pool
add name=default-dhcp ranges=192.168.1.30-192.168.1.60
add name=dhcp-vlan2 ranges=192.168.2.2-192.168.2.30
add name=dhcp-vlan5 ranges=192.168.5.2-192.168.5.62
add name=dhcp-vlan6 ranges=192.168.6.2-192.168.6.14
/ip dhcp-server
add address-pool=default-dhcp interface=bridge lease-time=1d name=defconf
add address-pool=dhcp-vlan2 interface=vlan2 lease-time=3h name=wifi-iot
add address-pool=dhcp-vlan5 interface=vlan5 lease-time=1w name=proxmox-prod
add address-pool=dhcp-vlan6 interface=vlan6 lease-time=6h name=proxmox-test
/interface bridge port
add bridge=bridge comment=defconf interface=ether2
add bridge=bridge comment=defconf interface=ether3
add bridge=bridge comment=defconf interface=ether4
add bridge=bridge comment=defconf interface=ether5
add bridge=bridge comment=defconf interface=wlan1
add bridge=bridge comment=defconf interface=wlan2
add bridge=bridge interface=ether1
/interface ethernet switch vlan
add independent-learning=no ports=ether1 switch=switch1 vlan-id=2
add independent-learning=no ports=ether3,ether4 switch=switch1 vlan-id=5
add independent-learning=no ports=ether3,ether4 switch=switch1 vlan-id=6
# I'm not sure about this part
/interface ethernet switch port
set ether1 vlan-mode=secure vlan-header=add-if-missing
set ether3 vlan-mode=secure vlan-header=add-if-missing
set ether4 vlan-mode=secure vlan-header=add-if-missing
# ----
/ip address
add address=192.168.1.1/26 comment=defconf interface=bridge network=\
192.168.1.0
add address=192.168.2.1/27 interface=vlan2 network=192.168.2.0
add address=192.168.5.1/26 interface=vlan5 network=192.168.5.0
add address=192.168.6.1/28 interface=vlan6 network=192.168.6.0
/ip dhcp-server network
add address=192.168.1.0/26 comment=defconf dns-server=192.168.1.5 gateway=\
192.168.1.1 ntp-server=192.168.1.5
add address=192.168.2.0/27 dns-server=192.168.1.5 gateway=192.168.2.1 \
ntp-server=192.168.1.5
add address=192.168.5.0/26 dns-server=192.168.1.5 gateway=192.168.5.1 \
ntp-server=192.168.1.5
add address=192.168.6.0/28 dns-server=192.168.1.5 gateway=192.168.6.1 \
ntp-server=192.168.1.5