Splitting international and local traffic on a Linksys WRT54G

pl1982

Active Member
Joined
Nov 13, 2006
Messages
46
#41
R19/gb on SAIX vs R2/gb on IS is still a large disincentive to using the SAIX newserver. I don't think anyone is going to use it to the same extent as IS. But you can at least update newsgroups on the fly. With IS you can wait hours while it crawls...



That's another good reason to incorporate SAIX local and gaming accounts into the script. If you used a SAIX local account with the existing script, you would have to remove these three lines

Code:
                          # add SAIX mail and news to intl
                          /sbin/route add -host 196.25.240.94 ppp1
                          /sbin/route add -host 196.43.2.61 ppp1
BTW: Which router model and version are you using?
Thanks again for the update. Buying a SAIX local account for access to the SAIX News server is indeed quite tempting. It's very cool what you have done and I think you should go on with it. Perhaps add that extra facility for the third pppoe (SAIX local, etc). I don't know to much about programming, so I can't really gauge how difficult all of this is, but thanks again for your effort thus far.

Even as it is though, the script and router achieves efficiently that which for many is quite a convoluted mess of setups so as to cater for our sad situation here in SA. I will keep testing it and give any feedback you may require. My model says this: Linksys WRT54G/GL/GS. Not sure if that is helping... My version says: DD-WRT v23 SP2 (09/15/06) vpn - build 3932. Thanks again.
 

pl1982

Active Member
Joined
Nov 13, 2006
Messages
46
#43
You have to look under the router for the model number. I'm just trying to see if anyone using version 5 or 6 are running the script successfully.
Ah yes of course. OK, it seems as if I have version 1.1 of the router. Everything seems to work fine here though, even the white and amber LEDs and DMZ LED. So far I have had no issues with it, as I mentioned before and have been running it for about 3 days now. I will keep you posted though if anything pops up that seems to be a problem.
 

Roman4604

Expert Member
Joined
Jun 27, 2005
Messages
4,524
#44
That's another good reason to incorporate SAIX local and gaming accounts into the script. If you used a SAIX local account with the existing script, you would have to remove these three lines
If want to use multiple local-only accounts efficiently (i.e. route to different SA ISP networks via best local account for speed or cost) you're going to need to know which routes belong to whom. Luckily with a bit of detective work its not too difficult ...

Figure out the ASN (Autonomous System Number) for each SA ISP. Think of the ASN as route grouping index for each ISP. An updated list of ASN allocated in Africa (from Afrinic) can be found here ... http://version6.net/lg/db/as-afrinic.txt ... your only interested in the ones ending in ZA.

Then use a route server to lookup the current live routes belonging to that ASN. IS's one does the job pretty well ... telnet public-route-server.is.co.za

So lets say you want to know all the live routes on the following networks (the number before the $ at the end is the ASN as per the list above) ...

For IS type: sh ip bgp regexp 3741$
For SAIX type: sh ip bgp regexp 5713$
For Verizon type: sh ip bgp regexp 2905$
For iBurst type: sh ip bgp regexp 33762$

and so on.
 

Gatecrasher

Executive Member
Joined
Jan 11, 2005
Messages
6,278
#45
If want to use multiple local-only accounts efficiently (i.e. route to different SA ISP networks via best local account for speed or cost) you're going to need to know which routes belong to whom. Luckily with a bit of detective work its not too difficult ...
That's really interesting, and very useful if someone is looking for the fastest routes.

But isn't it overkill if you just want traffic routed via the cheapest ISP account? Even if SAIX local is faster on some routes than IS local, you wouldn't want to be paying 10 times as much per byte just to save a few milliseconds of latency.

Or have I missed the point?
 

Ekhaatvensters

Executive Member
Joined
Sep 8, 2005
Messages
7,251
#46
I'm planning to get a SAIX local account, simply because I don't need much more than 3-4GB for my local (it only consists of myadsl, a few other sites and some RPG low bandwith gaming) and so it will be cheaper and faster. Whats left will go towards anything I might want from the newsserver, and I don't expect this to be much so a faster newsserver suits me better.

The only point you could miss is that not everyone wants to download gigs all month on the IS server mostly at 10kB/s.

In any case, I see it will be easy to allow a SAIX local account to access the newsserver. Just so you know.. SAIX local accounts can't actually use the SAIX SMTP servers.

"Excluded from the ADSL Local Only service:
1) SMTP Servers - Customers will not be able to relay e-mail via any SAIX SMTP server.
2) Cache Servers - Customers will not be able to use any SAIX Cache (Proxy) servers."
 

Roman4604

Expert Member
Joined
Jun 27, 2005
Messages
4,524
#47
But isn't it overkill if you just want traffic routed via the cheapest ISP account? Even if SAIX local is faster on some routes than IS local, you wouldn't want to be paying 10 times as much per byte just to save a few milliseconds of latency.

Or have I missed the point?
I suppose it is a bit overboard for most, but there is nothing more frustrating than trying access something through a sluggish congested peering link between ISPs.

This way you can choose which way to steer access to any ISP in SA (e.g. is Verizon faster through IS local or SAIX local).
 

mancombseepgood

Executive Member
Joined
Jun 1, 2004
Messages
9,352
#49
I suppose it is a bit overboard for most, but there is nothing more frustrating than trying access something through a sluggish congested peering link between ISPs.

