Syed Jahanzaib Personal Blog to Share Knowledge !

September 9, 2011

Load Balancing Users Among Multiple PPPoE Servers on Same LAN !

Filed under: Mikrotik Related — Tags: , , — Syed Jahanzaib / Pinochio~:) @ 1:57 PM


Following are few simple tips N tricks on howto load balance users among multiple PPPoE Servers working on same LAN.

This is some times required if you have thousands of users and you want to avoid overload single server. Following the tips, you will be able to do load balance as well as fail over configuration , if one server dies, other will automatically take the load 🙂

The PPPoE Client sends out a service inquiry and whichever mac address responds first is the one it tries to connect with. This is the easiest way to load balance PPPoE.

# Configure two [or more as per required] PPPoE servers with the same or likewise hardware and same service name to the same switch where clients are connected. Just make sure that on each mikrotik, ip pool for pppoe users should not overlap with each other, working example is as follows …

Mikrotik -1  >  Ip pool for pppoe users = 172.16.0.1-172.16.10.255
Mikrotik -2  >  Ip pool for pppoe users = 172.16.11.1-172.16.20.255
Mikrotik -3  >  Ip pool for pppoe users = 172.16.21.1-172.16.30.255

adn the public ip pool should be different as well.

# From Each client, the two pppoe servers must be reachable at L2.

# Each client can connect randomly to one pppoe server or the other. there will no FIXED percentage, but in practical it maybe around 60-40% or 45-55% sort of. The PPPoE Client sends out a service inquiry and whichever mac address responds first is the one it tries to connect with.

# If one server is Down, All users can Connect the second one or Only available Server.

Howto scan pppoe servers running on your Network.

# By using pppoe scanner, you can search how many pppoe servers are running in your network. Open Terminal and use

/interface pppoe-client scan ether1 [LAN]

OR Likewise
it will show you all the servers running on this interface connected network.

.

Regard’s
Syed Jahanzaib

Advertisements

