Community discussions

MikroTik App
just joined
Topic Author
Posts: 9
Joined: Fri Jul 04, 2014 9:09 pm

Switch chip VLAN and DHCP

Wed May 20, 2020 9:59 pm

Hi everyone.
I have a 951G-2HnD which has integrated switch chip Atheros 8327.
I have configured 3 VLAN in it and 3 DHCP servers that assign ip to the clients of those VLANS.
The VLANS are assigned to a bridge that acts as a trunk port.

The included bridge ports are the trunk ports itself that goes to two different HP manageable switches and a third port that comunicates with a Unifi Cloud Key controller.
There are several Unifi access points connected to this two HP's switches.
The problem is that the clients received their ip after several seconds thay first connect.
Maybe is a problem with the configuration of my mikrotik.
Here is what I've done:

First, the bridge definition:
/interface bridge
add admin-mac=xx:xx:xx:xx:xx:xx arp=proxy-arp auto-mac=no comment=defconf name=Trunk-Bridge protocol-mode=none
/interface bridge port
add bridge=Trunk-Bridge comment=defconf interface=Eth2-CloudKey
add bridge=Trunk-Bridge comment=defconf interface=Eth3-Trunk-SW-PB
add bridge=Trunk-Bridge comment=defconf interface=Eth4-Trunk-SW-SP
/interface bridge settings
set use-ip-firewall=yes

Then the /interface vlan definition where the DHCP server will reside
/interface vlan
add interface=Trunk-Bridge name=VLAN400 vlan-id=400
add interface=Trunk-Bridge name=VLAN200 vlan-id=200
add interface=Trunk-Bridge name=VLAN300 vlan-id=300
Now, the DHCP server configurations:
/ip dhcp-server
add address-pool=VLAN200_Pool disabled=no interface=VLAN200 lease-time=4h name=VLAN200-DHCP
add address-pool=VLAN300_Pool disabled=no interface=VLAN300  lease-time=4h name=VLAN300-DHCP
add address-pool=VLAN400 _Pool disabled=no interface=VLAN400 lease-time=4h name=VLAN400-DHCP
add address-pool=MGMT-Pool dhcp-option-set=MGMT disabled=no interface=Trunk-Bridge lease-time=4h name=MGMT-DHCP
/ip dhcp-server network
add address= dns-server= gateway= ntp-server=
add address= dns-server= gateway= ntp-server=
add address= dns-server= gateway= ntp-server=
add address= dns-server= gateway= ntp-server=
Finally the VLAN Switch configuration:
/interface ethernet switch port
set 1 default-vlan-id=1 vlan-header=always-strip vlan-mode=secure
set 2 vlan-mode=secure
set 3 vlan-mode=secure
set 4 default-vlan-id=200 vlan-header=always-strip vlan-mode=secure
/interface ethernet switch vlan
add independent-learning=no ports=switch1-cpu,Eth3-Trunk-SW-PB,Eth4-Trunk-SW-SP switch=switch1 vlan-id=400
add independent-learning=no ports=switch1-cpu,Eth3-Trunk-SW-PB,Eth4-Trunk-SW-SP switch=switch1 vlan-id=200
add independent-learning=no ports=switch1-cpu,Eth3-Trunk-SW-PB,Eth4-Trunk-SW-SP switch=switch1 vlan-id=300
add independent-learning=no ports=switch1-cpu,Eth3-Trunk-SW-PB,Eth4-Trunk-SW-SP,Eth2-CloudKey switch=switch1 vlan-id=1

Clients can surf the web, the problem is somettimes they don't get DHCP ip address.
Can someone help me see if there is something odd about this configuration.
Forum Guru
Forum Guru
Posts: 4159
Joined: Sun Feb 18, 2018 11:28 pm
Location: Nova Scotia, Canada

Re: Switch chip VLAN and DHCP

Wed May 20, 2020 11:03 pm

First its not a router but an AP but RoS is Ros.
Also suggest you follow this guide as what you have setup is strange to me.

I'd rather manage rats than software. Follow my advice at your own risk! (Sob & mkx forced me to write that!)

Who is online

Users browsing this forum: eworm, gergelylevente, kswong, Maggiore81, sindy, Tobei and 83 guests