WAN Internet Failover


(Tohid Tamboli) #1

Question of the day :sweat:

I am trying to just check the wan internet failover.

here is what i did

green - eth1 -
red - eth2 -
red - eth3 -

Balance mode
weight 100 - eth2
weight 50 - eth3

yes both the red card are connected to same switch it was a mock test.

when i disconnected eth2 the internet also gets disconnected?

(Filippo Carletti) #2

I always put the different red on different subnets, I’m not sure your setup will work, but it could.
Could you paste the output of

ip ru

Also, check /var/log/messages looking for lsm.

(Filippo Carletti) #3

I think it will not work. Use different subnets, please.

(Tohid Tamboli) #4

This time.

green - eth1 -
red - eth2 - 179.x.x.x
red - eth3 - 113.x.x.x

Balance mode
weight 100 - eth2
weight 50 - eth3

check ping : for both

Traffic Shaping is Enabled

Now the red cards are set to isp subnets.

when i plug out eth2 cable internet is not available.

Can you drop me to a specific configuration like"How to configure Multi Wan ?"
That i can cross check.

Need help!

And also 1 thing i have installed plain centos first from the same iso and then installed nethserver from repo.
The reason i did is full Encrytion of disk.

(Filippo Carletti) #5

It should be different, that’s a pre-requisite to reach the ip through different links.
We need to add a check to the interface to forbid using the same ip in all uplinks.

(Tohid Tamboli) #6

Now my check pings are gateway of isp
Both are diffrent now .
But still there is no failover happening.
Please can you guide me to a tutorial of multi wan or links also can do !
i turned ips to disbaled mode.

this is #ip ru output:

eth 2 Disconnected Wire plugged out /var/log/messages:

Squid Says no route to host:

Eth2 plugged in Again var/log/messages

And when i plug wire in squid started forwarding us to isp eth2

(Filippo Carletti) #7
db networks show

look for providers (Air and TATA), note the interface and checkip.

ip ro

You should find a line with checkip for Air via interface where Air is connected, Same for TATA.

grep lsm /var/log/messages

This should show everything about link status monitor.

(Tohid Tamboli) #8

please have a check and let me known soon i am not able to understand !!!

Also have a look on em1 i have not alloted the gateway because same machine i want it as a gateway…

(Filippo Carletti) #9

The configuration is correct, em1 should have no gateway.
Now, confirm that both links are working:

# ip ro sh ta balance

nexthop via 172.16.16.x dev eth2 weight 5
nexthop via dev eth1 weight 1

The above lines show that the default gateway is “double” and traffic is balanced.

tail -f /var/log/messages

and switch off one of the internet routers/modems.
You should see something like:

Event: wan-uplink-update down <provider> <checkip> eth2


ip ro sh ta balance

should show only one line through the working wan connection. If you later switch on the router, lsm will bring the link up again in about 100 seconds (to avoid frequent up/down in case of intermittent problems).

Final note: there’s no need to define the two network with the local wan ip, but it will not prevent functioning:
Description=TATA ISP
Description=Airtel ISP

(Tohid Tamboli) #10

i did not get ur last note please would you let me know what am i doing wrong?

(Filippo Carletti) #11

Nothing wrong. I simply noticed that you defined those network with your ip instead of the network ip:

(Tohid Tamboli) #12

Multi Wan still not working .
i am not able to ping nor internet sometimes it has pings sometimes not.
I think we should go deep in…

I have 2 isp lease lines .
airtel and tata
Tata is fibre broadband.
4 lan cards
eth0- green
eth1- nil

i had ethtool both the cards have a look

In both the output only line “Link partner advertised pause frame use” is different…

Hardware Dell t420 …i also found that linux kernel has some issues with tg3 drivers.

Can you explain me where exactly i can find it working or the bug or errors

OR just take me to a Wan configuration page step by step to cross check my setup!

(Filippo Carletti) #13

I already gave you step by step instructions. We need to see /var/log/messages when you switch off one of your ISP. And ip ro sh ta balance.