16 Comments »

  1. Thanks for sharing bro!

    Suppose I have a network with 100+ users and one PPPoE server..

    If one of my users installs PPPoE server on his computer (for any reason),
    other users will get connected to his PPPoE server instead of mine..

    Is there a way that I can force all the users to connect with my PPPoE server only?

    And if not, how can I track that black sheep?

    Thanks again!

    Like

    Comment by AskTaimoor — January 15, 2012 @ 11:54 PM

    • # You can’t restrict user computer to use your pppoe server only. PPPoE works on broadcasting.
      Use specific service name in the pppoe server so all users must use same name in there pppoe dialer configured in order to connect to your pppoe server.

      # By using pppoe scanner, you can search how many pppoe servers are running in your network. Open Terminal and use

      /interface pppoe-client scan ether1

      /interface pppoe-client scan ether2

      OR Likewise

      it will show you all the servers running on this interface connected network.

      Like

      Comment by Syed Jahanzaib / Pinochio~:) — January 16, 2012 @ 10:47 AM

  2. Dear Sayed Brother. I am fan of yours. you r great teacher in internet.
    I Need Some help of your. I need to configure a radius server for my pppoe user. i’ve almost 500 user. i m using mikrotik. and i m new to the network…….

    thanx in advance

    Like

    Comment by xbnbd — August 19, 2012 @ 1:38 AM

    • What kind of radius you want to configure?
      Mikrotik base User Manager Radius Server?
      or 3rd party radius server like DMASOFTLAB RM ?

      Like

      Comment by Syed Jahanzaib / Pinochio~:) — August 19, 2012 @ 1:46 PM

      • third party radius server, like free radius

        Like

        Comment by xbnbd — August 22, 2012 @ 2:16 PM

  3. AOA i have one problem.I want to split Bandwidth between two pppoe server how can i do this?. Bandwidth is comming from one load balancer.

    Like

    Comment by shahzad — September 10, 2012 @ 11:24 AM

  4. Thanks bro

    You mean only this entry in queue?

    /queue simple add name=”test” target-addresses=192.168.2.253 max-limit=384000/384000

    Like

    Comment by shahzad — September 10, 2012 @ 3:46 PM

  5. can i use 2 ppoe server on one lan,,, some of my client dont have feature(service name) to connect to the correct server. HELP ME

    Like

    Comment by manny — April 7, 2014 @ 12:19 AM

  6. brother Syed,

    these are my configurations, noting that i’m using MT usermanager on that box.

    /ip address print
    Flags: X – disabled, I – invalid, D – dynamic
    # ADDRESS NETWORK INTERFACE
    0 ;;; static ip clients 192.168.0.1/24 192.168.0.0 local
    1 10.0.0.100/24 10.0.0.0 WAN1
    2 5.5.5.200/24 5.5.5.0 WAN2
    3 D 192.168.0.1/32 10.10.10.199
    4 D 192.168.0.1/32 10.10.10.198
    5 D 192.168.0.1/32 10.10.10.196
    6 D 192.168.0.1/32 10.10.10.195

    /ip firewall mangle print
    Flags: X – disabled, I – invalid, D – dynamic
    0 chain=input action=mark-connection new-connection-mark=WAN1_conn passthrough=yes in-interface=WAN1
    1 chain=input action=mark-connection new-connection-mark=WAN2_conn passthrough=yes in-interface=WAN2
    2 chain=output action=mark-routing new-routing-mark=to_WAN1 passthrough=yes connection-mark=WAN1_conn
    3 chain=output action=mark-routing new-routing-mark=to_WAN2 passthrough=yes connection-mark=WAN2_conn
    4 chain=prerouting action=accept dst-address=10.0.0.0/24 in-interface=local
    5 chain=prerouting action=accept dst-address=5.5.5.0/24 in-interface=local
    6 chain=prerouting action=mark-connection new-connection-mark=WAN1_conn passthrough=yes dst-address-type=!local in-interface=local per-connection-classifier=both-addresses-and-ports:2/0
    7 chain=prerouting action=mark-connection new-connection-mark=WAN2_conn passthrough=yes dst-address-type=!local in-interface=local
    8 chain=prerouting action=mark-routing new-routing-mark=to_WAN1 passthrough=yes in-interface=local connection-mark=WAN1_conn
    9 chain=prerouting action=mark-routing new-routing-mark=to_WAN2 passthrough=yes in-interface=local connection-mark=WAN2_conn

    /ip route print Flags:
    X – disabled, A – active, D – dynamic, C – connect, S – static, r – rip, b – bgp, o – ospf, m – mme, B – blackhole, U – unreachable, P – prohibit
    # DST-ADDRESS PREF-SRC GATEWAY DISTANCE
    0 A S 0.0.0.0/0 10.0.0.138 1
    1 A S 0.0.0.0/0 5.5.5.1 1
    2 A S 0.0.0.0/0 10.0.0.138 1
    3 S 0.0.0.0/0 5.5.5.1 2
    4 ADC 5.5.5.0/24 5.5.5.200 WAN2 0
    5 ADC 10.0.0.0/24 10.0.0.100 WAN1 0
    6 ADC 10.10.10.195/32 192.168.0.1 0
    7 ADC 10.10.10.196/32 192.168.0.1 0
    8 ADC 10.10.10.198/32 192.168.0.1 0
    9 ADC 10.10.10.199/32 192.168.0.1 0
    10 ADC 192.168.0.0/24 192.168.0.1 local 0

    /ip firewall nat print
    Flags: X – disabled, I – invalid, D – dynamic
    0 X ;;; default internet rule
    chain=srcnat action=masquerade out-interface=WAN1
    1 ;;; Redirect Expired Pool Users to local Web Proxy for redirecting them to N on Payment Page.
    chain=dstnat action=redirect to-ports=8080 protocol=tcp src-address=172.16.1.1-172.16.1.255 dst-port=80
    2 chain=srcnat action=masquerade out-interface=WAN1
    3 chain=srcnat action=masquerade to-addresses=0.0.0.0 out-interface=WAN2

    but the problem is all traffic are going through wan1 instead of both wan interfaces.
    do i have to do some bridge between both wan interfaces ?

    Like

    Comment by Mo'az Dabsheh — April 24, 2014 @ 7:59 PM

  7. hello..

    Like

    Comment by Amit — January 26, 2016 @ 5:20 AM

  8. sir, i want to make one mikrotik as laod balancer and other on as pppoe is it possibale

    Like

    Comment by King Atif — August 15, 2016 @ 2:00 AM


RSS feed for comments on this post. TrackBack URI

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: