Community discussions

MikroTik App
 
gnalbandian
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=192.168.50.0/23 dns-server=192.168.50.1 gateway=192.168.50.1 ntp-server=192.168.50.1
add address=192.168.52.0/24 dns-server=8.8.8.8 gateway=192.168.52.1 ntp-server=192.168.52.1
add address=192.168.54.0/23 dns-server=8.8.8.8 gateway=192.168.54.1 ntp-server=192.168.54.1
add address=192.168.88.0/24 dns-server=192.168.88.1 gateway=192.168.88.1 ntp-server=192.168.88.1
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.
 
anav
Forum Guru
Forum Guru
Posts: 4261
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.

viewtopic.php?t=143620
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: amt, Google [Bot], Maggiore81 and 74 guests