Skip to content
View in the app

A better way to browse. Learn more.

Unraid

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

主板是千兆网卡,插一张2.5g网卡,主备绑定或桥接能不能设置2.5g网卡为默认

Featured Replies

如题,

折腾一下午了,两张网卡绑定或桥接数据只从主板网卡走。

拆开分两张网卡原来配置好的容器和虚拟机都要重新配置网络。而且也没了主备模式。

  • Author

又来自问自答了,找到一个相对理想的方法。

1. 设置网络开启绑定,开启桥接

1259910731_2023-04-26230935.png.d69611c3add15b1b3bb8a6a965dc64e0.png

2. 查看当前活动网卡接口

cat /sys/class/net/bond0/bonding/active_slave

3. 切换网卡接口,注意将’eth4‘更换为你想切换的接口名称

echo eth4 > /sys/class/net/bond0/bonding/active_slave

结束。

这样修改重启后又会恢复到eth0,在User Scripts添加脚本

#!/bin/bash

# 设定想要切换到的目标接口
e='eth4'

# 获取当前活动接口
i=`cat /sys/class/net/bond0/bonding/active_slave`
# 判断是否是想要的接口,如果是就结束
# 如果不是则继续判断是否要切换
if [ $i != $e ]
then
    # 判断目标接口是否连接
    i=`ethtool $e 2>&1 | grep -c "Link detected: yes"`
    # 如果目标接口已连接则切换到目标接口
    if [ $i -gt 0 ]
    then
        echo $e > /sys/class/net/bond0/bonding/active_slave
        echo '已切换到接口:'$e
    else
        echo '接口未连接,不切换。'
    fi
else
    echo '接口正确,不需要切换。'
fi

设定开机启动或定时启动,我设置的每10分钟执行一次。因为我看到有网友反映切换后过段时间系统会切回去。

参考帖子:BONDING 有办法改PRIMARY吗?

NETWORK BONDING: PRIMARY INTERFACE

话说我每次搜索中文关键字都没结果什么情况?

Edited by lvxj11

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.