I have a Mikrotik E60IUGS Routerboard. I have configured its Ethernet interfaces 2, 3, 4, and 5 on different network segments. A Netgear switch is connected to one of these segments, and a TP-LINK wireless router is connected to the switch in access point mode with a static IP address within the segment it's connected to. The interface has a DHCP server. My question is how can I ensure the TP-LINK receives 2 Mbps and that clients, such as phones and laptops connected to the TP-LINK router's wireless network, share that bandwidth equally? The IP addresses are assigned by the Mikrotik. How can I do this?
You didn't even specify the model or software of a single device.
In short: you can't. You must connect the two APs directly to the RouterBOARD, using two ports,
without using a shared switch, and create the queues there on the RouteBOARD.
As I read your sketch:
There is a single (large) "pipe" going from the Mikrotik to the (I presume unmanaged) Netgear switch.
From the switch two (equally large) pipes go to two AP's.
You want to divide the bandwith available between these two latter connections?
So basically you want the "main pipe" to be divided in two smaller pipes.
You can do that using VLANs (but it has to be seen if your non-MIkrotik hardware supports VLANs).
Or using two different IP ranges, one for each of the two AP's (subnetting).
Is this what you want to achieve?
Then you need a PCQ queue, usually they are applied to interfaces:
but the mangle rules can be also applied to IP (src/dst-addresses):
https://mo-nirul.blogspot.com/2021/05/mikrotik-pcq-per-ip.html
or - better - to IP ranges (src/dst-address-list):
This is not exactly a "simple" setup, so be prepared to a lot of tests.
Mikrotik E60IUGS
Switch Netgear GS308
AP Router TP-LINK TL-WR940N
Could you tell me why I need to connect the TP-LINK routers directly to two Ethernet ports on the Mikrotik? My goal is to share the internet connection with some neighbors, and the idea is to use the switch to extend the network's range. If you could explain, I would be grateful.
Given your requirements (2M per AP), how can a "stupid" switch divide the traffic exactly into 2M?
It can't; if you have 4M, it doesn't split into two 2M flows...
Can you use a single, ungraded 4-liter bucket to transport exactly 2+2 liters of water separately, or does it mix together?
(Killing joke: aside from the "brilliant" solutions about carrying two 2-kg blocks of ice in the bucket, keeping them refrigerated along the way)
As said usually you use a queue in Mikrotik to "divide" the bandwidth (equally in your case) between two interfaces (physical ports), let's say you give ether3 and ether4 an allowance of 2 Mbps and have an AP connected to each of those.
Using VLANs you can do the same using two "virtual" interfaces, but, as said you need to have VLAN compatible hardware.
The third possibility (seemingly the only possible one with your setup) is to divide the bandwidth between two groups of IP's.
Or maybe you can replace the GS308 with a suitable 8 port device capable of managing VLANs.
In Mikrotik world that would probably be a L009 (even if it is a router it works very well as switch) or a CSS610.
