/interface ethernet
set 8 arp=enabled auto-negotiation=yes bandwidth=unlimited/unlimited \
disabled=no full-duplex=yes l2mtu=1598 mac-address=00:0C:42:C0:a3:58 \
master-port=none mtu=1500 name=ether2-gw speed=100Mbps
set 9 arp=enabled auto-negotiation=yes bandwidth=unlimited/unlimited \
disabled=no full-duplex=yes l2mtu=1598 mac-address=00:0C:42:C0:a3:59 \
master-port=none mtu=1500 name=ether1-trunk speed=100Mbps
/interface vlan
add arp=enabled disabled=no interface=ether1-trunk l2mtu=1594 mtu=1500 name=\
vlan10 use-service-tag=no vlan-id=10
add arp=enabled disabled=no interface=ether1-trunk l2mtu=1594 mtu=1500 name=\
vlan20 use-service-tag=no vlan-id=20
add arp=enabled disabled=no interface=ether1-trunk l2mtu=1594 mtu=1500 name=\
vlan30 use-service-tag=no vlan-id=30
/interface ethernet switch
set 0 mirror-source=none mirror-target=none name=switch1
set [ find default=yes ] auth-algorithms=sha1 disabled=no enc-algorithms=3des \
lifetime=30m name=default pfs-group=modp1024
/ip pool
add name=dhcp_pool1 ranges=192.168.1.2-192.168.1.254
add name=dhcp_pool2 ranges=192.168.2.2-192.168.2.254
add name=dhcp_pool3 ranges=192.168.3.2-192.168.3.254
/ip dhcp-server
add address-pool=dhcp_pool1 authoritative=after-2sec-delay bootp-support=\
static disabled=no interface=vlan10 lease-time=3d name=dhcp1
add address-pool=dhcp_pool2 authoritative=after-2sec-delay bootp-support=\
static disabled=no interface=vlan20 lease-time=3d name=dhcp2
add address-pool=dhcp_pool3 authoritative=after-2sec-delay bootp-support=\
static disabled=no interface=vlan30 lease-time=3d name=dhcp3
/interface ethernet switch port
set 0 vlan-header=leave-as-is vlan-mode=fallback
set 1 vlan-header=leave-as-is vlan-mode=fallback
set 2 vlan-header=leave-as-is vlan-mode=fallback
set 3 vlan-header=leave-as-is vlan-mode=fallback
set 4 vlan-header=leave-as-is vlan-mode=fallback
set 5 vlan-header=leave-as-is vlan-mode=fallback
set accessible-via-web=no address=0.0.0.0/0
/ip address
add address=192.168.1.1/24 disabled=no interface=vlan10 network=192.168.1.0
add address=192.168.2.1/24 disabled=no interface=vlan20 network=192.168.2.0
add address=192.168.3.1/24 disabled=no interface=vlan30 network=192.168.3.0
/ip dhcp-client
add add-default-route=yes default-route-distance=0 disabled=no interface=\
ether2-gw use-peer-dns=yes use-peer-ntp=yes
/ip dhcp-server config
set store-leases-disk=5m
/ip dhcp-server network
add address=192.168.1.0/24 dhcp-option="" dns-server=8.8.8.8 \
gateway=192.168.1.1 ntp-server="" wins-server=""
add address=192.168.2.0/24 dhcp-option="" dns-server=8.8.8.8 \
gateway=192.168.2.1 ntp-server="" wins-server=""
add address=192.168.3.0/24 dhcp-option="" dns-server=8.8.8.8 \
gateway=192.168.3.1 ntp-server="" wins-server=""
/ip dns
set allow-remote-requests=no cache-max-ttl=1w cache-size=2048KiB \
max-udp-packet-size=4096 servers=8.8.8.8
/ip firewall connection tracking
set enabled=yes generic-timeout=10m icmp-timeout=10s tcp-close-timeout=10s \
tcp-close-wait-timeout=10s tcp-established-timeout=1d \
tcp-fin-wait-timeout=10s tcp-last-ack-timeout=10s \
tcp-syn-received-timeout=5s tcp-syn-sent-timeout=5s tcp-syncookie=no \
tcp-time-wait-timeout=10s udp-stream-timeout=3m udp-timeout=10s
/ip firewall nat
add action=masquerade chain=srcnat disabled=no out-interface=ether2-gw