OpenWrt Forum Archive

Topic: mwan3; multi-wan policy routing (general topic)

The content of this topic has been archived between 22 May 2013 and 6 May 2018. Unfortunately there are posts – most likely complete pages – missing.

Hey arfett/Adze

Can you do some versioning of the luci-app-mwan3 package, as it is still stuck at 0.1-1 (the main packache mwan3 is already versioned via GIT)? It makes tracking the changes more easy smile

Cheers

Thomy

Dear good people who have helped me over the last 2 pages, I've finally gotten things working, however... there are a couple of hiccups.

1. Everything is nominal. I test failover: Assuming I have a tcp connection to an online host via WAN1 already. I now unplug WAN2. tcp connection in WAN1 breaks. I need to reconnect. (In pfssense, this wouldn't happen). I assume it's because the mwan3 script restarts itself and drops all connections. I would guess the main code itself must be altered quite a bit to not drop the connections... is it complex work? I'm willing to give it a shot heh.

2. I've had several auto-restarts while testing. Not sure if it's because i ran 3x tcpdump + iftop and choked something. Or if it's due to mwan3. I've seen this router act funny when there's load. Care to comment?

(Last edited by biatche on 22 Apr 2013, 13:55)

biatche wrote:

1. Everything is nominal. I test failover: Assuming I have a tcp connection to an online host via WAN1 already. I now unplug WAN2. tcp connection in WAN1 breaks. I need to reconnect. (In pfssense, this wouldn't happen). I assume it's because the mwan3 script restarts itself and drops all connections. I would guess the main code itself must be altered quite a bit to not drop the connections... is it complex work? I'm willing to give it a shot heh.

This is indeed normal behaviour. This is very hard to tackle and in combination with NAT even impossible (as your source address changes). This will never change in mwan3...

biatche wrote:

2. I've had several auto-restarts while testing. Not sure if it's because i ran 3x tcpdump + iftop and choked something. Or if it's due to mwan3. I've seen this router act funny when there's load. Care to comment?

Restart of a router can have a lot of reasons. It is impossible to tell from a distance.

Nice to hear you got it working!

(Last edited by Adze on 22 Apr 2013, 15:05)

Adze wrote:
biatche wrote:

1. Everything is nominal. I test failover: Assuming I have a tcp connection to an online host via WAN1 already. I now unplug WAN2. tcp connection in WAN1 breaks. I need to reconnect. (In pfssense, this wouldn't happen). I assume it's because the mwan3 script restarts itself and drops all connections. I would guess the main code itself must be altered quite a bit to not drop the connections... is it complex work? I'm willing to give it a shot heh.

This is indeed normal behaviour. This is very hard to tackle and in combination with NAT even impossible (as your source address changes). This will never change in mwan3...

I thought so, mind giving it a 2min thought and tell me if this is actually do-able? 1 wan going down shouldn't affect everything else. Will not having load balancing simplify development?

Imagine scenario 1: Imagine you have one wan for torrent (few ports) and another wan for everything else (games especially). If the torrent line is having issues and keeps on going up and down, it's not good if it affects the gaming line right.

Scenario 2: Let's say you have a 3G wan and the reception is poor. If connection is intermittent (which is operating as a backup line and not doing much of anything in normal circumstances).... with it not even being utilized it already causes many issues sad

I don't think you would want to make such changes here, so i am willing to take up this challenge myself and study how to code this....

What i need to know is from your experience is this insanely difficult or not doable at all? Or tell me what's involved... i can slowly try to code it

(Last edited by biatche on 22 Apr 2013, 15:32)

Hi Biatche,

I was reading your post wrong. If a session is running on WAN1 and WAN2 goes down, it should not effect connections already active on WAN1. At least it does not on my setup...

If a session is running on WAN2 and WAN2 goes down, session is lost and should be re-initialized, before it is routed through WAN1.

I'll test again, perhaps apps that utilize both tcp+udp behave differently, which made me come to an incorrect conclusion.

nice job adze
i like this pack really and now i am learning how to compiler the latest version on git to get the newest version ,i am a newbie of compiler.

i got a question, how to make mwan3 work on gargoyle, i tried to install it with opkg but failed,and also without macvlan it's imposible to lauch multiple connection on single port.

i even don't know how to install macvlan on gargoyle, do i need to compiler from the source code?

thanks

chrisrenz wrote:

i even don't know how to install macvlan on gargoyle, do i need to compiler from the source code?

I know nothing about gargoyle. Please start a new thread about this...

arfett wrote:

I have a preliminary interface status page completed. It shows "ONLINE" "OFFLINE" "not tracked" and "not enabled" for the interface status.

Going to pretty it up so it resembles the stock multiwan package look and post on github soon.

How about a log page to mark outages and times? That would be helpful for maintaining reliability!

biatche wrote:
arfett wrote:

I have a preliminary interface status page completed. It shows "ONLINE" "OFFLINE" "not tracked" and "not enabled" for the interface status.

Going to pretty it up so it resembles the stock multiwan package look and post on github soon.

How about a log page to mark outages and times? That would be helpful for maintaining reliability!

I'll just add a section to the troubleshooting page that does "logread | grep mwan3"

Thanks

(Last edited by arfett on 23 Apr 2013, 07:53)

biatches proposal seems very interesting too, what do you think?

hope headless.cross can compile a version with the troubleshooting page and overview status soon... just in time for a new setup once my wdr-3600 arrives smile

thank you good people here for the good work.

Good people,

I have 2 WAN interfaces, how can I check what DNS servers each WAN interface use? as well as their sequence. Preferably by commandline shell because

for this pppoe-wan i've set to use custom dns server to 8.8.8.8 and 1.2.3.4 dns following it..
however, in luci > status > overview, it shows dns1: 1.2.3.4 and dns2: 8.8.8.8

as for WAN2, it's static ip+dmz, so it doesn't display in luci..

i need to find out which part's wrong.

arfett, can you think of a way of how i can get the status of the wan's publically?

i don't want people to access the root account of openwrt, but i want them to see the status of the wan's

im thinking perhaps i could modify the mwan3 script so that  when it refreshes as if's go up and down it will also write to a file

"wan1_interface: up/down ; wan2_interface: up/down"
written to /tmp/www/mwan/status.log

so that i can http://openwrtip/mwan/status.log

what code should i modify to do this? hehe actually how do i even compile the code? is there a guide on compiling?

biatche wrote:

arfett, can you think of a way of how i can get the status of the wan's publically?

i don't want people to access the root account of openwrt, but i want them to see the status of the wan's

im thinking perhaps i could modify the mwan3 script so that  when it refreshes as if's go up and down it will also write to a file

"wan1_interface: up/down ; wan2_interface: up/down"
written to /tmp/www/mwan/status.log

so that i can http://openwrtip/mwan/status.log

what code should i modify to do this? hehe actually how do i even compile the code? is there a guide on compiling?

Copy mwan3 and mwan3-luci directories into your package folder. Select them from the 'make menuconfig' menu in the network section. Not entirely sure on the other things I would have to google and mess around with it.

You could setup a system log server somewhere. Stock OpenWRT comes with the ability to upload syslogs to a server.

(Last edited by arfett on 23 Apr 2013, 09:35)

Latest github files have my initial interface status work included.

On the main OpenWRT Status/Overview tab there is a status display which is very similar to (lot of copy paste from) the luci-app-multiwan package. This auto refreshes every 5 seconds. In a future update I'll make it so it shows you the device name assigned to that interface. Keep in mind the official package and mine both have a bug where if you have so many interfaces configured they go past the edge of the screen or if you resize your window to be small there may be some graphical glitching. I'm working on a fix and have brought this to the developers' attention.

The overview tab in the mwan3 section has a much more simplistic output but still works. This does not automatically refresh every 5 seconds. I will see if I can make it look pretty like the main page and have it auto refresh and update later.

(Last edited by arfett on 23 Apr 2013, 11:07)

what language can i use to make

http://openwrt_routerip/info

which would simply display the output of "ip rule show"?

with this i should be able to script up a simple version of wan status's viewable without logging in

(Last edited by biatche on 23 Apr 2013, 11:53)

arfett wrote:

Latest github files have my initial interface status work included.

On the main OpenWRT Status/Overview tab there is a status display which is very similar to (lot of copy paste from) the luci-app-multiwan package. This auto refreshes every 5 seconds. In a future update I'll make it so it shows you the device name assigned to that interface. Keep in mind the official package and mine both have a bug where if you have so many interfaces configured they go past the edge of the screen or if you resize your window to be small there may be some graphical glitching. I'm working on a fix and have brought this to the developers' attention.

The overview tab in the mwan3 section has a much more simplistic output but still works. This does not automatically refresh every 5 seconds. I will see if I can make it look pretty like the main page and have it auto refresh and update later.

will you be doing the troubleshooting page anytime soon?

biatche wrote:

will you be doing the troubleshooting page anytime soon?

Already added the logread part.

biatche wrote:

what language can i use to make

http://openwrt_routerip/info

which would simply display the output of "ip rule show"?

with this i should be able to script up a simple version of wan status's viewable without logging in

You should be able to use uhttpd the standard web server daemon on OpenWRT. Check the /etc/config/uhttpd file you may be able to specify other pages you can make. You can also call uhttpd by itself from another script and have it serve a different page. There's even tools to create pages using shell script which are pretty handy. You may wish to make another post about this as I'm a little too lazy to figure this out at the moment and will be spending my time getting the device name information working over the next few days.

i con information vom headless.cross how to compile the binaries and once i set up the buildchain i will build them regulary smile

Adze,

What's the highest number that will be used for ip rules? I want the troubleshooting page to show them all. Is it 1020 or higher?

I figured out what I need to do to make the mwan3 -> overview tab auto refresh and look pretty so I'll try to get another update in with that sometime tomorrow as well as including an instructions page with the configuration instructions shown.

Sorry, posts 201 to 200 are missing from our archive.