Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The backup interface does not work when the master interface is down #3767

Open
stt12706 opened this issue Jan 15, 2025 · 8 comments
Open

The backup interface does not work when the master interface is down #3767

stt12706 opened this issue Jan 15, 2025 · 8 comments

Comments

@stt12706
Copy link

stt12706 commented Jan 15, 2025

Expected Behavior

I configured the two 10G ports on the QNAP 301W (running OpenMPTCProuter) as WAN interfaces and used iPerf3 as the testing tool. First, WAN1 serves as the master interface responsible for iperf uplink transmission. Then, using the ifdown command to disable WAN1. At this point, the iperf command continued to run without interruption, and WAN2, as the backup interface, take over and continued transmitting the iperf uplink data.

Current Behavior

When I shut down the master interface WAN1, the upstream TCP traffic of iperf does not get transmitted through the backup interface WAN2 (although it sometimes works successfully).

I'm curious why the switch to the backup interface sometimes succeeds and sometimes doesn't. Is there any configuration I might have overlooked or could adjust? What step can I take to resolve this issue?

Thank you for your help!

Specifications

  • OpenMPTCProuter version: v0.61-6.6
  • OpenMPTCProuter VPS version: 0.1032-test 6.6.36-x64v3-xanmod1
  • OpenMPTCProuter VPS provider:
  • OpenMPTCProuter platform: x86_64
@Ysurac
Copy link
Owner

Ysurac commented Jan 15, 2025

Backup mode is less tested.
To fix this faster, I would need the result of ip r before and after you disable WAN1.

@stt12706
Copy link
Author

stt12706 commented Jan 16, 2025

The output of ip r s is shown below
Before ifdown wan1:

default via 10.255.254.1 dev tun0
default via 192.168.50.1 dev 10g-1 metric 7
default via 192.168.123.254 dev 10g-2 metric 8
default via 10.255.254.1 dev tun0 metric 1500
10.255.254.1 dev tun0 proto kernel scope link src 10.255.254.2
10.255.254.2 dev tun0 scope link metric 1500
127.0.0.0/8 dev lo proto static scope link metric 6
192.168.50.0/24 dev 10g-1 scope link metric 7
192.168.123.0/24 dev 10g-2 scope link metric 8
211.xxx.xxx.xxx via 192.168.50.1 dev 10g-1 metric 1
211.xxx.xxx.xxx via 192.168.50.1 dev 10g-1 metric 7
211.xxx.xxx.xxx via 192.168.123.254 dev 10g-2 metric 8

After ifdown wan1:

default via 10.255.254.1 dev tun0
default via 192.168.123.254 dev 10g-2 metric 8
default via 10.255.254.1 dev tun0 metric 1500
10.255.254.1 dev tun0 proto kernel scope link src 10.255.254.2
10.255.254.2 dev tun0 scope link metric 1500
127.0.0.0/8 dev lo proto static scope link metric 6
192.168.123.0/24 dev 10g-2 scope link metric 8
211.xxx.xxx.xxx via 192.168.123.254 dev 10g-2 metric 8

The dev 10g-1 is wan1 and 10g-2 is wan2.

@stt12706
Copy link
Author

stt12706 commented Jan 16, 2025

I think I’ve found the issue. When I execute the iPerf command while the route
211.xxx.xxx.xxx via 192.168.50.1 dev 10g-1 metric 1 exists, the system doesn’t switch to WAN2 if WAN1 fails.
On the other hand, if I run the iPerf command when this route isn’t present (not manually deleted), the system successfully switches to WAN2 when WAN1 fails.

@Ysurac
Copy link
Owner

Ysurac commented Jan 16, 2025

There is something not normal in ip r result... What is the result of uci show openmptcprouter.settings ?

@stt12706
Copy link
Author

The result of uci show openmptcprouter.settings is shown below:

openmptcprouter.settings=settings
openmptcprouter.settings.enabled='1'
openmptcprouter.settings.sipalg='1'
openmptcprouter.settings.restrict_to_lan='0'
openmptcprouter.settings.vpn='glorytun_udp'
openmptcprouter.settings.master='change'
openmptcprouter.settings.disable_ipv6='1'
openmptcprouter.settings.check_ipv4_website='http://ip.openmptcprouter.com'
openmptcprouter.settings.check_ipv6_website='http://ipv6.openmptcprouter.com'
openmptcprouter.settings.status_vps_timeout='3'
openmptcprouter.settings.status_getip_timeout='1'
openmptcprouter.settings.enable_nodelay='1'
openmptcprouter.settings.scaling_governor='performance'
openmptcprouter.settings.menu='OpenMPTCProuter'
openmptcprouter.settings.disableintfrename='1'
openmptcprouter.settings.tracebox='0'
openmptcprouter.settings.version='0.61-6.6'
openmptcprouter.settings.allmptcpovervpn='0'
openmptcprouter.settings.apilc='1737016437'
openmptcprouter.settings.mptcpovervpn='wireguard'
openmptcprouter.settings.dns64='0'
openmptcprouter.settings.proxy='xray'
openmptcprouter.settings.ha='0'
openmptcprouter.settings.encryption='aes-256-gcm'
openmptcprouter.settings.firstboot='0'
openmptcprouter.settings.disable_fastopen='0'
openmptcprouter.settings.disable_6in4='0'
openmptcprouter.settings.disable_modemmanager='0'
openmptcprouter.settings.external_check='1'
openmptcprouter.settings.debug='0'
openmptcprouter.settings.disablegwping='0'
openmptcprouter.settings.disableloopdetection='0'
openmptcprouter.settings.disableserverhttptest='0'
openmptcprouter.settings.defaultgw='1'
openmptcprouter.settings.modemmanager='1'
openmptcprouter.settings.disableserverping='0'
openmptcprouter.settings.shadowsocksudp='0'
openmptcprouter.settings.ndpi='1'
openmptcprouter.settings.scaling_min_freq='1017600'
openmptcprouter.settings.scaling_max_freq='2208000'
openmptcprouter.settings.sfe_enabled='0'
openmptcprouter.settings.sfe_bridge='0'
openmptcprouter.settings.vnstat_backup='0'

@Ysurac
Copy link
Owner

Ysurac commented Jan 16, 2025

Change the System->OpenMPTCProuter->Advanced Settings, "Master interface selection" to "Balancing". Other modes are not tested and will not be supported in next version.

@stt12706
Copy link
Author

Ok, I'll test it again later.
Thanks for your assistance!

@stt12706
Copy link
Author

stt12706 commented Jan 17, 2025

I tested the "Balancing" mode, but the traffic still didn't switch to WAN2 during the iPerf test.

Below is the result of ip r:
Before disable WAN1:

default via 10.255.254.1 dev tun0
default via 192.168.50.1 dev 10g-1 metric 7
default via 192.168.123.254 dev 10g-2 metric 8
default via 192.168.123.254 dev 10g-2 metric 999
default via 10.255.254.1 dev tun0 metric 1500
10.255.254.1 dev tun0 proto kernel scope link src 10.255.254.2
10.255.254.2 dev tun0 scope link metric 1500
127.0.0.0/8 dev lo proto static scope link metric 6
192.168.50.0/24 dev 10g-1 scope link metric 7
192.168.123.0/24 dev 10g-2 scope link metric 8
211.xxx.xxx.xxx via 192.168.50.1 dev 10g-1 metric 1
211.xxx.xxx.xxx via 192.168.123.254 dev 10g-2 metric 999

After disable WAN1:

default via 10.255.254.1 dev tun0
default via 192.168.123.254 dev 10g-2 metric 8
default via 192.168.123.254 dev 10g-2 metric 999
default via 10.255.254.1 dev tun0 metric 1500
10.255.254.1 dev tun0 proto kernel scope link src 10.255.254.2
10.255.254.2 dev tun0 scope link metric 1500
127.0.0.0/8 dev lo proto static scope link metric 6
192.168.123.0/24 dev 10g-2 scope link metric 8
211.xxx.xxx.xxx via 192.168.123.254 dev 10g-2 metric 999

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants