2 concurent pppoe connections on the same wan interface

hello,
please kindly share configuration of 2 concurrent pppoe connections on the same wan interface…
or script also
thanks in advance

You mean for two users of the same service or two different services? In either case, you’ll need a dedicated PPPoE client interface for each connection, and should they connect to a different service each, the client configurations need to have the service name set. So the minimum you need is below, the ****

service-name

is only necessary if we talk about two different services.


interface pppoe-client add service-name=service1 user=user1 password=password1 interface=your-wan-interface-name
interface pppoe-client add service-name=service2 user=user2 password=password2 interface=your-wan-interface-name

The question however is how you are going to use these two WANs, which affects how you shall set additional parameters like ****

add-default-route

.

On xDSL, there is often a common username and password, therefore the user identity is derived from the DSLAM port, but I assume it is not your case, is it?

Thanks for reply,
Sir i have only 1 service provider and i have 2 different Username and passwords…
What i want ?
I want to merge 2 different Username and passwords in one INTERFACE like PCC and 3 lan dhcp i have haplite router.
sorry for bad english !

OK, it now starts making more sense to me.

You can have two PPPoE clients, each with its own username, on the same physical interface and the same service provider, but each of the two PPPoE clients will get its own IP address and the Mikrotik will treat them as two distinct WAN interfaces (pppoe-out1 and pppoe-out2 would be their default names if you don’t specify other ones manually). So to distribute traffic evenly among them, you have to use what is called policy routing. Look e.g. at this post how to use connection-marking and routing-marking, and in the example, replace …list of classifying match conditions for handling A… by pcc=2,0 in-interface-list=all-lan and …list of classifying match conditions for handling B… by pcc=2,1 in-interface-list=all-lan if you want to send 50% of the connections of LAN clients via one PPPoE interface and another 50% via the other one.

E.g. for 3:2 distribution, you would use five connection-marking rules rules in total, pcc=5,0, pcc=5,2, pcc=5,4 to assign new-connection-mark=handling-A and pcc=5,1, pcc=5,3 to assign new-connection-mark=handling-B.

To make use of the assigned routing marks, you have to add the following to your routing table:

/ip route
add dst-address=0.0.0.0/0 gateway=pppoe-out1 routing-mark=handling-A
add dst-address=0.0.0.0/0 gateway=pppoe-out2 routing-mark=handling-B

This is to make it work and understand the principle; you can then make some optimisations to that. In fact, it is enough to mark connections for one of the WANs and let the default handling take care of the other WAN, you just need to make sure that the default route through the WAN which will be used by default handling will have a higher priority (lower value of distance) in the default routing table.