Syed Jahanzaib Personal Blog to Share Knowledge !

April 1, 2015

Howto display combined values of two interfaces in single MRTG graph

Filed under: Linux Related, Mikrotik Related — Tags: , — Syed Jahanzaib / Pinochio~:) @ 9:16 AM





If you want to view combined value for two or more interfaces in single mrtg graph, here is the simple way to go…
[thanks to MRTG which supports simple math formulas as well 🙂  ]


On your router you have two wan interfaces (You’re not limited to just two) with the names of WAN1 and WAN2 (in load balancing mode or whatever) and you want to display single graph which should displays combined value for both interfaces so that you can have an idea how much WAN bandwidth is consuming (good to make average historical based graphs) , use following cfg


# combinedwan.cfg
Target[]: #WAN1:publicsnmp@ + #WAN2:publicsnmp@
MaxBytes[]: 12500000
Title[]: Traffic Analysis for BOTH DSL WAN Links WAN1+WAN2 -- MikroTik
PageTop[]: <h1>Traffic Analysis for BOTH DSL WAN Links WAN1+WAN2  -- MikroTik</h1>
<div id="sysdetails">
<td>MikroTik Routerboard with Load Balacning</td>
<td>WAN1 + WAN2 Combined</td>
<td>ethernetCsmacd (6)</td>
<td>Max Speed:</td>
<td>100 Mbits/s</td>
<td>Ip: DYNAMIC</td>
<td>No Ip (No DNS name)</td>



Note: Change the Interfaces names, SNMP string and IP according to your network setup. You can get interface numbers/names from the individual mrtg.cfg / router.cfg entries. cfgmaker can help you in this regard example

cfgmaker snmp@ > router.cfg


Happy Graphing 🙂


Syed Jahanzaib



  1. Awesome!


    Comment by Rehan Igneous — April 1, 2015 @ 10:05 AM

  2. AOA Syed Jahanzaib Bahi kesay hain ap Allah ap ko humesha khush rakhe bahi mujhe 1 cheez poochni thi k mikrotik mein menay pppoe server banaya howa hai or main chahta hoo k jo user expire ho jaye
    agar wo bar bar try kar to us ki request server par na aye asal mein hota yeh hai k jo b user expire ho jata hai us k pass wifi router laga hota hai to wo auto retry karta rehta hai connecting ki to mikrotik mein
    logs b generate hote rehte hain itne hojate hain k bohat ziyada to is k koe hal btayein please k jis user ki id valid ho sirf wohi use kar sake pppoe server…. mujhe intazar rahe ga ap k reply ka please….
    Jalil Abbas


    Comment by Jalil Abbas — April 9, 2015 @ 6:19 AM

  3. Hi,
    i need a little information. its about redirecting a user’s all web traffic (http) to a remote web page (on internet).
    do you have any idea. how to do that?…..
    waiting for your reply.


    Comment by rana adnan — April 9, 2015 @ 10:01 PM

  4. Hello Brother Syed,
    This is Nahid From Bangladesh, Need help from you about Load Balancing problem, I merged to ISP Connection together (WAN1 & WAN2), Where Internet Packet is working together no problem, Also Youtube Packets passing together in both WAN port, But problem is that both ISP have there own FTP server, Online TV, & Movie Server, After merging bandwidth I cant access WAN2 ISPs FTP sites, its show :


    You don’t have permission to access / on this server.

    Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.””

    IF i disable WAN1 for few time then WAN2 FTP sites working fine, I tried “Mark Route” with Dst.Address list ip to pass with Only WAN2. In this process its also not working, If i simple disable WAN1 then again WAN2 FTP sites start work, But i need both ISP s FTP site for my users, Please brother help me how to solve this issue, waiting for your response its urgent,


    Comment by Nahidul Islam — April 10, 2015 @ 3:16 PM

    • @nahid,
      in your mangle section, put at the top this:

      add action=accept chain=prerouting disabled=no dst-address= (Replace this ip with Your ISP Sharing Server IP Address)

      With the command above you will exclude traffic designated for that address from the PCC, it will just pass through the mangle without adding and mark…

      and then put static route for that ip to go through WAN1:

      ip route add dst-address= gateway=x.x.x.x WAN1
      check n let me know


      Comment by Syed Jahanzaib / Pinochio~:) — April 14, 2015 @ 11:57 AM

  5. Hello Brother Syed,
    Please give some example for configuration


    Comment by Nahidul Islam — April 12, 2015 @ 3:49 PM

  6. Thanks Brother, My problem is solved, That FTP Servers ip was include in WAN1 BGP Routes ip address, I found it from Route list, then exclude it from BGP route. Now its working fine, Thanks for your help,


    Your Little Brother


    Comment by Nahidul Islam — May 1, 2015 @ 6:37 PM

  7. Hi, Syed, thanks for sharing your knowledge with us. Could you please do guide for multicast in Mikrotik? That question is very often asked at many forums but with very little usefull answers.


    Comment by Marko — May 12, 2015 @ 1:24 AM

  8. Hi, Syed, I had error “”. I had change the WAN1 & WAN2 according to my interface name. Any suggestion?


    Comment by Iwan Ard — August 23, 2016 @ 4:32 PM

RSS feed for comments on this post. TrackBack URI

Leave a Reply

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

You are commenting using your 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 )

Connecting to %s

%d bloggers like this: