Page 1 of 1

DHCP on Vlan  [SOLVED]

Posted: Sat Mar 15, 2025 2:36 pm
by bienios
Hello.
Even with simple setup of vlans the dhcp doesn't work on my mikrotik. Setting IP manually doesnt help. There is no ping to the gateway. Can you tell what cause the issue ?
2025-03-11 11:46:24 by RouterOS 7.19beta5
# software id = ZN6H-3881
#
# model = L009UiGS
# serial number = HF309AEZ492
/interface vlan
add interface=ether2 name=vlan20 vlan-id=20
add interface=ether3 name=vlan30 vlan-id=30
/interface wireless security-profiles
set [ find default=yes ] supplicant-identity=MikroTik
/iot lora servers
add address=eu1.cloud.thethings.industries name="TTS Cloud (eu1)" protocol=UDP
add address=nam1.cloud.thethings.industries name="TTS Cloud (nam1)" protocol=UDP
add address=au1.cloud.thethings.industries name="TTS Cloud (au1)" protocol=UDP
add address=eu1.cloud.thethings.network name="TTN V3 (eu1)" protocol=UDP
add address=nam1.cloud.thethings.network name="TTN V3 (nam1)" protocol=UDP
add address=au1.cloud.thethings.network name="TTN V3 (au1)" protocol=UDP
/ip pool
add name=poolVlan20 ranges=192.168.20.10-192.168.20.254
add name=poolVlan30 ranges=192.168.30.10-192.168.30.254
/ip dhcp-server
add address-pool=poolVlan20 interface=vlan20 name=dhcpVLAN20
add address-pool=poolVlan30 interface=vlan30 name=dhcpVLAN30
/port
set 0 name=serial0

Image

Re: DHCP on Vlan

Posted: Sat Mar 15, 2025 2:56 pm
by erlinden
I'm missing the IP address assignement of the VLAN:
/ip address add address=192.168.20.1/24 interface=vlan20
/ip address add address=192.168.30.1/24 interface=vlan30
Might want to have a look at this great topic about VLAN's:
viewtopic.php?t=143620

Re: DHCP on Vlan

Posted: Sat Mar 15, 2025 3:22 pm
by bienios
There are IP addresses to both VLANs setup. I deleted and copy paste still same issue. PC is connected to eth3 with static IP 192.168.30.123/24 and DG: 192.168.30.1

Image

Re: DHCP on Vlan

Posted: Sat Mar 15, 2025 3:49 pm
by CGGXANNX
You didn't even read the posts that @erlinden linked for you? Please read that first. Where is your bridge?

Your L009 has a good switch chip with hardware offload for VLAN Filtering. You should create one unique bridge over ether2-ether8 and sfp1, but keep ether1 out of that bridge. Then configure Bridge VLAN Filtering on that bridge (follow that other thread).

Re: DHCP on Vlan

Posted: Sat Mar 15, 2025 10:30 pm
by sid5632
What's this got to do with the User Manager in the first place?

Re: DHCP on Vlan

Posted: Tue Mar 18, 2025 10:54 pm
by bienios
Finally it begun to work. That posts show different configuration that other manuals saying.