hEX PoE lite default + vlan

hi all,

I probably have a very basic question. Although I searched on the forum for an answer, I was unable to find one.
There is a lot of documentation on the forum regarding vlans and config, but what I cant find is how things add up on a all-in-one like the hEX.

All I need is a basic (non-vlan) network, and one VLAN for wifi guests.
The wifi part is already working. And in fact the wifi guests get ip-addresses in the correct range from the Mikrotik, so ‘something’ is working on the VLAN part.
Wifi guests are able to acccess each other over the VLAN, so VLAN setup on the accesspoint is working.
I do have experience with the setup, using Fortigates to I know my wireless part is allright.

However there is no way I can get access from the VLAN to the router (ICMP ping for instance) or to the internet.

I how someone can help me out from this community.
The (messy) config is attached.

Thanks in advance!

http://forum.mikrotik.com/t/using-routeros-to-vlan-your-network/126489/1

Hi BartoszP,

thats exactly the page I meant…but that could not help me solve the issue.
I downloaded the config examples, and tried to match them with my own. However probably it’s a hardware thing that it’s not working.

Also, the examples are based on ‘VLAN only’ setups, and that is exactly what i don’t have…

Any sugestions are welcome..

Go VLAN all the way, once understanding the concept you won’t ever go back.

If you need support, just share your current config:

/export file=anynameyoulike

Remove the serial and any other private information (like public IP).

Thanks, please find attached.

If i go vlan all the way i wouldn’t be able to use a port with and without vlan tagging…like i do now right?
config.rsc (5.25 KB)

Anyone?

Your configuration is very confused. Get rid of switch setting line in the config, mixing apples and oranges!!!
What the heck is 192.168.3 ?? doing in dhcp server network......... removed
Modified firewall rules order and content as required.

Which ports are connected to dumb devices that cannot read vlan tags. probably all?
Which ports are connection to smart devices that can read vlan tags probably none?
Which ethernet ports are supposed to be connected to vlan10 (guests), probably one, so will use ether3 for this purpose in the example below?


+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
First thing I would do is upgrade the firmware to 7.12RC.

_# model = RB750UPr2

serial number

/interface bridge
add admin-mac=48:A9:8A:71:22:42 auto-mac=no comment=defconf name=bridge
protocol-mode=none vlan-filtering=yes
/interface ethernet
set [ find default-name=ether1 ] advertise=
10M-half,10M-full,100M-half,100M-full,1000M-half,1000M-full comment=WAN
mac-address=48:A9:8A:71:22:41 name=ether1-wan
set [ find default-name=ether2 ] mac-address=48:A9:8A:71:22:42
set [ find default-name=ether3 ] mac-address=48:A9:8A:71:22:43
set [ find default-name=ether4 ] mac-address=48:A9:8A:71:22:44
set [ find default-name=ether5 ] mac-address=48:A9:8A:71:22:45

/interface vlan
add interface=bridge name=vlanguest10 vlan-id=10
add interface=bridge name=vlanhome20 vlan-id=20
/interface list
add comment=defconf name=WAN
add comment=defconf name=LAN
/interface wireless security-profiles
set [ find default=yes ] supplicant-identity=MikroTik

/ip pool
add name=dhcp ranges=192.168.7.50-192.168.7.254
add name=VLAN10_guests ranges=10.0.7.10-10.0.7.253
/ip dhcp-server
add address-pool=dhcp disabled=no interface=vlanhome20 lease-time=1h name=MK1-LAN
add address-pool=VLAN10_guests disabled=no interface=vlanguest10 name=
VLAN10-gasten
/system logging action
add bsd-syslog=yes name=cloutikds remote=51.75.26.223 remote-port=5014
syslog-facility=syslog target=remote

/interface bridge port
add bridge=bridge comment=defconf ingress-filtering=yes frame-types=admit-priority-and-untagged interface=ether2 pvid=20
add bridge=bridge comment=defconf ingress-filtering=yes frame-types=admit-priority-and-untagged interface=ether3 pvid=10
add bridge=bridge comment=defconf ingress-filtering=yes frame-types=admit-priority-and-untagged interface=ether4 pvid=20
add bridge=bridge comment=defconf ingress-filtering=yes frame-types=admit-priority-and-untagged interface=ether5 pvid=20
/ip neighbor discovery-settings
set discover-interface-list=LAN

/interface bridge vlan
add bridge=bridge tagged=bridge untagged=ether2,ether4,ether5 vlan-ids=20 comment=homeports
add bridge=bridge tagged=bridge untagged=ether3 vlan-ids=10 comment=guestport
/interface list member
add comment=defconf interface=ether1-wan list=WAN
add interface=vlanguest10 list=LAN
add interface=vlanhome20 list=LAN
/ip address
add address=192.168.7.1/24 comment=defconf interface=vlanhome20 network=
192.168.7.0
add address=10.0.7.1 interface=vlanguest10 network=10.0.7.0
/ip dhcp-client
add comment=defconf disabled=no interface=ether1-wan
/ip dhcp-server lease
add address=192.168.7.252 client-id=1:74:f7:f6:6f:c2:ef mac-address=
74:F7:F6:6F:C2:EF server=MK1-LAN
add address=192.168.7.251 client-id=1:74:f7:f6:6f:c2:d5 mac-address=
74:F7:F6:6F:C2:D5 server=MK1-LAN

/ip dhcp-server network
add address=10.0.7.0/24 dns-server=8.8.8.8 gateway=10.0.7.1
add address=192.168.7.0/24 dns-server=8.8.8.8 domain=mk1.local gateway=
192.168.7.1 netmask=24 ntp-server=192.168.7.1???
/ip dns
set allow-remote-requests=yes
/ip dns static
add address=192.168.7.1 comment=defconf name=router.lan

/ip firewall address-list
add address=adminIP1 list=Authorized comment="admin desktop"
add address=adminIP2 list=Authorized comment="admin laptop"

etc.....
/ip firewall filter
add action=accept chain=input comment=
"defconf: accept established,related,untracked" connection-state=
established,related,untracked
add action=drop chain=input comment="defconf: drop invalid" connection-state=
invalid

add action=accept chain=input comment="defconf: accept ICMP" protocol=icmp
add action=accept chain=input comment=
"defconf: accept to local loopback (for CAPsMAN)" dst-address=127.0.0.1

add action=accept chain=input src-address-list=Authorized
add action=drop chain=input comment="defconf: drop all not coming from LAN"
in-interface-list=!LAN
add action=accept chain=forward comment="defconf: accept in ipsec policy"
ipsec-policy=in,ipsec
add action=accept chain=forward comment="defconf: accept out ipsec policy"
ipsec-policy=out,ipsec
add action=fasttrack-connection chain=forward comment="defconf: fasttrack"
connection-state=established,related
add action=accept chain=forward comment=
"defconf: accept established,related, untracked" connection-state=
established,related,untracked
add action=drop chain=forward comment="defconf: drop invalid"
connection-state=invalid

add action=accept chain=forward in-interface-list=LAN out-interface-list=WAN
add action=accept chain=forward comment="port forwarding" connection-nat-state=dstnat {disable if not required}
add action=drop chain=forward comment="drop all else"

/ip firewall nat
add action=masquerade chain=srcnat comment="defconf: masquerade"
ipsec-policy=out,none out-interface-list=WAN
add action=dst-nat chain=dstnat comment="Seito online ordering" dst-port=8998
in-interface=ether1-wan log=yes log-prefix=seito protocol=tcp
to-addresses=192.168.7.10 to-ports=8080
/ip traffic-flow
set enabled=yes interfaces=*8
/system clock
set time-zone-name=Europe/Amsterdam
/system identity
set name=MK1-GW
/system logging
add action=cloutikds prefix=info topics=info
add action=cloutikds prefix=error topics=error
add action=cloutikds prefix=critical topics=critical
add action=cloutikds prefix=warning topics=warning

/system ntp client
set enabled=yes primary-ntp=40.119.148.38
/system package update
set channel=long-term

/tool mac-server
set allowed-interface-list=NONE
/tool mac-server mac-winbox
set allowed-interface-list=LAN
/tool sniffer
set filter-interface=*8
_

I dont think you need to idenfity NTP in the dhcp server line.
You have set the router to client above ( gets NTP input from external servers ), then you need to add the NTP server option on the router ( which is what all the users will use and all they need to do is point to the subnet interface in their ntp client settings 192.168.7.1 ). If you want to restrict NTP access to certain users, then more tweaking would be required.

Hi,

I admit it is not the cleanest config, but that is mainly because I tried everything…
I can see you moved over to all VLAN, I read this a lot but couldn’t understand.

In your proposed setup I read:
/interface bridge port
add bridge=bridge comment=defconf ingress-filtering=yes frame-types=admit-priority-and-untagged interface=ether2 pvid=20
add bridge=bridge comment=defconf ingress-filtering=yes frame-types=admit-priority-and-untagged interface=ether3 pvid=10
add bridge=bridge comment=defconf ingress-filtering=yes frame-types=admit-priority-and-untagged interface=ether4 pvid=20
add bridge=bridge comment=defconf ingress-filtering=yes frame-types=admit-priority-and-untagged interface=ether5 pvid=20
/ip neighbor discovery-settings
set discover-interface-list=LAN
/interface bridge vlan
add bridge=bridge tagged=bridge untagged=ether2,ether4,ether5 vlan-ids=20 comment=homeports
add bridge=bridge tagged=bridge untagged=ether3 vlan-ids=10 comment=guestport

Why the difference in ether3?
I want the homevlan (20 in your proposed config) to be availabe on ether 2-5 without setting any vlan on any device or packet. So if I connect a computer to one of the ports, I would be connected to that vlan.
On the other hand, if i connect an accesspoint for wifi to a aport, the non-tagged wifi network should be on the default vlan (20?) and the one I tag with 10 should be on the guest.

This setup is easy on other routers, however Microtik is not so easy as I thought.
May you can help me understand?

Cheers!

Simply attach the AP to etherport3.
The access point should get an IP address from vlan10 (either dynamically or statically set) up to you.

Make up your mind where the access port will be located.
Can the access port read vlan tags incoming to the device from an upstream route/switch? (most consumer models cannot, some can provide vlan tags to a guest but that is different and not the same thing)

Hey, I dont think I explained this enough …

What we normally create in other solutions:

  • any device (including the AP) will get an IP from the ‘normal’ not-tagged network. By default this is vlan 1 I assume.
  • Inside the AP we define 2 Wifi’s, the ‘internal Wifi’ that is not using VLAN tagging, and their clients thus being connected to the ‘normal’ or vlan1 network in the basic setup.
  • In the second Wifi we define VLAN10, so all clients will be assigned to that VLAN with a seperate ip range and firewall rules (and of course will not be able to reach the vlan1 by default).

This setup is the one we always use with our customer using other firewalls (like Fortigate) and now want to create in the Mikrotik’s low end solutions, especially for smaller customers (with only a few devices).

Dos this make sense?

Thanks

Anyone?
when appying the script i was unable to get any access to the device.
Needed to reset the whole config.

Shouldn’t be this difficult to create the setup I need?
All other vendors I used in the past supported this setup, and was not hard to build.

Please advise.

recap what I need.
eth 1 = wan DHCP
eth 2-5 bridge, native netword (vlan1) - (so no vlan when connecting a device to one of the ports) and vlan 10 with packets that have a vlan set. This is for the accesspoints attached that have 2 SSID’s. One on the default vlan, nothing special here, and one with VLAN10 set. This is for guests.

Best,
Leon

The solution that I would advise is the following:

/interface bridge port
add bridge=bridge interface=ether2 pvid=10
add bridge=bridge interface=ether3 pvid=10
add bridge=bridge interface=ether4 pvid=10
add bridge=bridge interface=ether5 pvid=10

/interface bridge vlan
add bridge=bridge tagged=bridge,ether2,ether3,ether4,ether5 vlan-ids=20.

Basically what you are asking is to setup hybrid ports.
Any dumb devices attached to any of the above devices will get assigned to the vlan10 subnet.
Any smart devices attached to any of the above ports if setup properly will be able to ingest both subnets and do whatever is necessary.

This tiny device does not support HW-offloaded bridge VLAN filtering, so enabling bridge-vlan-filtering may have a rather serious impact on performance. In case you really need to do anything VLAN-wise on the switch/bridge you should do that in the /interface ethernet switch menu instead. But, based on how you describe your goals, I don’t think that’s needed at all. The only thing you really need is to add a vlan interface for routing purposes:

/interface vlan add interface=bridge name=vlan10 vlan-id=10