• You are not registered on MyBroadband, which means you miss out on great benefits. To join our community is very easy, and completely free. Register now.
  • New Two-Day Giveaway - Enter Here

Splitting International and Local Bandwidth with IPcop

Bernie

Expert Member
Joined
May 2, 2006
Messages
1,905
#41
Did not have time to look into the matter further over the weekend, however I just took another PC I had lying around with 2 other NICs and got IPCop 1.4.11 running it and I still get no ruote to international sites.

If 1 connection disconnects I get ping reply from int source (ie only ppp0 or ppp1 is active) as soon as both connections are made nothing.

Strange thing if I go (remember ppp0 is INT and ppp1 is LOCAL)

route add -net {SOME INTERNATIONAL IP} netmask 255.255.255.0 ppp1


I get a reply from the international address (Only damn slowly though)

If I take a working local route and go

route add -net {SOME LOCAL IP} netmask 255.255.255.0 ppp0

it stops working until I route it back to ppp1.

I need to know
1)What version of IPCop are you running on your working box
2)Any Idea why when ppp1 would connect it breaks ppp0 completely
Hey pigdog

I am using 1.4.13, but I'm pretty sure 1.4.11 will be fine.

Did you try the nslookup command.

Maybe when ppp1 connects the default route for ppp0 is not being set. Try setting it all up manually:

- Get your ppp0 connected.
- Ping everywhere (from IPcop) to make sure its working 100%
- In the console screen manually make the second PPPoE connection. Just cut the pppd command out and only run that. Just a point to note, I dont think it makes a difference, but in my case, I haven't created any profiles with my second connection settings. I only have 1 profile setup.
- enter "ifconfig" make sure you see both ppp0 and ppp1 with IP addresses
- manually enter a 1 single local route for ppp1, for example this one:
route add -net 196.30.0.0 netmask 255.254.0.0 ppp1
This route includes www.iol.co.za.
- Enter the route command, make sure its there. You will find now that you probably cant connect anywhere.
- Now add the default route for ppp0 manually
route add default dev ppp0 metric 0
- now adjust your iptables manually
iptables -t nat -A POSTROUTING -o ppp+ -j MASQUERADE
- You should now be able to connect using ppp0 and ppp1.
- go to www.iol.co.za in a browser and check the connection settings in IPcop, you should be connecting to 196.30.168.79 via the IP address of ppp1

Hope this helps.

B.
 
Last edited:

ASS_SAZiN`

Senior Member
Joined
Jul 14, 2005
Messages
517
#43
All my issues have been sorted out I still have one or two abnormalities, same as sleeper.

My problem was fixed by removing some addons, traffic report I think it was named, after i did that everything worked great again.

The afrinic list is nice, you can also get the latest local ip's via a IS server can't remember the address but one of the previous scripts I used, made use of nc(netcat) to automatically fetch the address before setting up routing.

I'm going to do some more research a bit later, but it seams that QoS isn't working 100% when I have both connections up, only local traffic is prioritized, I use QoS in ipcop to give port 80 and 21 and 110 priority so that I can seed torrents and other p2p apps 24/7 and all the other people using the net @ my place will still be able to do mail and browsing at normal speeds.
 

ArminM

Well-Known Member
Joined
Apr 12, 2005
Messages
149
#44
My problem was fixed by removing some addons, traffic report I think it was named, after i did that everything worked great again.
aaahhh, thanks for that - been pulling my hair out!

I'm going to do some more research a bit later, but it seams that QoS isn't working 100% when I have both connections up, only local traffic is prioritized, I use QoS in ipcop to give port 80 and 21 and 110 priority so that I can seed torrents and other p2p apps 24/7 and all the other people using the net @ my place will still be able to do mail and browsing at normal speeds.
This will take some doing - I've been looking into - but no promises yet! ;)
 

ASS_SAZiN`

Senior Member
Joined
Jul 14, 2005
Messages
517
#45
@ArminM was your problem fixed by removing the addon, If so glad I could help, it seams that it messes with the routes or something will have to take a look at that.

Going to setup a second box with ClarkConnect sometime to try and get good QoS and to implement the "splitting up" script with NC, will post the script if I get it working.
 

ArminM

Well-Known Member
Joined
Apr 12, 2005
Messages
149
#46
ooops

@ ASS_SAZiN` - Yes, it sorted my issue. Thanks again.

As for this earlier post of mine:
Not sure if anyone on this thread is interested, but you can get all the "local" subnets here

and it gets updated every 24hrs

Ready made route add commands
It is WRONG!! I did not take into account the subnetting / supernetting and have subsequently updated the script (correctly this time I hope)

so the route add commands are here now.

Apologies for the mistake. :eek:
 

Gnome

Executive Member
Joined
Sep 19, 2005
Messages
5,572
#47
Haven't been following this topic fully but it seems to me you use static list as your local subnets. In the event of a change you'd need to update this list not? Isn't there a way you can telnet (see this thread the last post made by daffy) a server using the script and get a up to date subnet list from the server? I suppose the question should be is it possible to telnet using IPCOP VS. can you do it via a script if it where available. It's a simple task even in DOS (simple telnet ----commandes--- >> localsubnetlist.txt where all the subnets would then be saved in the localsubnetlist.txt file, surely it's not hard for the "all powerfull" linux shell?)

Hope you following what I'm saying otherwise feel free to ask me to clarify.
 

Paul_S

Expert Member
Joined
Jun 4, 2006
Messages
4,440
#48
Yes it can be done easily.
I have a script that I run to grab an updated IGP list.


#!/bin/bash

echo -e "terminal length 0\nshow ip bgp\nexit" | nc route-server.is.co.za 23 | grep ^* | awk '{print $2}' > zanet-routes.dat


That logs into the IS route server, grabs a new BGP list, sticks it into a file and then disconnects. nc is a better tool to use than telnet in this case.

The same can be done with most apps in bash. I've done it lots of times to grab files off FTP servers automatically in the background from a cronjob.
All you do is just keep adding new commands separated by a new line \n which is the same as hitting the enter key after each command if you were doing it manually.
 

Gnome

Executive Member
Joined
Sep 19, 2005
Messages
5,572
#49
Could you perhaps provide a working example (for IPCOP?)?

No offense to linux users but I don't have much love for the OS (apart from using it as a server or router, I don't really feel this is the thread in which to elaborate why) and don't have much knowledge working with bash(apart from copy delete, ls and all that basic stuff) and don't really feel like wasting my time reading the man pages to figure out how to get it to work.

EDIT: Or would your above example work for IPCOP?
 

Paul_S

Expert Member
Joined
Jun 4, 2006
Messages
4,440
#50
EDIT: Or would your above example work for IPCOP?
The above should work with IPCop if it has nc installed which is quite probable.
Type nc at the command prompt and see if netcat is installed.
awk and grep should definitely be installed by default.

Someone should package all of these scripts together and release it in one package but I'm not going to volunteer for that job. :)
 

Gnome

Executive Member
Joined
Sep 19, 2005
Messages
5,572
#51
Good idea now to find a sucker... uh *cough* *cough* I mean volunteer to do it :D

EDIT: Seriously it would be appreciated, don't be shy I was just joking :)
 

Bernie

Expert Member
Joined
May 2, 2006
Messages
1,905
#52
@ ASS_SAZiN` - Yes, it sorted my issue. Thanks again.

As for this earlier post of mine:


It is WRONG!! I did not take into account the subnetting / supernetting and have subsequently updated the script (correctly this time I hope)

so the route add commands are here now.

Apologies for the mistake. :eek:
Hi ArminM

Thanks for the list. Are these updated every 24h
 

Bernie

Expert Member
Joined
May 2, 2006
Messages
1,905
#53
Could you perhaps provide a working example (for IPCOP?)?

No offense to linux users but I don't have much love for the OS (apart from using it as a server or router, I don't really feel this is the thread in which to elaborate why) and don't have much knowledge working with bash(apart from copy delete, ls and all that basic stuff) and don't really feel like wasting my time reading the man pages to figure out how to get it to work.

EDIT: Or would your above example work for IPCOP?
Hi Gnome

nc is not installed by IPcop. Being a firewall IPcop installs the minimum amount of packages needed. It doesnt even have man installed, so no man pages.

But it does have wget installed so you could put wget in a script and pull the file down.

Here is the command I tried:

HTML:
@ipcop:~ # wget http://www.alm.za.net/ip/localroutes.txt]
--10:59:05--  http://www.alm.za.net/ip/localroutes.txt]
           => `localroutes.txt'
Resolving www.alm.za.net... 67.43.14.74
Connecting to www.alm.za.net[67.43.14.74]:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 46,335 [text/plain]

100%[====================================>] 46,335        31.94K/s

10:59:07 (31.89 KB/s) - `localroutes.txt' saved [46335/46335]

HTH
 

Bernie

Expert Member
Joined
May 2, 2006
Messages
1,905
#54
Good idea now to find a sucker... uh *cough* *cough* I mean volunteer to do it :D

EDIT: Seriously it would be appreciated, don't be shy I was just joking :)
I'll try put it all into a single script this week. If it works, I'll let yall know. shouldnt be too difficult (famous last words) :)
 

ColinR

Expert Member
Joined
Aug 24, 2006
Messages
3,751
#55
If this will work on ClarkConnect - it will be unstoppable.
I'm running it on a PII 333Mhz with 192MB of RAM, it's doing everything now, and flying. (SMTP Mail, File Shares, Printer Shares, Firewall)

Can't wait for that packaged script to give it a go. Ideally wanting to get my local only account going again. :D
 

ArminM

Well-Known Member
Joined
Apr 12, 2005
Messages
149
#57
Good idea now to find a sucker... uh *cough* *cough* I mean volunteer to do it :D

EDIT: Seriously it would be appreciated, don't be shy I was just joking :)
Compiled the required tools, and busy looking into it.

I'm also not sure if this'll work if you have a blue / orange in your setup
 

ArminM

Well-Known Member
Joined
Apr 12, 2005
Messages
149
#58
Just an update on the localroutes.txt - there seem to be additional small glitches....... checking into it.
 

ArminM

Well-Known Member
Joined
Apr 12, 2005
Messages
149
#59
Yes it can be done easily.
I have a script that I run to grab an updated IGP list.


#!/bin/bash

echo -e "terminal length 0\nshow ip bgp\nexit" | nc route-server.is.co.za 23 | grep ^* | awk '{print $2}' > zanet-routes.dat


That logs into the IS route server, grabs a new BGP list, sticks it into a file and then disconnects. nc is a better tool to use than telnet in this case.

The same can be done with most apps in bash. I've done it lots of times to grab files off FTP servers automatically in the background from a cronjob.
All you do is just keep adding new commands separated by a new line \n which is the same as hitting the enter key after each command if you were doing it manually.
Being an IS Server.... would there be any IS vs SAIX vs Verison funnies to look into?

EDIT: nevermind.....typing without thinking
 
Last edited:

ArminM

Well-Known Member
Joined
Apr 12, 2005
Messages
149
#60
last round - hopefully

ok, this should do it then:

localroutes4 / 24h updates

I had to increase my sleep time prior to running the route commands in the script and had to put an additional sleep somewhere in between the route commands.

hth, let me know.

EDIT: Thanks to Bernie, Paul_S, Gnome and daffy, as this was done using their advice and assistance
 
Last edited:
Top