Join us now. It is free, and it takes less than 1 minute to register.
Register now
Subscribe to our daily newsletter. It is free, and it comes with many benefits.

+ Reply to Thread
Page 4 of 10 FirstFirst 12345678 ... LastLast
Results 46 to 60 of 137

Thread: Telkom Mega100WR2 - International and Local Traffic Splitting

  1. #46


    Maybe the guy from 2C could give some advice here. I don't have two accounts to test myself once I do then I might be able assist in more detail as in debugging specific issues.

  2. #47


    Thanks. Yeah he's been quiet for a while
    As for a second account, if you do want to get one go for the WebAfrica local top up. R20 will get you a gig that doesn't expire-perfect for testing

  3. #48


    Destination     Gateway         Genmask         Flags Metric Ref    Use Iface         UG    0      0        0 ppp0
    I guess I need to setup that account with Default Gateway unticked.

  4. #49


    yeah. You want the default route to be ur international one because u explicitly setting routes for the local account i.e. the non default routes.

    if you have two default routes OS normally pushes out on the one with better metric but if they both have the same metric it may be pushing the same data out on both and getting very confused!

  5. #50


    Good news: I've been able to split traffic between local and international at the router level.

    Bad news for most: I only have an instruction set for linux users. By that I mean the theory has already been covered as to how it should work. But I went about the practicality of setting up the router from a Linux box. I need to tidy up how I did it but when I do (and post it here), you will see why it is specific to Linux users.

  6. #51


    Kewl. Let us know what u've done. Keen to see how u got it working.

  7. #52


    I suppose I might as well post my findings from the easier part. I followed 2CTelecoms instructions on the previous page:

    1. I deleted the existing quickstart profile on the router.
    2. Applied, Saved the settings and rebooted the router.
    3. When it starts up again (after logging in), it will start you through the 'quickstart wizard'.
    4. I clicked on the Advanced tab (ie I did not follow the wizard).
    5. WAN --> New Connection.
    6. Importantly, I setup the connection as quickstart. I found through experience that the router seems to need a quickstart profile.
    7. quickstart is the international connection (ppp0). Set Sharing to Enable and VPI and VCI as 8 and 35 respectively. Enter login details. Everything else you can leave.
    8. Apply, Save Settings.
    9. WAN --> New Connection
    10. Give the connection a name. Since it is the local one I called mine local. This is ppp1.
    11. Enable Sharing. Set PVC to 8:35. Untick Default Gateway. Also enter login details of your local account.
    12. Apply. Save Settings. Connect. Apply. Save Settings. Reboot Router. (This is overdo I suspect but hey).
    13. Your router is now ready to take instructions as to how to split traffic.

    If you do not have the routers with problems,
    you should be able to do from a command line (linux or windows)

    1. telnet
    2. Enter username --> root
    3. Enter password --> <Router Password>
    4. Enter shell
    5. Enter ifconfig

    ifconfig should show ppp0 and ppp1 with IP addresses beginning with 41 and 196 respectively.

    Here is the script that prepares everything (I've called it

    cd ~
    curl | while read line
      [ "$( echo $line | grep \/32 )" ] && line=$( echo $line | sed s/net/host/ )
      echo $line | sed s/\$LOCAL/ppp1/
    done > ~/newroutes.txt
    cat ~/newroutes.txt | while read route
      export $(ipcalc -m $(echo $route | sed -e 's/^.*net\ \([0-9\.\/]*\).*$/\1/'))
      echo $route | sed -e "s/\/[0-9]*/ netmask $NETMASK/"
    done > ~/netroutes.txt
    rm -f localroutes4.txt
    rm -f newroutes.txt
    cat netroutes.txt | grep route > clean.txt
    cat clean.txt | while read line
       echo 'send "'$line'\r"'
       echo 'expectprompt "#"'
    done > routes.txt
    rm -f
    cat routerlogin.txt routes.txt dns.txt >
    chmod +x
    rm -f netroutes.txt
    rm -f routes.txt
    rm -f clean.txt
    I've only run it on my Debian install and there is a small problem which entails manually deleting environment variables in before running it.

    [root:~#] cat routerlogin.txt
    /usr/bin/expect << EOF
    proc expectprompt { txt } {
    expect {
    \$txt {}
    timeout exit;
    eof exit;
    set timeout 60
    spawn telnet
    expectprompt "login:"
    send "root\r"
    expectprompt "Password:"
    send "insert_your_router_password_here\r"
    expectprompt "cli>"
    send "shell\r"
    expectprompt "#"
    [root:~#] cat dns.txt
    send "route add -host ppp0\r"
    expectprompt "#"
    send "route add -host ppp0\r"
    expectprompt "#"
    send "exit\r"
    expectprompt "cli>"
    send "quit\r"
    So I have dns.txt and routerlogin.txt in my home directory. you also need to ensure that that the expect package is installed. You need to make sure the script is set to be executable by doing a chmod u+x prepare_netroutes.

    Then what you do is run the prepare_netroutes script. This will create a file called Then run to setup the routes on the router.

    You will also need the following 2 files in any directory in your path.



    Use this particular ipcalc especially as for instance the one I got for my Debian off the repos didn't work with this script. The ipcalc that works is the one from FC7.

    DISCLAIMER: As always, if something goes wrong with your config. it is not my problem. You do this at your own risk.
    Last edited by milomak; 21-08-2007 at 09:07 PM.

  8. #53


    ok, that all seems straightforward. now we need the issue u had and why u had to use another linux server to fix it.

  9. #54


    this solution should be an awsome breakthrough!!
    would this mean that the 100wr could effectively do the same as routesentry?

    if so would there be any differences or advantages of using either routsentry or the 100wr to split local/int trafic?

    just guessing here, but if it works, will the 100wr will loose all routing settings on reboot?

  10. #55


    z3r3 - my main OS is always a linux install (whether it be debian, FC or some other variant). That is why my solution is linux based.

    Here is the script that prepares everything (I've called it

    EDIT: Instructions moved to post above (Post #52)
    Last edited by milomak; 21-08-2007 at 11:16 AM.

  11. #56


    scud - unfortunately the router seems to lose all that even if I Save Settings after running the

    That is probably something that must be fixed by firmware. That is, for the routing table not to be erased on reboot.

  12. #57


    ok thats kewl. I thought u meant u set up the routing to the various interfaces on linux not that u scripted it thru to the router thru linux.

    Based on what u've done its straight forward to make a script for XP. I'll prolly take what u've done and combine in with the spreadsheet macro from that other dude on the forums.

    My next step is to get the gpl code from 2C and then compile the script into the image for the device so it isn't lost at bootup. What I might do is see if I can script programming static routes into the device via the interface but I'll have to see about that one.
    Last edited by z3r3; 24-06-2007 at 08:35 PM.

  13. #58


    z3r3 if you manage to get hold of 2C an get the code please get in touch with me on PM, I'd like to see if I can help with adding those routes on the interface. Also, since I have one of the old (read-fubar) routers that need the second interface set up manually if I figure the local ip issue sorted out I'll post step by step procedures for setting that up as well.

  14. #59


    After checking out the cli quite thoroughly (I found a cpl manuals and syntax guides), I can see two problems as far as I can figure:
    1) I can only add 30 static routes
    2) It has to be an IP as gateway not named connection.

    So I guess there's no way to use that cli to setup and save into flash all the routes I need . That pretty much leaves needing to get the GPL code.

  15. #60


    Yeah when I was going through the web interface (routing table), I noticed that there seemed to be fewer than the 917 routes in the localroutes4.txt file.

    EDIT: Running route -n from the router shows a whole lot more routes. And actually if I save the scripts file from the option to show the routing table (option seems to only come up if you access that page running Konqueror), the resultant file has all the routes so it loads them all no problem.
    Last edited by milomak; 01-07-2007 at 11:00 PM.

+ Reply to Thread
Page 4 of 10 FirstFirst 12345678 ... LastLast



Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts