Community discussions

MikroTik App
 
User avatar
drjanson
just joined
Topic Author
Posts: 3
Joined: Sun May 31, 2020 10:40 pm
Contact:

hAP Lite: How to connect ethernet/LAN device to WLAN subnet?

Tue Feb 23, 2021 12:47 pm

Hi everybody!
Sorry, I'm completely new to networks and even struggle with the search, as I don't know what the name is for what I'm trying to do.
But I belive it must be quite a simple task, so maybe someone here is willing to help me.

Situation:
I'm running a hAP lite ass WLAN Access Point, have set up different WLAN subnets in the router OS, all working fine.
Now I want to connect an ethernet device (IKEA Tradfri Gateway) to the router.
The device must be in the same network as one of my WLANs so that the device can be "found" by the smartphone app that is connected to that WLAN.
How do I achieve that?
(And: is it called something like a "LAN/WLAN BRIDGE" ? Or whats the right term??)
Thanks a lot!
Last edited by drjanson on Sun Feb 28, 2021 6:54 pm, edited 1 time in total.
 
User avatar
drjanson
just joined
Topic Author
Posts: 3
Joined: Sun May 31, 2020 10:40 pm
Contact:

Re: hAP Lite: How to connect ethernet/LAN device to WLAN subnet?

Sun Feb 28, 2021 6:53 pm

Really nobody out there who could help?
 
User avatar
k6ccc
Forum Guru
Forum Guru
Posts: 1497
Joined: Fri May 13, 2016 12:01 am
Location: Glendora, CA, USA (near Los Angeles)
Contact:

Re: hAP Lite: How to connect ethernet/LAN device to WLAN subnet?

Sun Feb 28, 2021 8:46 pm

It will involve setting up a bridge, but I don't use any bridges in my routers, so I can't help you much. The Ethernet port and the WLAN need to be in a bridge, but that's about my limit on bridges.
 
User avatar
anav
Forum Guru
Forum Guru
Posts: 19323
Joined: Sun Feb 18, 2018 11:28 pm
Location: Nova Scotia, Canada
Contact:

Re: hAP Lite: How to connect ethernet/LAN device to WLAN subnet?

Sun Feb 28, 2021 10:35 pm

Yes create a bridge.
Put the wlan on the bridge and the physical port on the hap lite on the bridge.

How does the lan device supposed go get dhcp etc. (wehre does it get it now??)

You really need to draw a network diagram and post your config
/export hide-sensitive file=anynameyouwish
 
User avatar
drjanson
just joined
Topic Author
Posts: 3
Joined: Sun May 31, 2020 10:40 pm
Contact:

Re: hAP Lite: How to connect ethernet/LAN device to WLAN subnet?

Mon Mar 01, 2021 10:02 pm

It will involve setting up a bridge, but I don't use any bridges in my routers, so I can't help you much. The Ethernet port and the WLAN need to be in a bridge, but that's about my limit on bridges.
Yes create a bridge.
Put the wlan on the bridge and the physical port on the hap lite on the bridge.

How does the lan device supposed go get dhcp etc. (wehre does it get it now??)

You really need to draw a network diagram and post your config
/export hide-sensitive file=anynameyouwish
Thanks to both of you.
Especially for for the "hide-sensitive". I didnt know that.. :-)))

After knowing that it must be done with a Bridge, I was able to focus on what I did wrong when I tried to set up the bridge before.

So here is my solution:
1. Create the Bridge
2. Plug the two Ports (ethernet2 and WLAN) into that bridge
3. Set IP Adress(es) for the Network/Subnet
4. Create IP Pool for the Subnet
5. Run DHCP Server on the Bridge (which is the most important part I did wrong firts, so the "dumb" device did not get its IP correctly)

Here's my config, maybe helpfull for anybody else:
# mar/01/2021 20:19:52 by RouterOS 6.44.5
# software id = RUV1-KN06
#
# model = RB941-2nD

/interface bridge
add name=HOME-BRIDGE
/interface wireless security-profiles

set [ find default=yes ] supplicant-identity=MikroTik

add authentication-types=wpa-psk,wpa2-psk eap-methods="" \
    management-protection=allowed mode=dynamic-keys name=HOME \
    supplicant-identity=""

/interface wireless
set [ find default-name=wlan1 ] default-authentication=no default-forwarding=\
    no disabled=no hide-ssid=yes mode=ap-bridge security-profile=\
    "MikroTik wlan1" ssid="MikroTik WLAN" wps-mode=disabled

add disabled=no keepalive-frames=disabled mac-address=AC:AB:74:AB:28:28 \
    master-interface=wlan1 multicast-buffering=disabled name=HOME \
    security-profile=HOME ssid=home wds-cost-range=0 wds-default-cost=0 \
    wps-mode=disabled


/ip pool
add name="HOME Pool" ranges=192.168.80.2-192.168.80.254

/ip dhcp-server

add add-arp=yes address-pool="HOME Pool" disabled=no interface=HOME-BRIDGE \
    name=HOME

/interface bridge port
add bridge=HOME-BRIDGE interface=ether2
add bridge=HOME-BRIDGE interface=HOME

/interface wireless access-list
add interface=HOME vlan-mode=no-tag

/interface wireless connect-list
add interface=HOME security-profile=default

/ip address
add address=XXX.XXX.XXX.100/24 comment="UPLINK to SWITCH" interface=ether1 \
    network=XXX.XXX.XXX.0
add address=192.168.80.1/24 interface=HOME-BRIDGE network=192.168.80.0

/ip dhcp-server config
set store-leases-disk=immediately

/ip dhcp-server network
add address=192.168.80.0/24 comment="HOME (w)LAN" dns-server=192.168.80.1 \
    gateway=192.168.80.1 netmask=24

/ip dns
set allow-remote-requests=yes servers=XXX.XXX.XXX.1

/ip firewall nat
add action=masquerade chain=srcnat comment="HOME wLAN TRAFFIC RAUS" \
    src-address=192.168.80.0/24

/ip route
add comment="GATEWAY (wLan hAP > SWITCH)" distance=1 gateway=XXX.XXX.XXX.1

/ip service

/ip traffic-flow
set enabled=yes interfaces=*7
/system clock
Sorry for beeing paranoid about IPs and feel free to comment, if there's utter nonsense in there!

Who is online

Users browsing this forum: vingjfg and 51 guests