Community discussions

MikroTik App
 
ani
just joined
Topic Author
Posts: 4
Joined: Fri Sep 24, 2021 9:13 am

DHCP Client on slave interface

Fri Sep 24, 2021 5:33 pm

Hello all,
my ISP provide us with some devices, that should be placed "before" router. He suggest to connect uplink cable to switch and from there to his devices and our router. I don´t want to use extra device so my plan is to reconfigure my hAP ac2 like this:
Ethernet ports 1,2,3 will be on "WAN bridge". Ether1 for uplink, Ether2 and 3 for devices from ISP.
Ethernet ports 4,5 and WLAN should be used for LAN.

I use this config:
# sep/24/2021 16:01:22 by RouterOS 6.47.10
# model = RBD52G-5HacD2HnD

/interface bridge
add name=bridge_wan

/interface list
add comment=defconf name=WAN
add comment=defconf name=LAN

/interface bridge port
add bridge=bridge_wan interface=ether1
add bridge=bridge_wan comment=defconf interface=ether2
add bridge=bridge_wan comment=defconf interface=ether3
add bridge=bridge comment=defconf hw=no interface=ether4
add bridge=bridge comment=defconf hw=no interface=ether5
add bridge=bridge comment=defconf interface=wlan1
add bridge=bridge comment=defconf interface=wlan2

/interface list member
add comment=defconf interface=bridge list=LAN
add comment=defconf interface=bridge_wan list=WAN

/ip dhcp-client
# DHCP client can not run on slave interface!
add disabled=no interface=ether1
It works OK, but I get this error in the log:
temporary moving client ether1 from slave to master port, update your config!!!
Should I move DHCP Client from ether1 to bridge_wan?
Will it maintain same functionality?
Is there any better way to solve this problem?

Thank you very much.
 
ani
just joined
Topic Author
Posts: 4
Joined: Fri Sep 24, 2021 9:13 am

Re: DHCP Client on slave interface

Sat Oct 02, 2021 4:50 pm

I tried to change DHCP Client from ether1 to bridge and it seem like its working. Router receives IP address as before and there are no errors in the log.
/ip dhcp-client
add disabled=no interface=bridge_wan
What do you thing about this solution? Is there something to improve or can it be done in any other way?
 
holvoetn
Forum Guru
Forum Guru
Posts: 5481
Joined: Tue Apr 13, 2021 2:14 am
Location: Belgium

Re: DHCP Client on slave interface

Sat Oct 02, 2021 5:10 pm

As far as I understood, if you attach an interface to a bridge, the DHCP client also needs to be on that bridge.
If you really want to have the DHCP client on that interface, remove it from the bridge.
And create the necessary routes.
 
maigonis
Member Candidate
Member Candidate
Posts: 185
Joined: Sat Jul 20, 2019 8:16 pm

Re: DHCP Client on slave interface

Sat Oct 02, 2021 6:40 pm

As you see this seems to work, but I have concern about second bridge - only one bridge is hardware accelerated (on most MT devices). All other bridges goes through CPU and that have a hit on router performance. A better solution would be vlans. (Theoretically, I have little experience whit it)
 
Zacharias
Forum Guru
Forum Guru
Posts: 3459
Joined: Tue Dec 12, 2017 12:58 am
Location: Greece

Re: DHCP Client on slave interface

Sat Oct 02, 2021 6:49 pm

Can you provide a network diagram explaining the Network topology and what is the result you want to achieve ?
 
ani
just joined
Topic Author
Posts: 4
Joined: Fri Sep 24, 2021 9:13 am

Re: DHCP Client on slave interface

Sat Oct 02, 2021 8:18 pm

maigonis
Yes, on hAP ac2 I can choose just one bridge to have hardware offload, so I have chosen one where I expect more traffic. It is just small home network, so I don´t expect much load on CPU.

Zacharias
Image
On left, there is topology recommended by provider. His Set Top Boxes use some streaming service that don´t get trough most routers.
On right, this is topology I want to use, but with same functionality as left one. I want this two Set Top Boxes to be on the network of my provider, not on my LAN.
 
Zacharias
Forum Guru
Forum Guru
Posts: 3459
Joined: Tue Dec 12, 2017 12:58 am
Location: Greece

Re: DHCP Client on slave interface

Sat Oct 02, 2021 9:22 pm

Well, the simplest thing you can do is create two different bridges, one for the Set top boxes and the other for your LAN network ...

However, that extra device ( the Switch ), is that provided by your ISP ?
Maybe it has VLANs configured... you have any details on that ? If you don't use that extra device, can you still reach the Internet ?

Ideally, you should use VLANs as well...
 
tdw
Forum Guru
Forum Guru
Posts: 1847
Joined: Sat May 05, 2018 11:55 am

Re: DHCP Client on slave interface

Sun Oct 03, 2021 4:44 am

Which is what the OP did to avoid having an additional switch, and moving the DHCP client from ether1 to bridge_wan correctly resolves the DHCP client can not run on slave interface warning.

Unless there will be significant traffic directly between the wired LAN ports (ether4 and ether5 in this case) there seems little point in using a single bridge and configuring the switch chip directly (a VLAN-aware bridge would disable all hardware offloading) as any routed and wireless interface traffic is handled by the CPU anyway.
 
ani
just joined
Topic Author
Posts: 4
Joined: Fri Sep 24, 2021 9:13 am

Re: DHCP Client on slave interface

Sun Oct 03, 2021 9:39 pm

Zacharias
This extra device is just regular unmanaged switch. I suspect this Set Top Boxes use VLANs, but ISP don´t share any info about it. Is there any way to figure it out on my own?

tdw
Based on what you wrote I think solution with two bridges should by OK. I don´t expect any significant traffic between devices and most of the devices will be on Wi-Fi anyway so HW offload will not affect them.
 
Zacharias
Forum Guru
Forum Guru
Posts: 3459
Joined: Tue Dec 12, 2017 12:58 am
Location: Greece

Re: DHCP Client on slave interface

Wed Oct 06, 2021 10:23 pm

Those VLANs will not be blocked if the pass through a Bridge that is not VLAN aware ....

Who is online

Users browsing this forum: GoogleOther [Bot] and 47 guests