Hello All,
I am very new to Mikrotik and I got a HEX RB750GR3 to play with. I would appreciate some help to configure two vlans and a DHCP server.
What I am trying to do is:
ether1: WAN
ether2: TRUNK - VLANS 30 and 40
ether3: VLAN 30 - access port - member of bridge-1 - IP: 192.168.30.1 - DHCP server → range 192.168.30.2-192.168.30.254
ether4: VLAN 40 - access port - member of bridge-1 - IP: 192.168.40.1
ether5: emergency port - IP: 192.168.50.1 - DHCP server → range: 192.168.50.100-192.168.50.150
At the moment I only got the ether5 emergency port to work.
DHCP is running on ether5 I get an IP and I can play with the remaining settings without losing access to the device.
I am not sure if I even configured the VLANs correctly. If I connect my laptop to ether3 I do not get an ip.
My configuration:
/interface bridge
add name=bridge-1 vlan-filtering=yes
/interface ethernet
set [ find default-name=ether5 ] name=ether5emergency
/interface vlan
add interface=bridge-1 name=vlan-30 vlan-id=30
add interface=bridge-1 name=vlan-40 vlan-id=40
/interface list
add comment=defconf name=WAN
add comment=defconf name=LAN
/interface lte apn
set [ find default=yes ] ip-type=ipv4 use-network-apn=no
/interface wireless security-profiles
set [ find default=yes ] supplicant-identity=MikroTik
/ip pool
add name=default-dhcp ranges=192.168.88.10-192.168.88.254
add name=dhcp-pool-50 ranges=192.168.50.100-192.168.50.150
add name=dhcp_pool2 ranges=192.168.30.2-192.168.30.254
/ip dhcp-server
add address-pool=dhcp-pool-50 interface=ether5emergency name=dhcp1
add address-pool=dhcp_pool2 interface=vlan-30 name=dhcp2
/port
set 0 name=serial0
/interface bridge port
add bridge=bridge-1 frame-types=admit-only-untagged-and-priority-tagged interface=ether3 pvid=30
add bridge=bridge-1 frame-types=admit-only-untagged-and-priority-tagged interface=ether4 pvid=40
/ip neighbor discovery-settings
set discover-interface-list=LAN
/ipv6 settings
set disable-ipv6=yes max-neighbor-entries=8192
/interface bridge vlan
add bridge=bridge-1 tagged=ether2 vlan-ids=30
add bridge=bridge-1 tagged=ether2 vlan-ids=40
/interface list member
add comment=defconf interface=bridge-1 list=LAN
add comment=defconf interface=ether1 list=WAN
add interface=ether5emergency list=LAN
/interface ovpn-server server
set auth=sha1,md5
/ip address
add address=192.168.50.1/24 interface=ether5emergency network=192.168.50.0
add address=192.168.30.1/24 interface=vlan-30 network=192.168.30.0
add address=192.168.40.1/24 interface=vlan-40 network=192.168.40.0
/ip dhcp-client
add comment=defconf interface=ether1
/ip dhcp-server network
add address=192.168.30.0/24 gateway=192.168.30.1
add address=192.168.50.0/24 gateway=192.168.50.1
add address=192.168.88.0/24 comment=defconf gateway=192.168.88.1
/ip dns
set allow-remote-requests=yes
/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 comment="defconf: masquerade" ipsec-policy=out,none out-interface-list=WAN
add action=dst-nat chain=dstnat dst-port=5201 in-interface-list=WAN protocol=tcp to-addresses=192.168.88.254 \
to-ports=5201
/system clock
set time-zone-name=Europe/Berlin
/system identity
set name=RouterOS
/tool mac-server
set allowed-interface-list=LAN
/tool mac-server mac-winbox
set allowed-interface-list=LAN