Router RB2011 as a swith with DHCP

Hello All. how are you doing?

I a newbie with Mikrotik stuff and I need to implement a switch and a DHCP server. As I got a Router RB2011 to start with this Mikrotik world, I’m going to use it.

I have to use 3 port as a switch, but really it can be a hub because I’m not going to implement any VLAN in the network. The ports I thought to use eth1 , eth3 and eth4. that where the host will be connected. So I choose eth2 as a master port.

Something like this

The configuration is this:

jan/02/1970 00:36:02 by RouterOS 6.37.4
# software id = 818B-XRQ1
#
/interface ethernet
set [ find default-name=ether3 ] master-port=ether2
set [ find default-name=ether4 ] master-port=ether2
set [ find default-name=ether1 ] master-port=ether2
/ip pool
add name=dhcp_pool1 ranges=192.168.100.2-192.168.100.254
add name=dhcp_pool2 ranges=192.168.100.2-192.168.100.254
/ip dhcp-server
add address-pool=dhcp_pool2 disabled=no interface=ether2 name=dhcp1 relay=\
    192.168.100.1
/ip address
add address=192.168.100.1/24 interface=ether2 network=192.168.100.0
/ip dhcp-server network
add address=192.168.100.0/24 dns-server=0.0.0.0 gateway=192.168.100.1

But that is not running. What I’m doing bad?

Thanks and best regards.

Study carefully my friend

# Create Switch
/interface ethernet
set [ find default-name=ether1 ] name=ether-WAN
set [ find default-name=ether2 ] master-port=none
set [ find default-name=ether3 ] master-port=ether2
set [ find default-name=ether4 ] master-port=ether2
set [ find default-name=ether5 ] master-port=ether2

# Create Bridge
/interface bridge
add name=bridge-LAN protocol-mode=none

# Add Switch ports
/interface bridge port
add bridge=bridge-LAN interface=ether2

# Give Bridge an IP
/ip address
add interface=bridge-LAN address=192.168.0.1/24

# Setup DHCP server on Bridge
/ip pool add name=dhcp_pool1 ranges=192.168.0.10-192.168.0.254
/ip dhcp-server add interface=bridge-LAN add-arp=yes address-pool=dhcp_pool1 always-broadcast=yes authoritative=yes bootp-support=dynamic disabled=no lease-time=1d name=dhcp1
/ip dhcp-server network add address=192.168.0.0/24 dns-server=192.168.0.1 domain=home.local gateway=192.168.0.1