• You are losing out on amazing benefits because you are not a member. Join for free. Register now.
  • Samsung Pay Giveaway - Win a Samsung Connect & Control Speaker and other prizes. Enter Here.
  • Audi e-tron Giveaway - Win prizes worth R3,000 Enter Here.

Telkom Mega100WR2 - International and Local Traffic Splitting

z3r3

Active Member
Joined
Jun 14, 2007
Messages
34
#21
1) Put ts.exe and its manifest file in a folder
2) make a batch file to execute your login script e.g. "test.cmd"
3) Edit test.cmd and put in commands to execute ur script. This will execute test_in.txt and put output to test_out.txt. You don't need the output file. So you can leave "/o:..." out but it is nice in case sumthing goes wrong.
Code:
ts.exe /r:test_in.txt /o:test_out.txt
4) Make file test_in.txt
5) Edit test_in.txt and put in commands to login obviously put n ur ip and your password. When putting in password replace "REPLACE_WITH_YOUR_PASSWORD" with your password but leave the "\n" in place as that is the same as hitting the enter key (its short for the newline character):
Code:
HOST 10.0.0.2 23
WAIT "login"
SEND "root\n"
WAIT "password"
SEND "REPLACE_WITH_YOUR_PASSWORD\n"
WAIT "#"
SEND "ls\n"
WAIT "#"
For above u need to shell out before running ls but i forgot what command will shell out to the prompt. (Have to wait to home to chack on that). Basically when u say "WAIT" it waits till it sees what ever you said to wait for output to screen and then attempts the next command. "SEND" sends a command and "\n" send thru the "enter key".
 
Last edited:

milomak

Honorary Master
Joined
May 23, 2007
Messages
12,101
#22
Ah, that has cleared up something else with regard to the script I ran the other day (the one to identify which class II router you have). Because you need to run shell after logging into the router, I didn't know how to change the script to do that. A WAIT "cli>" will probably fix that.

So basically the test_in.txt would have

SEND "route -add net xxxx"
WAIT "#"

repeated a number of times. Will have to find a way of automating the addition of SEND and WAIT "#" though.
 

z3r3

Active Member
Joined
Jun 14, 2007
Messages
34
#23
yeah except it be SEND "route -add net xxxx\n" in order to simulate hitting the enter key.

You can text editor like UltraEdit to modify script quickly. Its got a column mode to so insert 'SEND "' at begninning of each line is easy. And the it has ability to look for end of line using ^P so a search command is easy.

There are 9 of the /32 lines where -net must be -host so that can be done by hand. Replace $LOCAL with ppp1 if ppp1 is ur ZA connection.

Finally last line is to fix name server lookups.

I'll attach a script for a basic idea but i can't rememeber command to drop to shell so I'll put question marks there.
 

z3r3

Active Member
Joined
Jun 14, 2007
Messages
34
#24
ok so I can't add files so here's a quick sample of the file without all the routes obviously:

Code:
HOST 10.0.0.2 23
WAIT "login"
SEND "root\n"
WAIT "password"
SEND "REPLACE_WITH_YOUR_PASSWORD\n"
WAIT "cli>" 
SEND "????????\n"
WAIT "#"
SEND "route add -net 32.106.152.0/24 ppp1\n"
WAIT "#"
SEND "route add -net 32.106.153.0/24 ppp1\n"
WAIT "#"
SEND "route add -net 66.8.0.0/17 ppp1\n"
WAIT "#"
SEND "route add -net 66.18.64.0/19 ppp1\n"
WAIT "#"
SEND "route add -host 155.237.171.98/32 ppp1\n"
WAIT "#"
SEND "route add -net 155.237.225.0/24 ppp1\n"
WAIT "#"
SEND "route add -net 216.5.192.0/21 ppp1\n"
WAIT "#"
SEND "route add -net 216.104.192.0/21 ppp1\n"
WAIT "#"
SEND "route add -net 216.236.176.0/20 ppp1\n"
WAIT "#"
SEND "cat /etc/resolv.conf | sed s/nameserver// | sed s/' '// | while read nameserver;do route add -host $nameserver ppp0; done"
WAIT "#"
 

2C Telecoms

2C Telecoms Representative
Company Rep
Joined
Dec 7, 2006
Messages
52
#26
Hi All,

