Page 1 of 1

PPPoE & public subnet

Posted: Mon Jan 10, 2022 10:16 am
by AlexM2020
Good morning,
I turn to the forum to try to solve a particular mikrotik configuration that is giving me particular problems.
I'll explain the context and then the problem.
I currently have a router where / 24 public IPs are placed.
This router runs pppoe servers (configuration report below). In the standard configuration, customers undergo a Mascquerade through one of the n public IPs available on the router.
If I need a static public IP, the client will assign a static IP of the pppoe and make a "netmap" that translates a reserved public IP with the private static IP of the pppoe.
Everything works without any problems.
I now need to deliver a public / 29 ip to a customer, what can I do with the pppoe configuration I have now?
Thanks any suggestions or tips are welcome.
ConfigPPPoE.png

Re: PPPoE & public subnet

Posted: Mon Jan 10, 2022 2:57 pm
by Sob
/ppp secret
add name=<user who should get it> ... routes=<subnet>/29

Re: PPPoE & public subnet

Posted: Sun Jan 16, 2022 10:11 am
by AlexM2020
/ppp secret
add name=<user who should get it> ... routes=<subnet>/29
First of all, thanks for the answer.
I didn't understand how I could use that configuration example.
Maybe I have expressed myself badly about my needs, my English is not the best and even this routing problem I have is not very clear.
I insert an illustrative diagram maybe it can be useful to better understand the context. I need to deliver a / 29 subnet through a PPPoE so that my client can create a public subnet.
Thank you
Diagramma.png

Re: PPPoE & public subnet

Posted: Sun Jan 16, 2022 7:59 pm
by Sob
That's what I wrote. You need to somehow identify clients, so I assume each one has username and password, which is defined in "/ppp secret". So you find the right one for this client and add "routes" option to it. Router will then add a route to <subnet>/29 pointing to that client (reconnection may be required, I'm not sure). And that's it. Client can then use the subnet any way they like, assign it as in your image, or invent something more complicated, it's up to them, you don't care. You may need to do some small tweaks on your router, perhaps adjust firewall to properly allow traffic to/from this /29, etc. It depends on what you have there now.

Re: PPPoE & public subnet

Posted: Sun Jan 16, 2022 11:01 pm
by tdw
Or if you are authenticating against RADIUS return a Framed-Route with the other Access-Accept attributes.

As an aside using netmap seems unnecessary, you could just assign the public IP directly to the clients PPPoE connection instead of assigning a private addresss and using NAT.

@sob you do have to force a reconnection to pick up any changes to the route in a ppp secret entry.

Re: PPPoE & public subnet

Posted: Mon Jan 17, 2022 10:20 am
by AlexM2020
Thank you,
I understand the path you have directed me but I cannot apply it in my case. I try to express some additional details to account for the network architecture.

To credit pppoe customers I use usermanager.
To make a customer unique and simplify the assignment of public subnets, I can assign them a static PPPoE IP (Esempiro 10.0.1.1/32 IP Server pppoE: 10.0.0.1/22)

I can't understand what step-by-step rules I have to apply, this is in the diagram that I am going to show you also the subnets upstream of the pppoe server that I can use.
I have a public / 24 that I have divided into / 25 and I have reserved some / 29 for clients who request it.
Most likely I was unclear in describing the problem, if there are any questions I will gladly answer.

Thanks so much.
Schema.png

Re: PPPoE & public subnet

Posted: Mon Jan 17, 2022 7:18 pm
by tdw
I do not believe usermanger allows additional attributes to be added, in which case you will have to manually add and manage static routes for each client requiring a public subnet:
/ip route add dst-address=w.x.y.z/29 gateway=<clientIPaddress>