HOME MADE - Linux Multiple Wan Routers

Could someone give me a little help.

I flashed the Kamikaze firmware as stated in the thread.
Logged on to telnet, changed the password.
Logged on with putty and put in the line to run adamg's script. Which it ran fine and rebooted.

All well I thought.

Now, the internet doesn't work on the PC, and when I do ipkg update it says it cannot find the server. Even adamg's script won't run again.

The is my network file

Code:
You don't have permission to view the code content. Log in or register now.

ip route
Code:
You don't have permission to view the code content. Log in or register now.

route -n
Code:
You don't have permission to view the code content. Log in or register now.
 
pootas: login to router and type the following

*cat /proc/net/ip_conntrack | grep ESTABLISHED*

this will list all active connections

look for dst=x.x.x.x, the dst is the ip that, that specific connection is using, should hopefully see both your ips a various amount of connections



Aldormanndiobla your 2nd modem didnt connect, make sure its configured then plug it in and leave the router off for a minute before switching it on, so the modem has time to register, make sure its in the correct port too :) thats what your problem is anyway
 
pootas: login to router and type the following

*cat /proc/net/ip_conntrack | grep ESTABLISHED*

this will list all active connections

look for dst=x.x.x.x, the dst is the ip that, that specific connection is using, should hopefully see both your ips a various amount of connections



Aldormanndiobla your 2nd modem didnt connect, make sure its configured then plug it in and leave the router off for a minute before switching it on, so the modem has time to register, make sure its in the correct port too :) thats what your problem is anyway

*cat /proc/net/ip_conntrack | grep ESTABLISHED*

I've run that and it shows all the connections coming from 1 IP addy only :(

The IP addy it is using is on eth0.1 and if I run *ip route* eth0.2 is definitely assigned a different IP addy....

Code:
You don't have permission to view the code content. Log in or register now.

And the ip is in the nexthop part is the same on both lines but is not an ip addy assigned to either eth0 connection....
 
Aldormanndiobla your 2nd modem didnt connect, make sure its configured then plug it in and leave the router off for a minute before switching it on, so the modem has time to register, make sure its in the correct port too :) thats what your problem is anyway

I haven't put a 2nd modem on, I was testing for the one modem only.
I was under the understanding that I could use one or two modems. If this is not the case, can I just comment out the eth0.2 out and just get it to work under the one for the moment?

The modem was in the wan port, also the modem had registered because I was swapping the modem from my pc to the router to the pc without rebooting it. My pc picked it up correctly, but the router didn't.

Is there anything else I might have missed?
 
Last edited by a moderator:
Aldormanndiobla: no it isnt that simple, unfortunately it becomes a dual wan router permanently because of the scripts that get modified, best to just reinstall whatever firmware you want on the device again to restore it to its original state.

pootas: a few people have reported that if the gateways are not different (by that i mean the ips in nexthop) then it doesnt work but i havent come accross it, what you could do is change the mac address of 1 of the wan ports so it gets a new ip and hopefully one on a different subnet with a different gateway, but apart from that looks like you have everything setup ok, if both interfaces have an ip its cool
 
Aldormanndiobla: no it isnt that simple, unfortunately it becomes a dual wan router permanently because of the scripts that get modified, best to just reinstall whatever firmware you want on the device again to restore it to its original state.

OK, so let me get this correct. For the router to carry on "routing", I need another modem on port 4. It cannot route with one modem, it can only route with two?

Edited:

I hope that isn't the case, because most dual WAN routers are used as a fall over system, when one WAN goes down, everthing still runs because the other WAN connection picks up the slack.

Just to clear up on what I was asking, I wasn't asking to change it back to a single WAN router, I just wanted (for the time being) to use one modem on it, while port 4 will always be the WAN2 until I reflashed it.

And I appreciate the help you have given others and myself on this thread.
 
Last edited by a moderator:
Aldormanndiobla: no it isnt that simple, unfortunately it becomes a dual wan router permanently because of the scripts that get modified, best to just reinstall whatever firmware you want on the device again to restore it to its original state.

pootas: a few people have reported that if the gateways are not different (by that i mean the ips in nexthop) then it doesnt work but i havent come accross it, what you could do is change the mac address of 1 of the wan ports so it gets a new ip and hopefully one on a different subnet with a different gateway, but apart from that looks like you have everything setup ok, if both interfaces have an ip its cool

whats the command for changing the mac on the wan port matey??
 
whats the command for changing the mac on the wan port matey??

I believe you edit the network file in the /etc/config directory using VI or anything you feel comfortable with, then reboot the router.
 
I'll try that....Would sticking a diff mac onto the modem help with getting a diff gateway...
 
Right an update....Edited the mac through vi and rebooted modem...Now have 2 diff ip's in the nexthop part

HOWEVER

Still only getting 20mb speeds. If I run

<CODE>cat /proc/net/ip_conntrack | grep ESTABLISHED</CODE>

It shows about 30 connections however nearly all of them are from 1 modem. Infact I've noticed it's only ever the 4th packet that is sent via the other modem. I noticed eth0.1 was being used so I rebooted and now eth0.2 is being used??

Seems I'm destined to not have dual wan unless anyone can point out what's up with it...
 
Hehe the fact you now you now have 2 ips on different subnets, rules that out, but you have said 'nearly all of them are using 1 modem' so I assume some data is being routed over the 2nd one?
 
OK, so let me get this correct. For the router to carry on "routing", I need another modem on port 4. It cannot route with one modem, it can only route with two?

Edited:

I hope that isn't the case, because most dual WAN routers are used as a fall over system, when one WAN goes down, everthing still runs because the other WAN connection picks up the slack.

Just to clear up on what I was asking, I wasn't asking to change it back to a single WAN router, I just wanted (for the time being) to use one modem on it, while port 4 will always be the WAN2 until I reflashed it.

And I appreciate the help you have given others and myself on this thread.

I do not manufacture routers, this script was made for a specific purpose.

If you wish to modify the script and build a failsafe into it feel free but I have no intentions on doing it.
 
Hehe the fact you now you now have 2 ips on different subnets, rules that out, but you have said 'nearly all of them are using 1 modem' so I assume some data is being routed over the 2nd one?

Well yeh like 1 the 4th packet was...When i reboot the router is seems to use a different modem but never both....
 
If anyone is having trouble with reflashing their router. (I have for the past couple of days), try a different port on the router and don't hold the button in, let go when its on and the red light flashes.

Currently running Tomato and its working a treat. There is even a dual wan config if you look around. The web interface is better than the original Buffalo one. :)
Only problem with Tomato, its using NVRAM settings, unlike Kami which uses the file configs.

(NVRAM settings do not get overwritten when you reflash it, so if you fvck them up, it doesn't matter how many times you flash)
 
Hi

i have a linksys v4 wrt54gs router and have been trying this method to get dual wan going...i have put the correct firmware on it, i have 2 modems set up but not sure which port i should be plugging the 2nd modem...the main problem i am having is it keeps getting bricked, putty seems to go through its motions up to the point where it says it is rebooting the router but windows throws up a an error box saying 'the server terminated unexpectedly' and at this point i am left with a bricked router i can only recover by shoeting pins 15+16...has anyone got this going on a wrt54gs successfuly ?

cheers.
 
totally off topic i know but is there a way to limit the wireless access with this firmware i would like the router to go offline at 23.30 every night is this possible?

trying to stop the kids being on there PC`s all night.

i posted in this thread because there is a couple of users in here that know there stuff with the Buffalo routers

many thanks
 
is there any more news on the triple or quad wan adamg? cant wait to get more modewms connected up lol
 
is there any more news on the triple or quad wan adamg? cant wait to get more modewms connected up lol

I believe its just the case of creating more vlans and editing the same files to make it dual wan.

Problem I found, if you haven't got any balancing, you will not be using all wans to their potiental and in some cases its just using one modem.

As for your question on turning the wireless off at night, I am sure you can create a cron job that kills the wireless process and then another to start the process in the morning.

Info on creating crons:
http://www.unixgeeks.org/security/newbie/unix/cron-1.html

Info on creating crons in openwrt:
http://martybugs.net/wireless/openwrt/cron.cgi

Then create two scripts, one to start the wireless process and one to kill it. Remember to chmod the scripts.
 
Last edited by a moderator:
For the cron jobs, a VERY quick and dirty way to do it is:

Put the following in a file in /etc/crontabs called root
Code:
You don't have permission to view the code content. Log in or register now.

Then type '/etc/init.d/cron restart', or reboot the router.

This will shut down the wifi every day at 11:30 at night, and restart it again at 7:30 in the morning.

For some reason the power light begins to flash when the wifi is down, but as far as I can tell, there's no other ill effects.

If this does the job then fine, but you may want something better. You could set up MAC filtering updates as a cron job, so that the kids couldn't get on after 11:30, but the wireless still worked for you. If you need that I'll knock something together.
 
For the cron jobs, a VERY quick and dirty way to do it is:

Put the following in a file in /etc/crontabs called root
Code:
You don't have permission to view the code content. Log in or register now.

Then type '/etc/init.d/cron restart', or reboot the router.

This will shut down the wifi every day at 11:30 at night, and restart it again at 7:30 in the morning.

For some reason the power light begins to flash when the wifi is down, but as far as I can tell, there's no other ill effects.

If this does the job then fine, but you may want something better. You could set up MAC filtering updates as a cron job, so that the kids couldn't get on after 11:30, but the wireless still worked for you. If you need that I'll knock something together.

will give this a try what type of file do i put the code into just a .txt file or something else ?? many thanx
 
Back
Top