我有两个接口连接到两个不同的路由器-与不同的网关和子网。如何从enp1s0和enp2s0 (键合主动备份模式)获得键合接口上的IP地址?目前,我从主服务器获得IP,但如果主服务器下降,则不会刷新IP和网关,因此切换到备份不起作用。只有当我将两者都拔出,然后插入备份,键接口刷新DHCP,并从备份路由器获得新的IP和网关。但是,如果再次插入主接口,键接口不会更新IP,因此网络连接无法工作。
我观察到,只有当键接口有来自两个子网的IP时,故障转移才能工作。但我只得到一次当插头和插头之间的接口之间的电缆随机。
我在netplan中的配置:
network:
version: 2
renderer: networkd
ethernets:
enp1s0:
ignore-carrier: yes #with or without doesn't change (without bonding had to have)
enp2s0:
ignore-carrier: yes #with or without doesn't change (without bonding had to have)
bonds:
bond0:
dhcp4: yes
interfaces:
- enp1s0
- enp2s0
parameters:
mode: active-backup
primary: enp2s0
mii-monitor-interval: 50
down-delay: 10也许这样做会更好,没有绑定,但与度量,但它没有工作,对我来说,高米制备份接口自动接管通信时,低米制主板下降。
发布于 2022-11-02 19:29:38
在活动备份模式下的键合一次只能使用一个接口,所以每次只能从一个接口获得DHCP。
https://askubuntu.com/questions/1438702
复制相似问题