# VRRP：抢占延迟到期，接口eth0上转换为主状态

- **ID:** `networking/vrrp-preempt-delay-expired`
- **领域:** networking
- **类别:** runtime_error
- **验证级别:** ai_generated
- **修复率:** 85%

## 根因

具有更高优先级的VRRP备份路由器等待了配置的抢占延迟后，正在接管为主路由器，如果前主路由器仍活跃，可能会导致短暂流量中断。

## 版本兼容性

| 版本 | 状态 | 引入 | 弃用 |
|------|------|------|------|
| keepalived 2.2.8 | active | — | — |
| FRRouting 9.1 | active | — | — |
| Linux kernel 6.1 | active | — | — |

## 解决方案

1. ```
   Ensure the previous master gracefully transitions by setting a lower priority on it: in keepalived.conf, set priority 100 on old master, priority 150 on new master, then reload both: systemctl reload keepalived
   ```
2. ```
   Monitor VRRP state transitions and adjust preempt delay if flapping occurs: grep 'VRRP' /var/log/syslog ; increase delay with vrrp_skip_check_adv_addr and vrrp_garp_master_delay in keepalived.conf
   ```

## 无效尝试

- **** — This prevents the higher-priority router from taking over, defeating the purpose of VRRP for failover scenarios. (70% 失败率)
- **** — Instant preemption can cause flapping if the previous master has not yet released the IP; a non-zero delay is intentional for stability. (60% 失败率)