This way you can choose which way to steer access to any ISP in SA (e.g. is Verizon faster through IS local or SAIX local).
On that note, Myadsl sometimes doesn't work on IS local - not often, but occasionally. Either way, I would rather still do Myadsl over the cheaper a/c (of course different strokes for different folks).
 

cschutte

Active Member
Joined
Aug 1, 2007
Messages
42
#50
Great work! I implemented it last night on my WRT54G without a problem, and it has been working without a problem for 12 hours now.

The following comments:
DDNS:
I use DDNS on DynDNS.org. The router now links the ip of the international account (ppp1) to the DynDNS url. Since I use this only for local access, how can one ensure that the ip of ppp0 is rather used?

DNS:
I struggled to set up DNS properly. It seems the DNS servers are not correctly setup, and some DNS lookups consequently fail.
(I use DNSMasq on my router.)
As a work-around, I now filled in the DNS fields on the Web Interface with IP addresses that work, but not sure how reliable this will be in the long run.

SNMP Bandwidth Monitoring:
I use CACTI to monitor the bandwidth (www.cacti.net). The new ppp1 connection showed up correctly on the SNMP Walk, and is graphing the bandwidth successfully.

Localroutes4.txt Hosting
It makes sense to have this file hosted somewhere, since updates will occur from time to time. How is this file updated?

Very impressed!
 

Gatecrasher

Executive Member
Joined
Jan 11, 2005
Messages
6,278
#51
The following comments:
DDNS:
I use DDNS on DynDNS.org. The router now links the ip of the international account (ppp1) to the DynDNS url. Since I use this only for local access, how can one ensure that the ip of ppp0 is rather used?
DD-WRT has been written so the the services default the last dialled pppoe connection. I don't think it was ever intended in the firmware design for there to be more than one pppoe connection. Which is not really suited to our needs. Ideally you would want to be able to configure the services to use either or both connections. The rough and ready solution at the mo is to assuime that most services will be using the international connection, which is why I set up to run the international daemon after the local one. If you change the order of the pppd commands, the DD-WRT services will apply to the local account instead.

The best solution would be to get the dd-wrt source code, and change the default configuration settings according to your needs, and recompile a new version of the firmware But this is not a task I'm too keen on undertaking. :eek:

DNS:
I struggled to set up DNS properly. It seems the DNS servers are not correctly setup, and some DNS lookups consequently fail.
(I use DNSMasq on my router.)
As a work-around, I now filled in the DNS fields on the Web Interface with IP addresses that work, but not sure how reliable this will be in the long run.
I use WebAfrica's static DNS. I don't use DSNmasq. I've found the WA DNS servers to be very reliable.

SNMP Bandwidth Monitoring:
I use CACTI to monitor the bandwidth (www.cacti.net). The new ppp1 connection showed up correctly on the SNMP Walk, and is graphing the bandwidth successfully.
Interesting. Does it also show the ppp0 bandwdith?

Localroutes4.txt Hosting
It makes sense to have this file hosted somewhere, since updates will occur from time to time. How is this file updated?
If you check out the thread mentioned in my first post, ArminM provided the link for the localroutes4.txt file. It is updated every 24 hours.

Very impressed!
Thanks!
 

cschutte

Active Member
Joined
Aug 1, 2007
Messages
42
#52
Thanks for the response!

Re Cacti graphs: Yes - it plots both ppp0 and ppp1.
For example, see here
(the graphs are not very nice at the moment, because I have been debugging the server - should smooth if all is working as it should!)

Thanks again for the excellent script!
 
Last edited:

PDonut

Senior Member
Joined
Apr 23, 2005
Messages
545
#54
well DD is the simpler one i think..
Anyway dumb question (im an iburster)... does this work with two accounts that are from different service providers? Besides the fact that it probably makes alot more sense to just get both from one sp.
 

Gatecrasher

Executive Member
Joined
Jan 11, 2005
Messages
6,278
#55
Has anyone tested on OpenWRT? i just prefer that to DD, I thought most people did!
Should work. As far as I know, the file structure is similar. The only pre-requisite is that OpenWRT use rp-pppoe as the pppoe dialler, and not pppoecd. It can be installed in OpenWRT if required.
 

Gatecrasher

Executive Member
Joined
Jan 11, 2005
Messages
6,278
#56
well DD is the simpler one i think..
Anyway dumb question (im an iburster)... does this work with two accounts that are from different service providers? Besides the fact that it probably makes alot more sense to just get both from one sp.
It can be from the same isp or different isps. The connections are independent.
 

Rocket-Boy

Executive Member
Joined
Jul 31, 2007
Messages
7,467
#57
Gatecrasher - Thanks for the reply.
Im going to sound like a complete n00b here but are you using the WRT as the actual ADSL modem? or just for routing when connected to a DSL modem running through the "internet" port on the back?
I have only really used mine for wireles stuff so im going to have to get it out of its box on the roof and play around a bit :/
 

mancombseepgood

Executive Member
Joined
Jun 1, 2004
Messages
9,352
#58
Gatecrasher - Thanks for the reply.
Im going to sound like a complete n00b here but are you using the WRT as the actual ADSL modem? or just for routing when connected to a DSL modem running through the "internet" port on the back?
I have only really used mine for wireles stuff so im going to have to get it out of its box on the roof and play around a bit :/
I am using it as the router only - my ADSL modem is another seperate unit... working like a bomb.
 
Top