Page 1 of 1

VLAN not working

Posted: Sat Aug 12, 2017 10:52 am
by Nanflexal
see below. thanks

Re: VLAN not working

Posted: Sun Aug 13, 2017 2:34 am
by Nanflexal
Guys, can you tell me what is wrong with my setup. LAN ip is working with internet but VLAN has no internet and cant get ip from VLAN dhcp.

if this config is wrong, can you help me fix it.

thanks in advance.
-------------------------
/interface ethernet
set [ find default-name=ether3 ] name=LAN
set [ find default-name=ether1 ] name=WAN
set [ find default-name=ether2 ] name=WVLAN
/interface vlan
add interface=WVLAN name=VLAN-100 vlan-id=100
add interface=WVLAN name=VLAN-200 vlan-id=200
add interface=WVLAN name=VLAN-300 vlan-id=300
add interface=WVLAN name=VLAN-400 vlan-id=400
add interface=WVLAN name=VLAN-500 vlan-id=500
/ip pool
add name=dhcp_pool0 ranges=10.10.100.2-10.10.100.254
add name=dhcp_pool1 ranges=10.10.101.2-10.10.101.254
add name=dhcp_pool2 ranges=10.10.102.2-10.10.102.254
add name=dhcp_pool3 ranges=10.10.103.2-10.10.103.254
add name=dhcp_pool4 ranges=10.10.104.2-10.10.104.254
/ip dhcp-server
add address-pool=dhcp_pool0 disabled=no interface=VLAN-100 name=dhcp1
add address-pool=dhcp_pool1 disabled=no interface=VLAN-200 name=dhcp2
add address-pool=dhcp_pool2 disabled=no interface=VLAN-300 name=dhcp3
add address-pool=dhcp_pool3 disabled=no interface=VLAN-400 name=dhcp4
add address-pool=dhcp_pool4 disabled=no interface=VLAN-500 name=dhcp5
/ip address
add address=10.10.10.245/24 interface=WAN network=10.10.10.0
add address=192.168.100.254/24 interface=LAN network=192.168.100.0
add address=10.10.100.1/24 interface=VLAN-100 network=10.10.100.0
add address=10.10.101.1/24 interface=VLAN-200 network=10.10.101.0
add address=10.10.102.1/24 interface=VLAN-300 network=10.10.102.0
add address=10.10.103.1/24 interface=VLAN-400 network=10.10.103.0
add address=10.10.104.1/24 interface=VLAN-500 network=10.10.104.0
/ip dhcp-server network
add address=10.10.100.0/24 gateway=10.10.100.1
add address=10.10.101.0/24 gateway=10.10.101.1
add address=10.10.102.0/24 gateway=10.10.102.1
add address=10.10.103.0/24 gateway=10.10.103.1
add address=10.10.104.0/24 gateway=10.10.104.1
/ip dns
set allow-remote-requests=yes cache-size=5000KiB max-udp-packet-size=512 \
servers=4.4.4.4,8.8.8.8
/ip firewall nat
add action=masquerade chain=srcnat out-interface=WAN src-address=10.10.100.0/24
add action=masquerade chain=srcnat out-interface=WAN src-address=10.10.101.0/24
add action=masquerade chain=srcnat out-interface=WAN src-address=10.10.102.0/24
add action=masquerade chain=srcnat out-interface=WAN src-address=10.10.103.0/24
add action=masquerade chain=srcnat out-interface=WAN src-address=10.10.104.0/24
add action=masquerade chain=srcnat out-interface=WAN src-address=\
192.168.100.0/24
/ip route
add distance=1 gateway=10.10.10.254
#error exporting /system routerboard mode-button
[admin@MikroTik] >

Re: VLAN not working

Posted: Sun Aug 13, 2017 5:09 am
by acruhl
The diagram isn't labeled very well, but I will assume that your vlan interfaces are on the WiFi interface of the device attached to the unmanaged switch?

You probably don't need those masquerade rules. One should do:

/ip firewall nat
add action=masquerade chain=srcnat out-interface=WAN

If your clients aren't getting DHCP addresses you have to look at your vlan setups on all the devices. You didn't post that info here. DHCP is layer 2 only and if you're using vlans it's likely the setup isn't right on the other devices.

Re: VLAN not working

Posted: Sun Aug 13, 2017 6:13 am
by Nanflexal
hi guys

i setup small router at home without toughtswitch & i use un-manage switch and still my VLAN is not working and cannot receive ip from VLAN dhcp.

nanobeam is in router mode with vlan enable connected to litebeam ac sector. libtebeam ac sector has no vlan tag and in bridge mode.

Re: VLAN not working

Posted: Sun Aug 13, 2017 6:19 am
by acruhl
You've got the wrong forum it seems.

Re: VLAN not working

Posted: Sun Aug 13, 2017 6:26 am
by Nanflexal
You've got the wrong forum it seems.
maybe but my router is miktrotik.

Re: VLAN not working

Posted: Sun Aug 13, 2017 9:09 am
by nichky
if you play just with MT, you will fix the problem.

Re: VLAN not working

Posted: Wed Aug 30, 2017 2:59 am
by horhay
I always put my radios in WDS (Transparent Bridge) mode and keep the network as Bridge not routed.