Just caught up with this thread ... z3r3 seems to have it all pretty much under control. The only thing that I can add is the recommended directory for doing the upload to is /var/tmp according to the engineer that did the original f/w .. He recons that there is more than enough space, and this is area is well out of the way of any critical parameters.

Also, the router does have “wget”, so if you have hosted the files on a http/ftp server already, it will be a simple matter to download them.

Just by the way, I do notice that the local IP list that has been referred to is missing a few entries ie: it’s not complete. but its a pretty good list none-the-less, and to achieve the required purpose, missing one or two entries is not going to hurt much…

also, one last comment ... just for the record : my comments on this thread are not official --- off the record sort of comments... ie : just remember that any problems caused by mistakes while doing this sort of thing is not covered by guarantee etc .... (this is just to make the bosses happy - as long as everyone understands this, I will provide what info I can .. )
regards
2c Telecoms
 

francoistk

Well-Known Member
Joined
Apr 5, 2004
Messages
164
#28
Hey Everyone
Me and a colleague from work have been following the progress. I have a Netgear DG384 ADSL Router, and I basically would like to do the same. I got it to connect the second PPPoE account last night, but it still would not route the data coming from my PC over the second account. I believe there might be some configuration needed for the IP tables "firewall" as well. Will check it out this evening.
 

z3r3

Active Member
Joined
Jun 14, 2007
Messages
34
#29
You might want to use iptables to list current settings and route to list currently defined routes to see why traffic isnt routing as expected. ALso if it won't work u could always use antibody's tool to do it from ur pc directly.
 

milomak

Honorary Master
Joined
May 23, 2007
Messages
12,101
#30
franco, do a search for webafrica with the user fausto in this forum. I think there were people who might have got this type of thing to work with a netgear modem/router.
 

milomak

Honorary Master
Joined
May 23, 2007
Messages
12,101
#31
What's up with these ping results (run from the router). Below is info from the router. I am able to browse both local and international sites. But when I run a wget from the router the host is unkown even though when I ping it I get results.

Code:
# ping www.google.com
PING www.l.google.com (64.233.189.104): 56 data bytes
64 bytes from 64.233.189.104: icmp_seq=0 ttl=246 time=320.0 ms
64 bytes from 64.233.189.104: icmp_seq=0 ttl=246 time=1330.0 ms (DUP!)
64 bytes from 64.233.189.104: icmp_seq=1 ttl=246 time=1010.0 ms
64 bytes from 64.233.189.104: icmp_seq=1 ttl=246 time=2020.0 ms (DUP!)
64 bytes from 64.233.189.104: icmp_seq=2 ttl=246 time=2020.0 ms
64 bytes from 64.233.189.104: icmp_seq=2 ttl=246 time=3030.0 ms (DUP!)
64 bytes from 64.233.189.104: icmp_seq=3 ttl=246 time=3030.0 ms
64 bytes from 64.233.189.104: icmp_seq=3 ttl=246 time=4040.0 ms (DUP!)

--- www.l.google.com ping statistics ---
8 packets transmitted, 4 packets received, 4 duplicates, 50% packet loss
round-trip min/avg/max = 320.0/2100.0/4040.0 ms
# route -n
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
196.209.xxx.xxx    0.0.0.0         255.255.255.255 UH    0      0        0 ppp0
196.43.xxx.xxx   0.0.0.0         255.255.255.255 UH    0      0        0 ppp1
196.43.xxx.xxx   0.0.0.0         255.255.255.255 UH    0      0        0 ppp1
41.241.xxx.xxx    0.0.0.0         255.255.255.255 UH    0      0        0 ppp1
10.0.0.0        0.0.0.0         255.255.255.0   U     0      0        0 br0
239.0.0.0       0.0.0.0         255.0.0.0       U     1      0        0 br0
0.0.0.0         41.241.xxx.xxx    0.0.0.0         UG    0      0        0 ppp1
0.0.0.0         196.209.xxx.xxx    0.0.0.0         UG    0      0        0 ppp0
# ifconfig ppp0
ppp0      Link encap:Point-Point Protocol
          inet addr:196.209.xxx.xxx  P-t-P:196.209.xxx.xxx  Mask:255.255.255.255
          UP POINTOPOINT RUNNING NOARP MULTICAST  MTU:1492  Metric:1  ASYMMTU:1500
          RX packets:588 errors:0 dropped:0 overruns:0 frame:0
          TX packets:484 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:100
          RX bytes:239220 (233.6 kb)  TX bytes:43332 (42.3 kb)

