I would like your feedback if this is possible with RouterOS on a RB600 (as an example)
To start with I have 16 users at the work location.
Then i have 4 PPPoE accounts for internet access from the provider.
What i want is to create 4 subnets each allowing ONLY 4 (ips) users. so i figured i’d use the /29 network bit.
192.168.1.x/29
192.168.2.x/29
192.168.3.x/29
and
192.168.4.x/29.
this should allow me enough IPs in the /29 network.
Now, when a new user joins he randomly pulls an ip from lets 192.168.1.x/29 until that fills up then the router should give IPs from the next subnet 192.168.2.x/29 and so on.
The most imporatnt part here thats required is each subnet has to have its own PPPoE dialout client login and work on that with its own route and so on.
so for
192.168.1.x/29 we give pppoeDial1 and it has to use that.
192.168.2.x/29 we give pppoeDial2 and it has to use that.
and so on
we dont want a user from 192.168.2.x to be using the internet from 192.168.1.x.
is this workable? if so can you please assist me on how to do this ?
[edit] my current idea is as follows:
1 dhcp server with multiple pools each pool with 4 ip limits
i add then a prerouting mangle rule that actions “mark-routing” with a new-mark-routing mark then in the /ip route i select that routing mark
You could do something along those lines certainly. You also wopuld have to ensure that the routing table had the appropriate route entries for those routing marks - e.g. a default route entry for the corresponding PPPoE client.
Since what you are proposing seems to assign clients randomly to a PPPoE client for internet access have you considered PCC?
i am not sure about pcc.
the thing is each bunch of clients have to go via one pppoe link cause each pppoe link only has so much bandwidth thus the next 3 or 4 people have to be on a different pppoe link.
PCC is designed to spread the connection load over multiple streams (PPPoE connections in your case). You should probably at least be aware of the PCC approach before you decide what to use. PCC shares at the connection level which has the advantage that one user can be using multiple PPPoE connections when things are quiet (on different connections) but you still spread the (connection) load when things are busy.
heres the problem so far.
one machine would continue working and the would drop yet on the winbox it shows both PPPoE connections (clients) as connected. As if its giving machine B priority and ignoring machine A. They should both be working together.
Yes. All PPPoE connections are going out on the same WAN port but that should be ok.
What am I doing wrong? This has got to be something simple.
I suggest that you add routing entries to the relevant 192.168.x.y subnets with the appropriate routing marks - I have seen weird things happen without such routes when using mangle to mark routing.
Incidentally, are all those PPPoE clients being serviced by the same host? The typical problem with multiple PPPoE sessions in one broadcast domain is that unless the service name is specified the startup process will see the PPPoE clients trying their user/pwd combination on the first service to respond and it can take some time for all the clients to find their corresponding service.
Thats exactly what i was doing. the only thing you changed in that example is the gateway which would be invalid … because i need to use the pppoe client connections as gateways.
still makes no sense … why one pc gets the internet then stops then the other gets it.
yet by looking at the pppoe connections are all active.
it should be routing traffic through both at the same time.
Incidentally, are all those PPPoE clients being serviced by the same host? The typical problem with multiple PPPoE sessions in one broadcast domain is that unless the service name is specified the startup process will see the PPPoE clients trying their user/pwd combination on the first service to respond and it can take some time for all the clients to find their corresponding service.
this would be an issue if there were multiple pppoe hosts. i guess it wouldnt hurt to try adding the service name.
No. These entries are placing rules in the relevant routing table to provide a path back the the originating IPs.
In theory if a route does not exist for a path with the relevant routing mark the router will look for a “no mark” route but I have seen cases where a system only worked as expected once the entries for the return traffic were made as above.
i appreciate you assisting me on this issue, CelticComms
lets pause on that routing issue for a minute and delve into the dhcp networks one.
obviously i’d want a dhcp server with multiple pools to server the users.
i can setup a dhcp server with a starting pool and have pool1 be next and pool2 and so on.
pool 1 would be 192.168.10.2-192.168.10.5
next
pool 2 would be 192.168.20.2-192.168.20.5
next
pool 3 would be 192.168.30.2-192.168.30.5
heres where the problem comes in. on the Networks tab in the dhcp server confiuration i obviously can setup a network for 192.168.10.x and 192.168.20.x and 192.168.30.x with the correct configuration however… will the router assign people it gives the 192.168.10.3 address the correct network config?
example if the router gives ip 192.168.10.3 and then gives gateway 20.1 or how would that work?
Indeed it should, but let’s roll back a bit further. Why place the 3 ranges on different subnets? You could have 3 pools within the same subnet which means the same gateway and then just mark routing using mangle rules which have the Src. Address set to a range such as 192.168.10.1-192.168.10.x . If you are using Winbox you can type a hyphenated range into the Src. Address box…
i figured each subnet would be a pppoe-out connection. and it makes life easier on the mangle and nat rules in the src address box.
for each subnet i want to have 3 pcs (192.168.10.2-192.168.10.5) 20.2-20.5 and so on.
i am not sure i follow you on one subnet how i could do that…
but ya itd be a deal breaker if the router assigns 192.168.10.4 to a pc and gives them a gateway of 192.168.20.1… but youre saying it should be ok with the networks configured correctly.
part2: on a side note i made a weird discovery. my issue with one pc losing internet and the other continuing maybe something to do with the rb600a router. because at home i have done the same test project but with a rb2011 router and i didnt notice the “interruptions”. maybe the router is to blame. i’d need to do more tests. not 100% sure on this. i hope i am right and the rb2011 works.
As far as I see the 3 different subnets are all on the same physical network so quite what purpose they server is a mystery to me.
You can specify IP ranges in the Src Address field of a mangle rule - so why not keep it simply and just use one subnet? I suspect that you went down that path because you didn’t know that the Src Address field in the mangle rule can take an IP range (e.g. 192.168.10.2-192.168.10.4) - not just a single address or subnet.
OK - so you want to share the traffic over the PPPoE connections, but from what you have said so far you don’t need to create multiple subnets in order to do that! You can simply use IP ranges in the Mangle Src Address fields. Each subnet you add means another gateway entry and another network entry - more opportunities for typos… and all I am saying is that I have not seen any justification for that approach.
Quite separately you should probably look at PCC anyway…
one subnet 192.168.10.0/24 and separate mangle rules with “src-address=192.168.10.2-192.168.10.5” for each mangle rule and then go with that.
this is great! no need to worry about dhcp problems and only one gateway as you said.
i’ll proceed to try this.
in reference to pcc. i dont know how to even start … i read and watched some youtube demos and still cant grasp it.
can i give pcc 30 pppoe connections and have it work with that? its vital that no pppoe connection take on more than 3 pcs max!