Community discussions

MikroTik App
 
bienios
just joined
Topic Author
Posts: 5
Joined: Tue Jun 23, 2020 4:31 am

DHCP on Vlan  [SOLVED]

Sat Mar 15, 2025 2:36 pm

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
 
erlinden
Forum Guru
Forum Guru
Posts: 3010
Joined: Wed Jun 12, 2013 1:59 pm
Location: Netherlands

Re: DHCP on Vlan

Sat Mar 15, 2025 2:56 pm

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
 
bienios
just joined
Topic Author
Posts: 5
Joined: Tue Jun 23, 2020 4:31 am

Re: DHCP on Vlan

Sat Mar 15, 2025 3:22 pm

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
 
CGGXANNX
Long time Member
Long time Member
Posts: 525
Joined: Thu Dec 21, 2023 6:45 pm

Re: DHCP on Vlan

Sat Mar 15, 2025 3:49 pm

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).
 
sid5632
Long time Member
Long time Member
Posts: 566
Joined: Fri Feb 17, 2017 6:05 pm

Re: DHCP on Vlan

Sat Mar 15, 2025 10:30 pm

What's this got to do with the User Manager in the first place?
 
bienios
just joined
Topic Author
Posts: 5
Joined: Tue Jun 23, 2020 4:31 am

Re: DHCP on Vlan

Tue Mar 18, 2025 10:54 pm

Finally it begun to work. That posts show different configuration that other manuals saying.