# ifconfig ppp1
ppp1      Link encap:Point-Point Protocol
          inet addr:41.244.xxx.xxx  P-t-P:41.241.xxx.xxx  Mask:255.255.255.255
          UP POINTOPOINT RUNNING NOARP MULTICAST  MTU:1492  Metric:1  ASYMMTU:1500
          RX packets:1264 errors:0 dropped:0 overruns:0 frame:0
          TX packets:1102 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:100
          RX bytes:631218 (616.4 kb)  TX bytes:186546 (182.1 kb)
 

milomak

Honorary Master
Joined
May 23, 2007
Messages
12,101
#32
I'm having a problem running the route add -net command

Code:
# route add -net 41.192.64.0/19 ppp0
route: can't resolve 41.192.64.0/19
It does this for the first 5 (I then exit after those few), so I assume it might do the same for all of them. I'll run it overnight to see if any take.
 

francoistk

Well-Known Member
Joined
Apr 5, 2004
Messages
164
#33
try route add -net 41.192.64.0 netmask 255.255.224.0 ppp0
If you want to know how i got to the 255.255.224.0 i'll explain tomorrow. :)
 

francoistk

Well-Known Member
Joined
Apr 5, 2004
Messages
164
#35
The /19 means the subnet mask for the IP Address. An IPv4 address (which is currently what the internet runs on) exists of 32bits. Which are divided into smaller groups of 8-bits each or 1 byte. The /19 means the number of 1's that is present in the 32 bit value. So /19 => 11111111.11111111.11100000.00000000.
Then you can use the scientific calculator in windows to convert from binary to decimal and you get 255.255.224.0.
Here is a short list of conversions that might be handy if you don't want to calculate the other ones.
Code:
/16 => 255.255.0.0
/17 => 255.255.128.0
/18 => 255.255.192.0
/19 => 255.255.224.0
/20 => 255.255.240.0
/21 => 255.255.248.0
/22 => 255.255.252.0
/23 => 255.255.254.0
/24 => 255.255.255.0
/25 => 255.255.255.128
/26 => 255.255.255.192
/27 => 255.255.255.224
/28 => 255.255.255.240
/29 => 255.255.255.248
/30 => 255.255.255.252
/31 => 255.255.255.254
/32 => 255.255.255.255
Hope this helps.
 

Flint

Well-Known Member
Joined
Jun 2, 2005
Messages
266
#36
So has anyone got this working yet? And I'm not too clued up on this sort of thing (thankfully I'm the colleague francoistk spoke of so he can help me get up to speed :) ), but it seems to me that this would have to be run on the router every time it's started up from one of the machines on the network-is there any way around that?
 

milomak

Honorary Master
Joined
May 23, 2007
Messages
12,101
#37
The strange thing is that when the modem is in bridge mode and I setup a 2 pppoe connections on my computer (ppp0 and ppp1 on a Linux box), I can run the route command (on the box and not the router) without adding the netmask part.

I won't get a chance to look into this until the weekend.
 

francoistk

Well-Known Member
Joined
Apr 5, 2004
Messages
164
#38
Probably just a slight difference in the versions of Linux that runs on the router and the Box. I know the router ones is a very scaled down one. Possible that they just don't support that specific notation.
 

Flint

Well-Known Member
Joined
Jun 2, 2005
Messages
266
#39
Well I'm afraid my first foray into this wasn't too successful. It turns out I have one of the earlier models of the mega 100, with the firmware bug (any news on that update 2C?). I do have the latest version on the telkomphones website (66.70.2).
As a result I couldn't add a second ppoe as described above. I decided to try my hand at telnetting in and doing it manually, but it seems the telnet (and ssh) password is different to that used to log into the router 's control pages. I tried that user/pass, as well as the defaults mentioned elsewhere on this forum (admin/admin, admin/password) and those don't work either. Could someone possibly enlighten me as to what these passwords are?
 
Top